From 0bb099f444c6256e2af51fce158b85bef41e354c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 5 Aug 2015 14:44:21 +0200 Subject: [PATCH 001/214] build: expand ~ in install prefix early MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The install prefix gets written to config.gypi and config.mk. Tildes were expanded in the first file but not in the second one, causing the `make install` target to install files to a directory named `~` in the current working directory. Fixes: https://github.com/nodejs/node/issues/75 PR-URL: https://github.com/nodejs/io.js/pull/2307 Reviewed-By: Johan Bergström Reviewed-By: Sakthipriyan Vairamani --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ab2383c8141..f01aea6f927 100755 --- a/configure +++ b/configure @@ -335,6 +335,9 @@ parser.add_option('--enable-static', (options, args) = parser.parse_args() +# Expand ~ in the install prefix now, it gets written to multiple files. +options.prefix = os.path.expanduser(options.prefix or '') + # set up auto-download list auto_downloads = nodedownload.parse(options.download_list) @@ -611,7 +614,7 @@ def configure_mips(o): def configure_node(o): if options.dest_os == 'android': o['variables']['OS'] = 'android' - o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '') + o['variables']['node_prefix'] = options.prefix o['variables']['node_install_npm'] = b(not options.without_npm) o['default_configuration'] = 'Debug' if options.debug else 'Release' From e76822f454018273e66247ac243a4d00f4015aa4 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 23 Jun 2015 20:42:49 -0700 Subject: [PATCH 002/214] doc: multiple documentation updates cherry picked from v0.12 * doc: improve http.abort description * doc: mention that mode is ignored if file exists * docs: Fix default options for fs.createWriteStream() * Documentation update about Buffer initialization * doc: add a note about readable in flowing mode * doc: Document http.request protocol option * doc, comments: Grammar and spelling fixes * updated documentation for fs.createReadStream * Update child_process.markdown, spelling * doc: Clarified read method with specified size argument. * docs:events clarify emitter.listener() behavior * doc: two minor stream doc improvements * doc: clarify Readable._read and Readable.push * doc: stream.unshift does not reset reading state * doc: readable event clarification * doc: additional refinement to readable event Reviewed-By: James M Snell Reviewed-By: Ben Noorduis PR-URL: https://github.com/nodejs/io.js/pull/2302 --- doc/api/buffer.markdown | 6 ++- doc/api/child_process.markdown | 2 +- doc/api/cluster.markdown | 4 +- doc/api/dns.markdown | 4 +- doc/api/events.markdown | 2 +- doc/api/fs.markdown | 11 +++- doc/api/http.markdown | 4 +- doc/api/stream.markdown | 96 ++++++++++++++++++++++++---------- lib/_http_client.js | 4 +- lib/url.js | 4 +- src/node.cc | 2 +- src/node_object_wrap.h | 2 +- 12 files changed, 98 insertions(+), 43 deletions(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 92b7f2ba93b..94f3e3d8e16 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -43,7 +43,7 @@ Creating a typed array from a `Buffer` works with the following caveats: 2. The buffer's memory is interpreted as an array, not a byte array. That is, `new Uint32Array(new Buffer([1,2,3,4]))` creates a 4-element `Uint32Array` - with elements `[1,2,3,4]`, not an `Uint32Array` with a single element + with elements `[1,2,3,4]`, not a `Uint32Array` with a single element `[0x1020304]` or `[0x4030201]`. NOTE: Node.js v0.8 simply retained a reference to the buffer in `array.buffer` @@ -67,6 +67,10 @@ Allocates a new buffer of `size` bytes. `size` must be less than 2,147,483,648 bytes (2 GB) on 64 bits architectures, otherwise a `RangeError` is thrown. +Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So +the contents of a newly created `Buffer` is unknown. Use `buf.fill(0)`to +initialize a buffer to zeroes. + ### new Buffer(array) * `array` Array diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 3d6e5f5fe2f..4acd61bfa6a 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -279,7 +279,7 @@ Here is an example of sending a server: child.send('server', server); }); -And the child would the receive the server object as: +And the child would then receive the server object as: process.on('message', function(m, server) { if (m === 'server') { diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index b7e76fcb8ff..abf05bf9f40 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -121,7 +121,7 @@ values are `"rr"` and `"none"`. ## cluster.settings * {Object} - * `execArgv` {Array} list of string arguments passed to the io.js executable. + * `execArgv` {Array} list of string arguments passed to the io.js executable. (Default=`process.execArgv`) * `exec` {String} file path to worker file. (Default=`process.argv[1]`) * `args` {Array} string arguments passed to worker. @@ -613,7 +613,7 @@ It is not emitted in the worker. ### Event: 'disconnect' -Similar to the `cluster.on('disconnect')` event, but specfic to this worker. +Similar to the `cluster.on('disconnect')` event, but specific to this worker. cluster.fork().on('disconnect', function() { // Worker has disconnected diff --git a/doc/api/dns.markdown b/doc/api/dns.markdown index d8ed53e3fa0..7c9f419ce08 100644 --- a/doc/api/dns.markdown +++ b/doc/api/dns.markdown @@ -85,7 +85,7 @@ All properties are optional. An example usage of options is shown below. ``` The callback has arguments `(err, address, family)`. `address` is a string -representation of a IP v4 or v6 address. `family` is either the integer 4 or 6 +representation of an IP v4 or v6 address. `family` is either the integer 4 or 6 and denotes the family of `address` (not necessarily the value initially passed to `lookup`). @@ -163,7 +163,7 @@ attribute (e.g. `[{'priority': 10, 'exchange': 'mx.example.com'},...]`). ## dns.resolveTxt(hostname, callback) The same as `dns.resolve()`, but only for text queries (`TXT` records). -`addresses` is an 2-d array of the text records available for `hostname` (e.g., +`addresses` is a 2-d array of the text records available for `hostname` (e.g., `[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of one record. Depending on the use case, the could be either joined together or treated separately. diff --git a/doc/api/events.markdown b/doc/api/events.markdown index fbc04a96239..a51905ab4da 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -122,7 +122,7 @@ Note that `emitter.setMaxListeners(n)` still has precedence over ### emitter.listeners(event) -Returns an array of listeners for the specified event. +Returns a copy of the array of listeners for the specified event. server.on('connection', function (stream) { console.log('someone connected!'); diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 5f96b10763f..ebc2046d76a 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -801,6 +801,10 @@ on Unix systems, it never was. Returns a new ReadStream object (See `Readable Stream`). +Be aware that, unlike the default value set for `highWaterMark` on a +readable stream (16 kb), the stream returned by this method has a +default value of 64 kb for the same parameter. + `options` is an object or string with the following defaults: { flags: 'r', @@ -823,6 +827,9 @@ there's no file descriptor leak. If `autoClose` is set to true (default behavior), on `error` or `end` the file descriptor will be closed automatically. +`mode` sets the file mode (permission and sticky bits), but only if the +file was created. + An example to read the last 10 bytes of a file which is 100 bytes long: fs.createReadStream('sample.txt', {start: 90, end: 99}); @@ -847,14 +854,14 @@ Returns a new WriteStream object (See `Writable Stream`). `options` is an object or string with the following defaults: { flags: 'w', - encoding: null, + defaultEncoding: 'utf8', fd: null, mode: 0o666 } `options` may also include a `start` option to allow writing data at some position past the beginning of the file. Modifying a file rather than replacing it may require a `flags` mode of `r+` rather than the -default mode `w`. The `encoding` can be `'utf8'`, `'ascii'`, `binary`, +default mode `w`. The `defaultEncoding` can be `'utf8'`, `'ascii'`, `binary`, or `'base64'`. Like `ReadStream` above, if `fd` is specified, `WriteStream` will ignore the diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 5cf3b07a9cd..966b304b56d 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -462,6 +462,7 @@ automatically parsed with [url.parse()][]. Options: +- `protocol`: Protocol to use. Defaults to `'http'`. - `host`: A domain name or IP address of the server to issue the request to. Defaults to `'localhost'`. - `hostname`: Alias for `host`. To support `url.parse()` `hostname` is @@ -911,7 +912,8 @@ is finished. ### request.abort() -Aborts a request. (New since v0.3.8.) +Marks the request as aborting. Calling this will cause remaining data +in the response to be dropped and the socket to be destroyed. ### request.setTimeout(timeout[, callback]) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index a7a78f229ed..ffad1717f75 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -164,6 +164,34 @@ readable.on('readable', function() { Once the internal buffer is drained, a `readable` event will fire again when more data is available. +The `readable` event is not emitted in the "flowing" mode with the +sole exception of the last one, on end-of-stream. + +The 'readable' event indicates that the stream has new information: +either new data is available or the end of the stream has been reached. +In the former case, `.read()` will return that data. In the latter case, +`.read()` will return null. For instance, in the following example, `foo.txt` +is an empty file: + +```javascript +var fs = require('fs'); +var rr = fs.createReadStream('foo.txt'); +rr.on('readable', function() { + console.log('readable:', rr.read()); +}); +rr.on('end', function() { + console.log('end'); +}); +``` + +The output of running this script is: + +``` +bash-3.2$ node test.js +readable: null +end +``` + #### Event: 'data' * `chunk` {Buffer | String} The chunk of data. @@ -221,7 +249,9 @@ returns it. If there is no data available, then it will return `null`. If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`. +bytes. If `size` bytes are not available, then it will return `null`, +unless we've ended, in which case it will return the data remaining +in the buffer. If you do not specify a `size` argument, then it will return all the data in the internal buffer. @@ -243,6 +273,9 @@ readable.on('readable', function() { If this method returns a data chunk, then it will also trigger the emission of a [`'data'` event][]. +Note that calling `readable.read([size])` after the `end` event has been +triggered will return `null`. No runtime error will be raised. + #### readable.setEncoding(encoding) * `encoding` {String} The encoding to use. @@ -414,6 +447,9 @@ parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party. +Note that `stream.unshift(chunk)` cannot be called after the `end` event +has been triggered; a runtime error will be raised. + If you find that you must often call `stream.unshift(chunk)` in your programs, consider implementing a [Transform][] stream instead. (See API for Stream Implementors, below.) @@ -452,6 +488,13 @@ function parseHeader(stream, callback) { } } ``` +Note that, unlike `stream.push(chunk)`, `stream.unshift(chunk)` will not +end the reading process by resetting the internal reading state of the +stream. This can cause unexpected results if `unshift` is called during a +read (i.e. from within a `_read` implementation on a custom stream). Following +the call to `unshift` with an immediate `stream.push('')` will reset the +reading state appropriately, however it is best to simply avoid calling +`unshift` while in the process of performing a read. #### readable.wrap(stream) @@ -883,6 +926,10 @@ SimpleProtocol.prototype._read = function(n) { // back into the read queue so that our consumer will see it. var b = chunk.slice(split); this.unshift(b); + // calling unshift by itself does not reset the reading state + // of the stream; since we're inside _read, doing an additional + // push('') will reset the state appropriately. + this.push(''); // and let them know that we are done parsing the header. this.emit('header', this.header); @@ -922,24 +969,22 @@ initialized. * `size` {Number} Number of bytes to read asynchronously -Note: **Implement this function, but do NOT call it directly.** +Note: **Implement this method, but do NOT call it directly.** -This function should NOT be called directly. It should be implemented -by child classes, and only called by the internal Readable class -methods. +This method is prefixed with an underscore because it is internal to the +class that defines it and should only be called by the internal Readable +class methods. All Readable stream implementations must provide a _read +method to fetch data from the underlying resource. -All Readable stream implementations must provide a `_read` method to -fetch data from the underlying resource. +When _read is called, if data is available from the resource, `_read` should +start pushing that data into the read queue by calling `this.push(dataChunk)`. +`_read` should continue reading from the resource and pushing data until push +returns false, at which point it should stop reading from the resource. Only +when _read is called again after it has stopped should it start reading +more data from the resource and pushing that data onto the queue. -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. +Note: once the `_read()` method is called, it will not be called again until +the `push` method is called. 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 @@ -955,19 +1000,16 @@ becomes available. There is no need, for example to "wait" until Buffer encoding, such as `'utf8'` or `'ascii'` * return {Boolean} Whether or not more pushes should be performed -Note: **This function should be called by Readable implementors, NOT +Note: **This method should be called by Readable implementors, NOT by consumers of Readable streams.** -The `_read()` function will not be called again until at least one -`push(chunk)` call is made. +If a value other than null is passed, The `push()` method adds a chunk of data +into the queue for subsequent stream processors to consume. If `null` is +passed, it signals the end of the stream (EOF), after which no more data +can be written. -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 (EOF). +The data added with `push` can be pulled out by calling the `read()` method +when the `'readable'`event fires. This API is designed to be as flexible as possible. For example, you may be wrapping a lower-level source which has some sort of @@ -1315,7 +1357,7 @@ for examples and testing, but there are occasionally use cases where it can come in handy as a building block for novel sorts of streams. -## Simplified Constructor API +## Simplified Constructor API diff --git a/lib/_http_client.js b/lib/_http_client.js index a7d714f7e0b..50d1052b44e 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -359,7 +359,7 @@ function parserOnIncomingClient(res, shouldKeepAlive) { var req = socket._httpMessage; - // propogate "domain" setting... + // propagate "domain" setting... if (req.domain && !res.domain) { debug('setting "res.domain"'); res.domain = req.domain; @@ -465,7 +465,7 @@ function tickOnSocket(req, socket) { socket.parser = parser; socket._httpMessage = req; - // Setup "drain" propogation. + // Setup "drain" propagation. httpSocketSetup(socket); // Propagate headers limit from request object to parser diff --git a/lib/url.js b/lib/url.js index 55c5248e475..45155fee936 100644 --- a/lib/url.js +++ b/lib/url.js @@ -587,7 +587,7 @@ Url.prototype.resolveObject = function(relative) { if (psychotic) { result.hostname = result.host = srcPath.shift(); //occationaly the auth can get stuck only in host - //this especialy happens in cases like + //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; @@ -669,7 +669,7 @@ Url.prototype.resolveObject = function(relative) { result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; //occationaly the auth can get stuck only in host - //this especialy happens in cases like + //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; diff --git a/src/node.cc b/src/node.cc index 7c0a80ec314..c272139e551 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2184,7 +2184,7 @@ static void OnFatalError(const char* location, const char* message) { NO_RETURN void FatalError(const char* location, const char* message) { OnFatalError(location, message); - // to supress compiler warning + // to suppress compiler warning abort(); } diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index d00e1484b7c..f0226622272 100644 --- a/src/node_object_wrap.h +++ b/src/node_object_wrap.h @@ -80,7 +80,7 @@ class ObjectWrap { * attached to detached state it will be freed. Be careful not to access * the object after making this call as it might be gone! * (A "weak reference" means an object that only has a - * persistant handle.) + * persistent handle.) * * DO NOT CALL THIS FROM DESTRUCTOR */ From cf9ba813984323659272193c2479d34efd28b566 Mon Sep 17 00:00:00 2001 From: Gireesh Punathil Date: Wed, 18 Mar 2015 04:12:16 -0400 Subject: [PATCH 003/214] test: address timing issues in simple http tests simple tests test-http-request-end.js, test-http-default-encoding.js hangs in AIX. The root cause for both the failures is related to the timing with which packets are sent between the client and server. On the client side, one factor that affects the timing is Nagle's algorithm. With Nagle enabled there may be a delay between two packets as the stack may wait until either: a. An acknowledgement for the first packet is received, or b. 200 ms elapses. before sending the second packet. Similarly at the server side 2 sequential packages can be delivered to the application either together or separatly. On AIX we see that they are delivered separately to the server, while on Linux delivered together. If we change the timing, for example disabling Nagle on AIX we see the 2 packets delivered together and the tests pass. In the test case simple/test-http-request-end.js, the client request handler of the server receives and stores the data in a data callback, closes the server in a request end callback, and writes to the client and ends the response, in-line with the request receipt. An HTTP parser module parses the incoming message, and invokes callback routines which are registered for HTTP events (such as header, body, end etc.) Because the termination sequence arrive in a separate packet, there is a delay in parsing that message and identify that the client request ended (and thereby invoke the request end call backhandler). Due to this delay, the response close happens first, which in-turn destroys the server socket leading to the fd and watcher removal from the uv loop abandoning further events on this connection, and end call back never being called, causing the reported hang. simple/test-http-default-encoding.js suffers from the same problem. Also, remove the timer logic from the test case. Test harness anyways contain a timer which controls the individual tests so remove such controls from the test case, as suggested by @tjfontaine Reviewed-By: Michael Dawson PR-URL: https://github.com/joyent/node/pull/9432 PORT-FROM: joyent/node @ 13e1131406b2239f99962ecc05b8179aa781d0f8 PR-URL: https://github.com/nodejs/io.js/pull/2294 Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis --- test/parallel/test-http-default-encoding.js | 9 ++------- test/parallel/test-http-request-end.js | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/test/parallel/test-http-default-encoding.js b/test/parallel/test-http-default-encoding.js index a40c8841ece..612a75bce46 100644 --- a/test/parallel/test-http-default-encoding.js +++ b/test/parallel/test-http-default-encoding.js @@ -11,16 +11,11 @@ var server = http.Server(function(req, res) { req.on('data', function(chunk) { result += chunk; }).on('end', function() { - clearTimeout(timeout); server.close(); + res.writeHead(200); + res.end('hello world\n'); }); - var timeout = setTimeout(function() { - process.exit(1); - }, 100); - - res.writeHead(200); - res.end('hello world\n'); }); server.listen(common.PORT, function() { diff --git a/test/parallel/test-http-request-end.js b/test/parallel/test-http-request-end.js index 43d023028a4..6ecfc0672e3 100644 --- a/test/parallel/test-http-request-end.js +++ b/test/parallel/test-http-request-end.js @@ -14,10 +14,10 @@ var server = http.Server(function(req, res) { req.on('end', function() { server.close(); + res.writeHead(200); + res.end('hello world\n'); }); - res.writeHead(200); - res.end('hello world\n'); }); server.listen(common.PORT, function() { From 1738c9680bd8740ffd33010cebdd0cdcb47bb089 Mon Sep 17 00:00:00 2001 From: Ryan Graham Date: Thu, 2 Jul 2015 15:26:21 -0700 Subject: [PATCH 004/214] net: ensure Socket reported address is current Any time the connection state or the underlying handle itself changes, the socket's name (aka, local address) can change. To deal with this we need to reset the cached sockname any time we set or unset the internal handle or an existing handle establishes a connection. PR-URL: https://github.com/nodejs/io.js/pull/2095 Reviewed-By: Ben Noordhuis Reviewed-By: Jeremiah Senkpiel --- lib/net.js | 4 +++ .../parallel/test-net-socket-local-address.js | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 test/parallel/test-net-socket-local-address.js diff --git a/lib/net.js b/lib/net.js index 6146029d3c4..10e78967844 100644 --- a/lib/net.js +++ b/lib/net.js @@ -93,6 +93,7 @@ function initSocketHandle(self) { self.destroyed = false; self.bytesRead = 0; self._bytesDispatched = 0; + self._sockname = null; // Handle creation may be deferred to bind() or connect() time. if (self._handle) { @@ -469,6 +470,7 @@ Socket.prototype._destroy = function(exception, cb) { }); this._handle.onread = noop; this._handle = null; + this._sockname = null; } // we set destroyed to true before firing error callbacks in order @@ -871,6 +873,7 @@ Socket.prototype.connect = function(options, cb) { this.destroyed = false; this._handle = null; this._peername = null; + this._sockname = null; } var self = this; @@ -1032,6 +1035,7 @@ function afterConnect(status, handle, req, readable, writable) { assert.ok(self._connecting); self._connecting = false; + self._sockname = null; if (status == 0) { self.readable = readable; diff --git a/test/parallel/test-net-socket-local-address.js b/test/parallel/test-net-socket-local-address.js new file mode 100644 index 00000000000..4c0e31d08c4 --- /dev/null +++ b/test/parallel/test-net-socket-local-address.js @@ -0,0 +1,34 @@ +'use strict'; +var common = require('../common'); +var assert = require('assert'); +var net = require('net'); + +var conns = 0; +var clientLocalPorts = []; +var serverRemotePorts = []; + +var server = net.createServer(function(socket) { + serverRemotePorts.push(socket.remotePort); + conns++; +}); + +var client = new net.Socket(); + +server.on('close', function() { + assert.deepEqual(clientLocalPorts, serverRemotePorts, + 'client and server should agree on the ports used'); + assert.equal(2, conns); +}); + +server.listen(common.PORT, common.localhostIPv4, testConnect); + +function testConnect() { + if (conns == 2) { + return server.close(); + } + client.connect(common.PORT, common.localhostIPv4, function() { + clientLocalPorts.push(this.localPort); + this.once('close', testConnect); + this.destroy(); + }); +} From 0ee4df9c7a02a1bce5659c7a5ad8d4372b6afcc1 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 10 Jun 2015 08:41:03 -0700 Subject: [PATCH 005/214] test: make listen-fd-cluster/server more robust - eliminate unnecessary intermediate process ("parent") - children exit if runner dies unexpectedly (killed on a test timeout, for example) - use explicit messaging from children to parents to indicate when worker is ready to accept http requests, rather than racing to see whether runner will make request before worker is listening PR-URL: https://github.com/nodejs/io.js/pull/1944 Reviewed-By: Johan Bergstrom Reviewed-By: Ben Noordhuis --- test/parallel/test-listen-fd-cluster.js | 85 +++++++++++++++---------- test/parallel/test-listen-fd-server.js | 82 +++++++++++------------- 2 files changed, 88 insertions(+), 79 deletions(-) diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js index e895a294478..f6d00c72a0f 100644 --- a/test/parallel/test-listen-fd-cluster.js +++ b/test/parallel/test-listen-fd-cluster.js @@ -7,63 +7,62 @@ var PORT = common.PORT; var spawn = require('child_process').spawn; var cluster = require('cluster'); -console.error('Cluster listen fd test', process.argv.slice(2)); +console.error('Cluster listen fd test', process.argv[2] || 'runner'); if (common.isWindows) { console.log('1..0 # Skipped: This test is disabled on windows.'); return; } +// Process relationship is: +// +// parent: the test main script +// -> master: the cluster master +// -> worker: the cluster worker switch (process.argv[2]) { case 'master': return master(); case 'worker': return worker(); case 'parent': return parent(); - default: return test(); } +var ok; + +process.on('exit', function() { + assert.ok(ok); +}); + // spawn the parent, and listen for it to tell us the pid of the cluster. // WARNING: This is an example of listening on some arbitrary FD number // that has already been bound elsewhere in advance. However, binding // server handles to stdio fd's is NOT a good or reliable way to do // concurrency in HTTP servers! Use the cluster module, or if you want // a more low-level approach, use child process IPC manually. -function test() { - var parent = spawn(process.execPath, [__filename, 'parent'], { - stdio: [ 0, 'pipe', 2 ] - }); - var json = ''; - parent.stdout.on('data', function(c) { - json += c.toString(); - if (json.indexOf('\n') !== -1) next(); - }); - function next() { - console.error('output from parent = %s', json); - var cluster = JSON.parse(json); - // now make sure that we can request to the worker, then kill it. - http.get({ - server: 'localhost', - port: PORT, - path: '/', - }).on('response', function(res) { - var s = ''; - res.on('data', function(c) { - s += c.toString(); - }); - res.on('end', function() { - // kill the worker before we start doing asserts. - // it's really annoying when tests leave orphans! - parent.kill(); - process.kill(cluster.master, 'SIGKILL'); - +test(function(parent) { + // now make sure that we can request to the worker, then kill it. + http.get({ + server: 'localhost', + port: PORT, + path: '/', + }).on('response', function(res) { + var s = ''; + res.on('data', function(c) { + s += c.toString(); + }); + res.on('end', function() { + // kill the worker before we start doing asserts. + // it's really annoying when tests leave orphans! + parent.kill(); + parent.on('exit', function() { assert.equal(s, 'hello from worker\n'); assert.equal(res.statusCode, 200); console.log('ok'); + ok = true; }); }); - } -} + }); +}); -function parent() { +function test(cb) { console.error('about to listen in parent'); var server = net.createServer(function(conn) { console.error('connection on parent'); @@ -73,7 +72,7 @@ function parent() { var spawn = require('child_process').spawn; var master = spawn(process.execPath, [__filename, 'master'], { - stdio: [ 0, 1, 2, server._handle ], + stdio: [ 0, 'pipe', 2, server._handle, 'ipc' ], detached: true }); @@ -90,6 +89,11 @@ function parent() { console.error('master closed'); }); console.error('master spawned'); + master.on('message', function(msg) { + if (msg === 'started worker') { + cb(master); + } + }); }); } @@ -99,7 +103,17 @@ function master() { args: [ 'worker' ] }); var worker = cluster.fork(); - console.log('%j\n', { master: process.pid, worker: worker.pid }); + worker.on('message', function(msg) { + if (msg === 'worker ready') { + process.send('started worker'); + } + }); + // Prevent outliving our parent process in case it is abnormally killed - + // under normal conditions our parent kills this process before exiting. + process.on('disconnect', function() { + console.error('master exit on disconnect'); + process.exit(0); + }); } @@ -112,5 +126,6 @@ function worker() { res.end('hello from worker\n'); }).listen({ fd: 3 }, function() { console.error('worker listening on fd=3'); + process.send('worker ready'); }); } diff --git a/test/parallel/test-listen-fd-server.js b/test/parallel/test-listen-fd-server.js index d4d11e5a8d9..d51d51ee8eb 100644 --- a/test/parallel/test-listen-fd-server.js +++ b/test/parallel/test-listen-fd-server.js @@ -13,54 +13,50 @@ if (common.isWindows) { switch (process.argv[2]) { case 'child': return child(); - case 'parent': return parent(); - default: return test(); } -// spawn the parent, and listen for it to tell us the pid of the child. +var ok; + +process.on('exit', function() { + assert.ok(ok); +}); + // WARNING: This is an example of listening on some arbitrary FD number // that has already been bound elsewhere in advance. However, binding // server handles to stdio fd's is NOT a good or reliable way to do // concurrency in HTTP servers! Use the cluster module, or if you want // a more low-level approach, use child process IPC manually. -function test() { - var parent = spawn(process.execPath, [__filename, 'parent'], { - stdio: [ 0, 'pipe', 2 ] - }); - var json = ''; - parent.stdout.on('data', function(c) { - json += c.toString(); - if (json.indexOf('\n') !== -1) next(); - }); - function next() { - console.error('output from parent = %s', json); - var child = JSON.parse(json); - // now make sure that we can request to the child, then kill it. - http.get({ - server: 'localhost', - port: PORT, - path: '/', - }).on('response', function(res) { - var s = ''; - res.on('data', function(c) { - s += c.toString(); - }); - res.on('end', function() { - // kill the child before we start doing asserts. - // it's really annoying when tests leave orphans! - process.kill(child.pid, 'SIGKILL'); - try { - parent.kill(); - } catch (e) {} - +test(function(child) { + // now make sure that we can request to the child, then kill it. + http.get({ + server: 'localhost', + port: PORT, + path: '/', + }).on('response', function(res) { + var s = ''; + res.on('data', function(c) { + s += c.toString(); + }); + res.on('end', function() { + child.kill(); + child.on('exit', function() { assert.equal(s, 'hello from child\n'); assert.equal(res.statusCode, 200); + console.log('ok'); + ok = true; }); }); - } -} + }); +}); function child() { + // Prevent outliving the parent process in case it is terminated before + // killing this child process. + process.on('disconnect', function() { + console.error('exit on disconnect'); + process.exit(0); + }); + // start a server on fd=3 http.createServer(function(req, res) { console.error('request on child'); @@ -68,10 +64,11 @@ function child() { res.end('hello from child\n'); }).listen({ fd: 3 }, function() { console.error('child listening on fd=3'); + process.send('listening'); }); } -function parent() { +function test(cb) { var server = net.createServer(function(conn) { console.error('connection on parent'); conn.end('hello from parent\n'); @@ -80,7 +77,7 @@ function parent() { var spawn = require('child_process').spawn; var child = spawn(process.execPath, [__filename, 'child'], { - stdio: [ 0, 1, 2, server._handle ] + stdio: [ 0, 1, 2, server._handle, 'ipc' ] }); console.log('%j\n', { pid: child.pid }); @@ -90,13 +87,10 @@ function parent() { // be accepted, because the child has the fd open. server.close(); - child.on('exit', function(code) { - console.error('child exited', code); + child.on('message', function(msg) { + if (msg === 'listening') { + cb(child); + } }); - - child.on('close', function() { - console.error('child closed'); - }); - console.error('child spawned'); }); } From e83a41ad655a3205933dbd97b79a56e8608e3ae3 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 7 Aug 2015 18:12:44 -0700 Subject: [PATCH 006/214] tls: introduce internal `onticketkeycallback` `enableTicketKeyCallback` and `onticketkeycallback` could be potentially used to renew the TLS Session Tickets before they expire. However this commit will introduce it only for private use yet, because we are not sure about the API, and already need this feature for testing. See: https://github.com/nodejs/io.js/issues/2304 PR-URL: https://github.com/nodejs/io.js/pull/2312 Reviewed-By: Shigeki Ohtsu --- src/env.h | 1 + src/node_crypto.cc | 104 +++++++++++++++++++++++++++++++++++++++++++++ src/node_crypto.h | 16 +++++++ 3 files changed, 121 insertions(+) diff --git a/src/env.h b/src/env.h index 501c1511221..bf80881907e 100644 --- a/src/env.h +++ b/src/env.h @@ -198,6 +198,7 @@ namespace node { V(syscall_string, "syscall") \ V(tick_callback_string, "_tickCallback") \ V(tick_domain_cb_string, "_tickDomainCallback") \ + V(ticketkeycallback_string, "onticketkeycallback") \ V(timeout_string, "timeout") \ V(times_string, "times") \ V(timestamp_string, "timestamp") \ diff --git a/src/node_crypto.cc b/src/node_crypto.cc index c14f2b600c6..e33b249242e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -300,9 +300,23 @@ void SecureContext::Initialize(Environment* env, Handle target) { env->SetProtoMethod(t, "getTicketKeys", SecureContext::GetTicketKeys); env->SetProtoMethod(t, "setTicketKeys", SecureContext::SetTicketKeys); env->SetProtoMethod(t, "setFreeListLength", SecureContext::SetFreeListLength); + env->SetProtoMethod(t, + "enableTicketKeyCallback", + SecureContext::EnableTicketKeyCallback); env->SetProtoMethod(t, "getCertificate", SecureContext::GetCertificate); env->SetProtoMethod(t, "getIssuer", SecureContext::GetCertificate); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kTicketKeyReturnIndex"), + Integer::NewFromUnsigned(env->isolate(), kTicketKeyReturnIndex)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kTicketKeyHMACIndex"), + Integer::NewFromUnsigned(env->isolate(), kTicketKeyHMACIndex)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kTicketKeyAESIndex"), + Integer::NewFromUnsigned(env->isolate(), kTicketKeyAESIndex)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kTicketKeyNameIndex"), + Integer::NewFromUnsigned(env->isolate(), kTicketKeyNameIndex)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kTicketKeyIVIndex"), + Integer::NewFromUnsigned(env->isolate(), kTicketKeyIVIndex)); + t->PrototypeTemplate()->SetAccessor( FIXED_ONE_BYTE_STRING(env->isolate(), "_external"), CtxGetter, @@ -378,6 +392,7 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { } sc->ctx_ = SSL_CTX_new(method); + SSL_CTX_set_app_data(sc->ctx_, sc); // Disable SSLv2 in the case when method == SSLv23_method() and the // cipher list contains SSLv2 ciphers (not the default, should be rare.) @@ -982,6 +997,95 @@ void SecureContext::SetFreeListLength(const FunctionCallbackInfo& args) { } +void SecureContext::EnableTicketKeyCallback( + const FunctionCallbackInfo& args) { + SecureContext* wrap = Unwrap(args.Holder()); + + SSL_CTX_set_tlsext_ticket_key_cb(wrap->ctx_, TicketKeyCallback); +} + + +int SecureContext::TicketKeyCallback(SSL* ssl, + unsigned char* name, + unsigned char* iv, + EVP_CIPHER_CTX* ectx, + HMAC_CTX* hctx, + int enc) { + static const int kTicketPartSize = 16; + + SecureContext* sc = static_cast( + SSL_CTX_get_app_data(ssl->ctx)); + + Environment* env = sc->env(); + HandleScope handle_scope(env->isolate()); + Context::Scope context_scope(env->context()); + + Local argv[] = { + Buffer::New(env, + reinterpret_cast(name), + kTicketPartSize).ToLocalChecked(), + Buffer::New(env, + reinterpret_cast(iv), + kTicketPartSize).ToLocalChecked(), + Boolean::New(env->isolate(), enc != 0) + }; + Local ret = node::MakeCallback(env, + sc->object(), + env->ticketkeycallback_string(), + ARRAY_SIZE(argv), + argv); + Local arr = ret.As(); + + int r = arr->Get(kTicketKeyReturnIndex)->Int32Value(); + if (r < 0) + return r; + + Local hmac = arr->Get(kTicketKeyHMACIndex); + Local aes = arr->Get(kTicketKeyAESIndex); + if (Buffer::Length(aes) != kTicketPartSize) + return -1; + + if (enc) { + Local name_val = arr->Get(kTicketKeyNameIndex); + Local iv_val = arr->Get(kTicketKeyIVIndex); + + if (Buffer::Length(name_val) != kTicketPartSize || + Buffer::Length(iv_val) != kTicketPartSize) { + return -1; + } + + memcpy(name, Buffer::Data(name_val), kTicketPartSize); + memcpy(iv, Buffer::Data(iv_val), kTicketPartSize); + } + + HMAC_Init_ex(hctx, + Buffer::Data(hmac), + Buffer::Length(hmac), + EVP_sha256(), + nullptr); + + const unsigned char* aes_key = + reinterpret_cast(Buffer::Data(aes)); + if (enc) { + EVP_EncryptInit_ex(ectx, + EVP_aes_128_cbc(), + nullptr, + aes_key, + iv); + } else { + EVP_DecryptInit_ex(ectx, + EVP_aes_128_cbc(), + nullptr, + aes_key, + iv); + } + + return r; +} + + + + void SecureContext::CtxGetter(Local property, const PropertyCallbackInfo& info) { HandleScope scope(info.GetIsolate()); diff --git a/src/node_crypto.h b/src/node_crypto.h index 3a00b519323..edacaa1b009 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -68,6 +68,13 @@ class SecureContext : public BaseObject { static const int kMaxSessionSize = 10 * 1024; + // See TicketKeyCallback + static const int kTicketKeyReturnIndex = 0; + static const int kTicketKeyHMACIndex = 1; + static const int kTicketKeyAESIndex = 2; + static const int kTicketKeyNameIndex = 3; + static const int kTicketKeyIVIndex = 4; + protected: static const int64_t kExternalSize = sizeof(SSL_CTX); @@ -92,12 +99,21 @@ class SecureContext : public BaseObject { static void SetTicketKeys(const v8::FunctionCallbackInfo& args); static void SetFreeListLength( const v8::FunctionCallbackInfo& args); + static void EnableTicketKeyCallback( + const v8::FunctionCallbackInfo& args); static void CtxGetter(v8::Local property, const v8::PropertyCallbackInfo& info); template static void GetCertificate(const v8::FunctionCallbackInfo& args); + static int TicketKeyCallback(SSL* ssl, + unsigned char* name, + unsigned char* iv, + EVP_CIPHER_CTX* ectx, + HMAC_CTX* hctx, + int enc); + SecureContext(Environment* env, v8::Local wrap) : BaseObject(env, wrap), ca_store_(nullptr), From 94b765f409b72bbac7514dc62097b5fa588037ab Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 7 Aug 2015 18:14:54 -0700 Subject: [PATCH 007/214] tls: fix check for reused session When TLS Session Ticket is renewed by server - no Certificate record is to the client. We are prepared for empty certificate in this case, but this relies on the session reuse check, which was implemented incorrectly and was returning false when the TLS Session Ticket was renewed. Use session reuse check provided by OpenSSL instead. Fix: https://github.com/nodejs/io.js/issues/2304 PR-URL: https://github.com/nodejs/io.js/pull/2312 Reviewed-By: Shigeki Ohtsu --- lib/_tls_wrap.js | 13 +---- .../parallel/test-https-resume-after-renew.js | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 test/parallel/test-https-resume-after-renew.js diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 182346904c9..b5d1899480b 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -584,17 +584,6 @@ TLSSocket.prototype._start = function() { this._handle.start(); }; -TLSSocket.prototype._isSessionResumed = function _isSessionResumed(session) { - if (!session) - return false; - - var next = this.getSession(); - if (!next) - return false; - - return next.equals(session); -}; - TLSSocket.prototype.setServername = function(name) { this._handle.setServername(name); }; @@ -1011,7 +1000,7 @@ exports.connect = function(/* [port, host], options, cb */) { // Verify that server's identity matches it's certificate's names // Unless server has resumed our existing session - if (!verifyError && !socket._isSessionResumed(options.session)) { + if (!verifyError && !socket.isSessionReused()) { var cert = socket.getPeerCertificate(); verifyError = options.checkServerIdentity(hostname, cert); } diff --git a/test/parallel/test-https-resume-after-renew.js b/test/parallel/test-https-resume-after-renew.js new file mode 100644 index 00000000000..23626ccb40c --- /dev/null +++ b/test/parallel/test-https-resume-after-renew.js @@ -0,0 +1,56 @@ +'use strict'; +var common = require('../common'); +var fs = require('fs'); +var https = require('https'); +var crypto = require('crypto'); + +var options = { + key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), + cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'), + ca: fs.readFileSync(common.fixturesDir + '/keys/ca1-cert.pem') +}; + +var server = https.createServer(options, function(req, res) { + res.end('hello'); +}); + +var aes = new Buffer(16); +aes.fill('S'); +var hmac = new Buffer(16); +hmac.fill('H'); + +server._sharedCreds.context.enableTicketKeyCallback(); +server._sharedCreds.context.onticketkeycallback = function(name, iv, enc) { + if (enc) { + var newName = new Buffer(16); + var newIV = crypto.randomBytes(16); + newName.fill('A'); + } else { + // Renew + return [ 2, hmac, aes ]; + } + + return [ 1, hmac, aes, newName, newIV ]; +}; + +server.listen(common.PORT, function() { + var addr = this.address(); + + function doReq(callback) { + https.request({ + method: 'GET', + port: addr.port, + servername: 'agent1', + ca: options.ca + }, function(res) { + res.resume(); + res.once('end', callback); + }).end(); + } + + doReq(function() { + doReq(function() { + server.close(); + }); + }); +}); From 7606bdb89720b65af32073c6470393d158fe580a Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Wed, 10 Jun 2015 04:25:04 -0400 Subject: [PATCH 008/214] util: display constructor when inspecting objects This commit modifies util.inspect(obj) to additionally show the name of the function that constructed the object. This often reveals useful information about the object's prototype. In other words, instead of > new Cls {} we have > new Cls Cls {} This also works with exotic objects: > class ArrayCls extends Array {} > new ArrayCls(1, 2, 3) ArrayCls [ 1, 2, 3 ] The names of "trivial" constructors like Object and Array are not shown, unless there is a mismatch between the object representation and the prototype: > Object.create([]) Array {} This feature is inspired by browser devtools. PR-URL: https://github.com/nodejs/io.js/pull/1935 Reviewed-By: Roman Reiss Reviewed-By: Jeremiah Senkpiel --- lib/util.js | 31 ++++++++++++++++++--- test/parallel/test-sys.js | 2 +- test/parallel/test-util-inspect.js | 43 +++++++++++++++++++++++++++++- 3 files changed, 71 insertions(+), 5 deletions(-) diff --git a/lib/util.js b/lib/util.js index 136a66a6c1c..c5d7bea7db3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -167,6 +167,22 @@ function arrayToHash(array) { } +function getConstructorOf(obj) { + while (obj) { + var descriptor = Object.getOwnPropertyDescriptor(obj, 'constructor'); + if (descriptor !== undefined && + typeof descriptor.value === 'function' && + descriptor.value.name !== '') { + return descriptor.value; + } + + obj = Object.getPrototypeOf(obj); + } + + return null; +} + + function inspectPromise(p) { Debug = Debug || require('vm').runInDebugContext('Debug'); var mirror = Debug.MakeMirror(p, true); @@ -260,14 +276,17 @@ function formatValue(ctx, value, recurseTimes) { } } + var constructor = getConstructorOf(value); var base = '', empty = false, braces, formatter; if (Array.isArray(value)) { + if (constructor === Array) + constructor = null; braces = ['[', ']']; empty = value.length === 0; formatter = formatArray; } else if (value instanceof Set) { - braces = ['Set {', '}']; + braces = ['{', '}']; // With `showHidden`, `length` will display as a hidden property for // arrays. For consistency's sake, do the same for `size`, even though this // property isn't selected by Object.getOwnPropertyNames(). @@ -276,7 +295,7 @@ function formatValue(ctx, value, recurseTimes) { empty = value.size === 0; formatter = formatSet; } else if (value instanceof Map) { - braces = ['Map {', '}']; + braces = ['{', '}']; // Ditto. if (ctx.showHidden) keys.unshift('size'); @@ -286,9 +305,11 @@ function formatValue(ctx, value, recurseTimes) { // Only create a mirror if the object superficially looks like a Promise. var promiseInternals = value instanceof Promise && inspectPromise(value); if (promiseInternals) { - braces = ['Promise {', '}']; + braces = ['{', '}']; formatter = formatPromise; } else { + if (constructor === Object) + constructor = null; braces = ['{', '}']; empty = true; // No other data than keys. formatter = formatObject; @@ -336,6 +357,10 @@ function formatValue(ctx, value, recurseTimes) { base = ' ' + '[Boolean: ' + formatted + ']'; } + // Add constructor name if available + if (base === '' && constructor) + braces[0] = constructor.name + ' ' + braces[0]; + if (empty === true) { return braces[0] + base + braces[1]; } diff --git a/test/parallel/test-sys.js b/test/parallel/test-sys.js index bbc8c092002..9367e55c687 100644 --- a/test/parallel/test-sys.js +++ b/test/parallel/test-sys.js @@ -17,7 +17,7 @@ assert.equal(new Date('2010-02-14T12:48:40+01:00').toString(), assert.equal("'\\n\\u0001'", common.inspect('\n\u0001')); assert.equal('[]', common.inspect([])); -assert.equal('{}', common.inspect(Object.create([]))); +assert.equal('Array {}', common.inspect(Object.create([]))); assert.equal('[ 1, 2 ]', common.inspect([1, 2])); assert.equal('[ 1, [ 2, 3 ] ]', common.inspect([1, [2, 3]])); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index f583005ce96..fcde1c74c39 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -61,7 +61,7 @@ assert.ok(ex.indexOf('[message]') != -1); // GH-1941 // should not throw: -assert.equal(util.inspect(Object.create(Date.prototype)), '{}'); +assert.equal(util.inspect(Object.create(Date.prototype)), 'Date {}'); // GH-1944 assert.doesNotThrow(function() { @@ -306,3 +306,44 @@ checkAlignment(function() { }()); checkAlignment(new Set(big_array)); checkAlignment(new Map(big_array.map(function(y) { return [y, null]; }))); + + +// Test display of constructors + +class ObjectSubclass {} +class ArraySubclass extends Array {} +class SetSubclass extends Set {} +class MapSubclass extends Map {} +class PromiseSubclass extends Promise {} + +var x = new ObjectSubclass(); +x.foo = 42; +assert.equal(util.inspect(x), + 'ObjectSubclass { foo: 42 }'); +assert.equal(util.inspect(new ArraySubclass(1, 2, 3)), + 'ArraySubclass [ 1, 2, 3 ]'); +assert.equal(util.inspect(new SetSubclass([1, 2, 3])), + 'SetSubclass { 1, 2, 3 }'); +assert.equal(util.inspect(new MapSubclass([['foo', 42]])), + 'MapSubclass { \'foo\' => 42 }'); +assert.equal(util.inspect(new PromiseSubclass(function() {})), + 'PromiseSubclass { }'); + +// Corner cases. +var x = { constructor: 42 }; +assert.equal(util.inspect(x), '{ constructor: 42 }'); + +var x = {}; +Object.defineProperty(x, 'constructor', { + get: function() { + throw new Error('should not access constructor'); + }, + enumerable: true +}); +assert.equal(util.inspect(x), '{ constructor: [Getter] }'); + +var x = new (function() {}); +assert.equal(util.inspect(x), '{}'); + +var x = Object.create(null); +assert.equal(util.inspect(x), '{}'); From 07a88b0c8b0ae678d4eac365716d23678d63fa64 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Sat, 8 Aug 2015 23:56:08 -0600 Subject: [PATCH 009/214] build: update manifest to include Windows 10 Windows 10 wasn't listed in the executable manifest. This caused problems with trying to detect Windows 10 via `os.release()`. PR-URL: https://github.com/nodejs/io.js/pull/2332 Reviewed-By: Roman Reiss --- src/res/node.exe.extra.manifest | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/res/node.exe.extra.manifest b/src/res/node.exe.extra.manifest index c4cc80a141d..e2e9f175473 100644 --- a/src/res/node.exe.extra.manifest +++ b/src/res/node.exe.extra.manifest @@ -2,6 +2,8 @@ + + From 7118b8a882a719280a5d99ee793190f8168aa7c9 Mon Sep 17 00:00:00 2001 From: Nathan Woltman Date: Fri, 31 Jul 2015 17:47:49 -0400 Subject: [PATCH 010/214] path: remove dead code in favor of unit tests Remove dead code paths that are created by assertions that will never trigger. They may only trigger if either the `splitDeviceRe` or `splitPathRe` regular expressions are modified. If at some point they are modified, current unit tests will catch most of the resulting errors and this commit adds extra tests to catch the remaining errors. PR-URL: https://github.com/nodejs/io.js/pull/2282 Reviewed-By: Roman Reiss --- lib/path.js | 12 +----------- test/parallel/test-path-parse-format.js | 13 +++++++++---- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/lib/path.js b/lib/path.js index e0c5bcaa1c1..78c61579ec0 100644 --- a/lib/path.js +++ b/lib/path.js @@ -76,7 +76,7 @@ function win32SplitPath(filename) { // Separate device+slash from tail var result = splitDeviceRe.exec(filename), device = (result[1] || '') + (result[2] || ''), - tail = result[3] || ''; + tail = result[3]; // Split the tail into dir, basename and extension var result2 = splitTailRe.exec(tail), dir = result2[1], @@ -386,9 +386,6 @@ win32.parse = function(pathString) { assertPath(pathString); var allParts = win32SplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } return { root: allParts[0], dir: allParts[0] + allParts[1].slice(0, -1), @@ -590,13 +587,6 @@ posix.parse = function(pathString) { assertPath(pathString); var allParts = posixSplitPath(pathString); - if (!allParts || allParts.length !== 4) { - throw new TypeError("Invalid path '" + pathString + "'"); - } - allParts[1] = allParts[1] || ''; - allParts[2] = allParts[2] || ''; - allParts[3] = allParts[3] || ''; - return { root: allParts[0], dir: allParts[0] + allParts[1].slice(0, -1), diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js index 677bf3241f0..e90fe217de9 100644 --- a/test/parallel/test-path-parse-format.js +++ b/test/parallel/test-path-parse-format.js @@ -9,6 +9,7 @@ var winPaths = [ '\\foo\\C:', 'file', '.\\file', + '', // unc '\\\\server\\share\\file_path', @@ -32,7 +33,8 @@ var unixPaths = [ 'file', '.\\file', './file', - 'C:\\foo' + 'C:\\foo', + '' ]; var unixSpecialCaseFormatTests = [ @@ -52,8 +54,6 @@ var errors = [ message: /Path must be a string. Received 1/}, {method: 'parse', input: [], message: /Path must be a string. Received undefined/}, - // {method: 'parse', input: [''], - // message: /Invalid path/}, // omitted because it's hard to trigger! {method: 'format', input: [null], message: /Parameter 'pathObject' must be an object, not/}, {method: 'format', input: [''], @@ -93,8 +93,13 @@ function checkErrors(path) { } function checkParseFormat(path, paths) { - paths.forEach(function(element, index, array) { + paths.forEach(function(element) { var output = path.parse(element); + assert.strictEqual(typeof output.root, 'string'); + assert.strictEqual(typeof output.dir, 'string'); + assert.strictEqual(typeof output.base, 'string'); + assert.strictEqual(typeof output.ext, 'string'); + assert.strictEqual(typeof output.name, 'string'); assert.strictEqual(path.format(output), element); assert.strictEqual(output.dir, output.dir ? path.dirname(element) : ''); assert.strictEqual(output.base, path.basename(element)); From cc46d3bca3234c2f593e438dd46912937c06a885 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 25 Jun 2015 18:54:25 -0700 Subject: [PATCH 011/214] test: clarify dropMembership() call According to docs, dropMembership() is automatically called by the kernel when the socket is closed, and most apps will never need to call it. It's called here as a sanity check only so let's note that with a comment. Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis PR-URL: https://github.com/nodejs/io.js/pull/2062 --- test/internet/test-dgram-multicast-multi-process.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/internet/test-dgram-multicast-multi-process.js b/test/internet/test-dgram-multicast-multi-process.js index 05acb844e54..34db38331dc 100644 --- a/test/internet/test-dgram-multicast-multi-process.js +++ b/test/internet/test-dgram-multicast-multi-process.js @@ -3,7 +3,6 @@ var common = require('../common'), assert = require('assert'), dgram = require('dgram'), util = require('util'), - assert = require('assert'), Buffer = require('buffer').Buffer, fork = require('child_process').fork, LOCAL_BROADCAST_HOST = '224.0.0.114', @@ -183,10 +182,9 @@ if (process.argv[2] === 'child') { process.send({ message: buf.toString() }); if (receivedMessages.length == messages.length) { + // .dropMembership() not strictly needed but here as a sanity check listenSocket.dropMembership(LOCAL_BROADCAST_HOST); - - process.nextTick(function() { // TODO should be changed to below. - // listenSocket.dropMembership(LOCAL_BROADCAST_HOST, function() { + process.nextTick(function() { listenSocket.close(); }); } From ccf12df4f3b94a07c6b9c51cedba9b237f50d3ef Mon Sep 17 00:00:00 2001 From: Roman Klauke Date: Tue, 11 Aug 2015 20:06:41 +0200 Subject: [PATCH 012/214] src: add total_available_size to v8 statistics v8 introduced the new flag `total_available_size` in version 4.4 and upwards. This flag is now available on `v8.getHeapStatistics` with the name `total_available_size`. It contains the total available heap size of v8. Introduced with commit: v8/v8-git-mirror@0a1352a7 PR-URL: https://github.com/nodejs/io.js/pull/2348 Reviewed-By: Ben Noordhuis --- doc/api/v8.markdown | 1 + lib/v8.js | 2 ++ src/node_v8.cc | 5 +++-- test/parallel/test-v8-stats.js | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/api/v8.markdown b/doc/api/v8.markdown index cedd5c86d9b..4caf6ebcd44 100644 --- a/doc/api/v8.markdown +++ b/doc/api/v8.markdown @@ -15,6 +15,7 @@ Returns an object with the following properties total_heap_size: 7326976, total_heap_size_executable: 4194304, total_physical_size: 7326976, + total_available_size: 1152656, used_heap_size: 3476208, heap_size_limit: 1535115264 } diff --git a/lib/v8.js b/lib/v8.js index f25814bab31..acadfa64e06 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -22,6 +22,7 @@ const heapStatisticsBuffer = const kTotalHeapSizeIndex = v8binding.kTotalHeapSizeIndex; const kTotalHeapSizeExecutableIndex = v8binding.kTotalHeapSizeExecutableIndex; const kTotalPhysicalSizeIndex = v8binding.kTotalPhysicalSizeIndex; +const kTotalAvailableSize = v8binding.kTotalAvailableSize; const kUsedHeapSizeIndex = v8binding.kUsedHeapSizeIndex; const kHeapSizeLimitIndex = v8binding.kHeapSizeLimitIndex; @@ -34,6 +35,7 @@ exports.getHeapStatistics = function() { 'total_heap_size': buffer[kTotalHeapSizeIndex], 'total_heap_size_executable': buffer[kTotalHeapSizeExecutableIndex], 'total_physical_size': buffer[kTotalPhysicalSizeIndex], + 'total_available_size': buffer[kTotalAvailableSize], 'used_heap_size': buffer[kUsedHeapSizeIndex], 'heap_size_limit': buffer[kHeapSizeLimitIndex] }; diff --git a/src/node_v8.cc b/src/node_v8.cc index 0a3e6e76338..db492e3d1a5 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -26,8 +26,9 @@ using v8::Value; V(0, total_heap_size, kTotalHeapSizeIndex) \ V(1, total_heap_size_executable, kTotalHeapSizeExecutableIndex) \ V(2, total_physical_size, kTotalPhysicalSizeIndex) \ - V(3, used_heap_size, kUsedHeapSizeIndex) \ - V(4, heap_size_limit, kHeapSizeLimitIndex) + V(3, total_available_size, kTotalAvailableSize) \ + V(4, used_heap_size, kUsedHeapSizeIndex) \ + V(5, heap_size_limit, kHeapSizeLimitIndex) #define V(a, b, c) +1 static const size_t kHeapStatisticsPropertiesCount = diff --git a/test/parallel/test-v8-stats.js b/test/parallel/test-v8-stats.js index e48c1d70365..fc4a6df30f8 100644 --- a/test/parallel/test-v8-stats.js +++ b/test/parallel/test-v8-stats.js @@ -6,6 +6,7 @@ var v8 = require('v8'); var s = v8.getHeapStatistics(); var keys = [ 'heap_size_limit', + 'total_available_size', 'total_heap_size', 'total_heap_size_executable', 'total_physical_size', From e51f90d747d4a501b6cdd4abea11155f2b2b4442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Mon, 27 Jul 2015 17:39:04 +0100 Subject: [PATCH 013/214] test: option to run a subset of tests With this option, tests can be divided in groups and only one is run from each group. This enables us to parallelize the tests across multiple machines. PR-URL: https://github.com/nodejs/io.js/pull/2260 Reviewed-By: Ben Noordhuis Reviewed-By: Rod Vagg Reviewed-By: Alexis Campailla --- tools/test.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tools/test.py b/tools/test.py index 7e9ef3d6e03..43d349d49a8 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1272,6 +1272,9 @@ def BuildOptions(): result.add_option("--no-store-unexpected-output", help="Deletes the temporary JS files from tests that fails", dest="store_unexpected_output", action="store_false") + result.add_option("-r", "--run", + help="Divide the tests in m groups (interleaved) and run tests from group n (--run=n,m with n < m)", + default="") return result @@ -1280,6 +1283,24 @@ def ProcessOptions(options): VERBOSE = options.verbose options.arch = options.arch.split(',') options.mode = options.mode.split(',') + options.run = options.run.split(',') + if options.run == [""]: + options.run = None + elif len(options.run) != 2: + print "The run argument must be two comma-separated integers." + return False + else: + try: + options.run = map(int, options.run) + except ValueError: + print "Could not parse the integers from the run argument." + return False + if options.run[0] < 0 or options.run[1] < 0: + print "The run argument cannot have negative integers." + return False + if options.run[0] >= options.run[1]: + print "The test group to run (n) must be smaller than number of groups (m)." + return False if options.J: options.j = multiprocessing.cpu_count() return True @@ -1486,6 +1507,15 @@ def Main(): def DoSkip(case): return SKIP in case.outcomes or SLOW in case.outcomes cases_to_run = [ c for c in all_cases if not DoSkip(c) ] + if options.run is not None: + # Must ensure the list of tests is sorted before selecting, to avoid + # silent errors if this file is changed to list the tests in a way that + # can be different in different machines + cases_to_run.sort(key=lambda c: (c.case.arch, c.case.mode, c.case.file)) + cases_to_run = [ cases_to_run[i] for i + in xrange(options.run[0], + len(cases_to_run), + options.run[1]) ] if len(cases_to_run) == 0: print "No tests to run." return 1 From 071640abdd94fec81550940429c763099e93a03f Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 3 Aug 2015 12:44:06 -0700 Subject: [PATCH 014/214] build: Intl: bump ICU4C from 54 to 55 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit node was using ICU4C 54 ( released 2014-oct-06 ) * Bump to ICU4C 55 ( released 2015-apr-08) * Timezone fixes, translation fixes, bug/performance fixes. * Speed improvements in date formatting * ICU4C 55 changelog: http://site.icu-project.org/download/55 * CLDR 27 changelog: http://cldr.unicode.org/index/downloads/cldr-27 * Retarget the file exclusions from ICU4C 54 to ICU4C 55 * (improves on-disk footprint on some platforms) Reviewed-By: João Reis Reviewed-By: Johan Bergström Fixes: https://github.com/nodejs/node/issues/2292 PR-URL: https://github.com/nodejs/node/pull/2293 --- configure | 6 +++--- tools/icu/icu-generic.gyp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index f01aea6f927..5cb3e7a19b8 100755 --- a/configure +++ b/configure @@ -796,9 +796,9 @@ def glob_to_var(dir_base, dir_sub): def configure_intl(o): icus = [ { - 'url': 'http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.zip', - # from https://ssl.icu-project.org/files/icu4c/54.1/icu4c-src-54_1.md5: - 'md5': '6b89d60e2f0e140898ae4d7f72323bca', + 'url': 'http://download.icu-project.org/files/icu4c/55.1/icu4c-55_1-src.zip', + # from https://ssl.icu-project.org/files/icu4c/55.1/icu4c-src-55_1.md5: + 'md5': '4cddf1e1d47622fdd9de2cd7bb5001fd', }, ] def icu_download(path): diff --git a/tools/icu/icu-generic.gyp b/tools/icu/icu-generic.gyp index bb2b5e5e4d5..900cdb96f0a 100644 --- a/tools/icu/icu-generic.gyp +++ b/tools/icu/icu-generic.gyp @@ -111,8 +111,8 @@ '<@(icu_src_i18n)' ], 'conditions': [ - [ 'icu_ver_major == 54', { 'sources!': [ - ## Strip out the following for ICU 54 only. + [ 'icu_ver_major == 55', { 'sources!': [ + ## Strip out the following for ICU 55 only. ## add more conditions in the future? ## if your compiler can dead-strip, this will ## make ZERO difference to binary size. @@ -369,8 +369,8 @@ '<@(icu_src_common)', ], 'conditions': [ - [ 'icu_ver_major == 54', { 'sources!': [ - ## Strip out the following for ICU 54 only. + [ 'icu_ver_major == 55', { 'sources!': [ + ## Strip out the following for ICU 55 only. ## add more conditions in the future? ## if your compiler can dead-strip, this will ## make ZERO difference to binary size. From 1f12e03266b626a8b7b5ac1889414e6faf963f67 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 13 Aug 2015 08:30:01 -0700 Subject: [PATCH 015/214] build: intl: converge from joyent/node * turn on small-icu by default for builds (Makefile+Windows) * add license info from ICU http://source.icu-project.org/repos/icu/icu/trunk/license.html All text pasted. Long lines wrapped. (original is HTML.) Port from joyent/node of: * https://github.com/nodejs/node/issues/26 * port of joyent/node 67f87a743dee4951374dd240c25e31cd507e6c5f * https://github.com/joyent/node/pull/9038 * Merge from joyent/node 70d04e7f35667381aa6e9d76f56ea962c019d5bc * Merge from joyent/node 6168fe6720650052728f3e78a495b723f0b41ce3 * merge from joyent/node e67073256d847be085be7049cd1d6ebd8d86ac62 PR-URL: https://github.com/nodejs/node/pull/2264 Reviewed-By: James M Snell Reviewed-By: Rod Vagg Fixes: https://github.com/nodejs/node/issues/238 --- LICENSE | 385 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 11 +- vcbuild.bat | 15 +- 3 files changed, 407 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index f493fde3613..7d215a0717d 100644 --- a/LICENSE +++ b/LICENSE @@ -657,3 +657,388 @@ The externally maintained libraries used by io.js are: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ + +- ICU's license follows: + From http://source.icu-project.org/repos/icu/icu/trunk/license.html + """ + ICU License - ICU 1.8.1 and later + + COPYRIGHT AND PERMISSION NOTICE + + Copyright (c) 1995-2014 International Business Machines Corporation and others + + All rights reserved. + + 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, and/or sell copies of the + Software, and to permit persons to whom the Software is furnished + to do so, provided that the above copyright notice(s) and this + permission notice appear in all copies of the Software and that + both the above copyright notice(s) and this permission notice + appear in supporting documentation. + + 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 OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE + COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR + ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR + ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in this Software without prior written + authorization of the copyright holder. + + All trademarks and registered trademarks mentioned herein are the + property of their respective owners. + + Third-Party Software Licenses + + This section contains third-party software notices and/or + additional terms for licensed third-party software components + included within ICU libraries. + + 1. Unicode Data Files and Software + COPYRIGHT AND PERMISSION NOTICE + + Copyright © 1991-2014 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in + http://www.unicode.org/copyright.html. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation + (the "Data Files") or Unicode software and any associated documentation + (the "Software") to deal in the Data Files or Software + without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, and/or sell copies of + the Data Files or Software, and to permit persons to whom the Data Files + or Software are furnished to do so, provided that + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, + (b) this copyright and permission notice appear in associated + documentation, and + (c) there is clear notice in each modified Data File or in the Software + as well as in the documentation associated with the Data File(s) or + Software that the data or software has been modified. + + THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THE DATA FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without prior + written authorization of the copyright holder. + + 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) + # The Google Chrome software developed by Google is licensed + # under the BSD license. Other software included in this distribution + # is provided under other licenses, as set forth below. + # + # The BSD License + # http://opensource.org/licenses/bsd-license.php + # Copyright (C) 2006-2008, Google Inc. + # + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided with + # the distribution. + # Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # + # The word list in cjdict.txt are generated by combining three + word lists listed + # below with further processing for compound word breaking. The + frequency is generated + # with an iterative training against Google web corpora. + # + # * Libtabe (Chinese) + # - https://sourceforge.net/project/?group_id=1519 + # - Its license terms and conditions are shown below. + # + # * IPADIC (Japanese) + # - http://chasen.aist-nara.ac.jp/chasen/distribution.html + # - Its license terms and conditions are shown below. + # + # ---------COPYING.libtabe ---- BEGIN-------------------- + # + # /* + # * Copyrighy (c) 1999 TaBE Project. + # * Copyright (c) 1999 Pai-Hsiang Hsiao. + # * All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the TaBE Project nor the names of its + # * contributors may be used to endorse or promote products derived + # * from this software without specific prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # /* + # * Copyright (c) 1999 Computer Systems and Communication Lab, + # * Institute of Information Science, Academia Sinica. + # * All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the Computer Systems and Communication Lab + # * nor the names of its contributors may be used to endorse or + # * promote products derived from this software without specific + # * prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois + # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 + # + # ---------------COPYING.libtabe-----END------------------------------------ + # + # + # ---------------COPYING.ipadic-----BEGIN------------------------------------ + # + # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science + # and Technology. All Rights Reserved. + # + # Use, reproduction, and distribution of this software is permitted. + # Any copy of this software, whether in its original form or modified, + # must include both the above copyright notice and the following + # paragraphs. + # + # Nara Institute of Science and Technology (NAIST), + # the copyright holders, disclaims all warranties with regard to this + # software, including all implied warranties of merchantability and + # fitness, in no event shall NAIST be liable for + # any special, indirect or consequential damages or any damages + # whatsoever resulting from loss of use, data or profits, whether in an + # action of contract, negligence or other tortuous action, arising out + # of or in connection with the use or performance of this software. + # + # A large portion of the dictionary entries + # originate from ICOT Free Software. The following conditions for ICOT + # Free Software applies to the current dictionary as well. + # + # Each User may also freely distribute the Program, whether in its + # original form or modified, to any third party or parties, PROVIDED + # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear + # on, or be attached to, the Program, which is distributed substantially + # in the same form as set out herein and that such intended + # distribution, if actually made, will neither violate or otherwise + # contravene any of the laws and regulations of the countries having + # jurisdiction over the User or the intended distribution itself. + # + # NO WARRANTY + # + # The program was produced on an experimental basis in the course of the + # research and development conducted during the project and is provided + # to users as so produced on an experimental basis. Accordingly, the + # program is provided without any warranty whatsoever, whether express, + # implied, statutory or otherwise. The term "warranty" used herein + # includes, but is not limited to, any warranty of the quality, + # performance, merchantability and fitness for a particular purpose of + # the program and the nonexistence of any infringement or violation of + # any right of any third party. + # + # Each user of the program will agree and understand, and be deemed to + # have agreed and understood, that there is no warranty whatsoever for + # the program and, accordingly, the entire risk arising from or + # otherwise connected with the program is assumed by the user. + # + # Therefore, neither ICOT, the copyright holder, or any other + # organization that participated in or was otherwise related to the + # development of the program and their respective officials, directors, + # officers and other employees shall be held liable for any and all + # damages, including, without limitation, general, special, incidental + # and consequential damages, arising out of or otherwise in connection + # with the use or inability to use the program or any product, material + # or result produced or otherwise obtained by using the program, + # regardless of whether they have been advised of, or otherwise had + # knowledge of, the possibility of such damages at any time during the + # project or thereafter. Each user will be deemed to have agreed to the + # foregoing by his or her commencement of use of the program. The term + # "use" as used herein includes, but is not limited to, the use, + # modification, copying and distribution of the program and the + # production of secondary products from the program. + # + # In the case where the program, whether in its original form or + # modified, was distributed or delivered to or received by a user from + # any person, organization or entity other than ICOT, unless it makes or + # grants independently of ICOT any specific warranty to the user in + # writing, such person, organization or entity, will also be exempted + # from and not be held liable to the user for any such damages as noted + # above as far as the program is concerned. + # + # ---------------COPYING.ipadic-----END------------------------------------ + + 3. Lao Word Break Dictionary Data (laodict.txt) + # Copyright (c) 2013 International Business Machines Corporation + # and others. All Rights Reserved. + # + # Project: http://code.google.com/p/lao-dictionary/ + # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt + # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt + # (copied below) + # + # This file is derived from the above dictionary, with slight modifications. + # -------------------------------------------------------------------------------- + # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without modification, + # are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, this + # list of conditions and the following disclaimer. Redistributions in binary + # form must reproduce the above copyright notice, this list of conditions and + # the following disclaimer in the documentation and/or other materials + # provided with the distribution. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # -------------------------------------------------------------------------------- + + 4. Burmese Word Break Dictionary Data (burmesedict.txt) + # Copyright (c) 2014 International Business Machines Corporation + # and others. All Rights Reserved. + # + # This list is part of a project hosted at: + # github.com/kanyawtech/myanmar-karen-word-lists + # + # -------------------------------------------------------------------------------- + # Copyright (c) 2013, LeRoy Benjamin Sharon + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without modification, + # are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, this + # list of conditions and the following disclaimer. + # + # Redistributions in binary form must reproduce the above copyright notice, this + # list of conditions and the following disclaimer in the documentation and/or + # other materials provided with the distribution. + # + # Neither the name Myanmar Karen Word Lists, nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # -------------------------------------------------------------------------------- + + 5. Time Zone Database + ICU uses the public domain data and code derived from Time Zone + Database for its time zone support. The ownership of the TZ + database is explained in BCP 175: Procedure for Maintaining the + Time Zone Database section 7. + + 7. Database Ownership + + The TZ database itself is not an IETF Contribution or an IETF + document. Rather it is a pre-existing and regularly updated work + that is in the public domain, and is intended to remain in the public + domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do not apply + to the TZ Database or contributions that individuals make to it. + Should any claims be made and substantiated against the TZ Database, + the organization that is providing the IANA Considerations defined in + this RFC, under the memorandum of understanding with the IETF, + currently ICANN, may act in accordance with all competent court + orders. No ownership claims will be made by ICANN or the IETF Trust + on the database or the code. Any person making a contribution to the + database or code waives all rights to future claims in that + contribution or in the TZ Database. + """ diff --git a/Makefile b/Makefile index aa29e2bc06d..286b6180a66 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,11 @@ NODE ?= ./iojs$(EXEEXT) NODE_EXE = iojs$(EXEEXT) NODE_G_EXE = iojs_g$(EXEEXT) +# Flags for packaging. +BUILD_DOWNLOAD_FLAGS ?= --download=all +BUILD_INTL_FLAGS ?= --with-intl=small-icu +BUILD_RELEASE_FLAGS ?= $(BUILD_DOWNLOAD_FLAGS) $(BUILD_INTL_FLAGS) + # Default to verbose builds. # To do quiet/pretty builds, run `make V=` to set V to an empty string, # or set the V environment variable to an empty string. @@ -302,7 +307,7 @@ $(PKG): release-only --dest-cpu=x64 \ --tag=$(TAG) \ --release-urlbase=$(RELEASE_URLBASE) \ - $(CONFIG_FLAGS) + $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) $(MAKE) install V=$(V) DESTDIR=$(PKGDIR) SIGN="$(CODESIGN_CERT)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh cat tools/osx-pkg.pmdoc/index.xml.tmpl \ @@ -363,7 +368,7 @@ $(TARBALL)-headers: config.gypi release-only --dest-cpu=$(DESTCPU) \ --tag=$(TAG) \ --release-urlbase=$(RELEASE_URLBASE) \ - $(CONFIG_FLAGS) + $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) HEADERS_ONLY=1 $(PYTHON) tools/install.py install '$(TARNAME)' '/' find $(TARNAME)/ -type l | xargs rm # annoying on windows tar -cf $(TARNAME)-headers.tar $(TARNAME) @@ -393,7 +398,7 @@ $(BINARYTAR): release-only --dest-cpu=$(DESTCPU) \ --tag=$(TAG) \ --release-urlbase=$(RELEASE_URLBASE) \ - $(CONFIG_FLAGS) + $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS) $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1 cp README.md $(BINARYNAME) cp LICENSE $(BINARYNAME) diff --git a/vcbuild.bat b/vcbuild.bat index 44dfb634d78..23dc4282a3a 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -38,6 +38,7 @@ set download_arg= set release_urls_arg= :next-arg +set build_release= if "%1"=="" goto args-done if /i "%1"=="debug" set config=Debug&goto arg-ok if /i "%1"=="release" set config=Release&goto arg-ok @@ -61,7 +62,9 @@ if /i "%1"=="test-internet" set test_args=%test_args% internet&goto arg-ok if /i "%1"=="test-pummel" set test_args=%test_args% pummel&goto arg-ok if /i "%1"=="test-all" set test_args=%test_args% sequential parallel message gc internet pummel&set buildnodeweak=1&set jslint=1&goto arg-ok if /i "%1"=="jslint" set jslint=1&goto arg-ok -if /i "%1"=="msi" set msi=1&set licensertf=1&goto arg-ok +@rem Include small-icu support with MSI installer +if /i "%1"=="msi" set msi=1&set licensertf=1&set download_arg="--download=all"&set i18n_arg=small-icu&goto arg-ok +if /i "%1"=="build-release" set build_release=1&goto arg-ok if /i "%1"=="upload" set upload=1&goto arg-ok if /i "%1"=="small-icu" set i18n_arg=%1&goto arg-ok if /i "%1"=="full-icu" set i18n_arg=%1&goto arg-ok @@ -74,6 +77,15 @@ echo Warning: ignoring invalid command line option `%1`. :arg-ok shift goto next-arg +if defined build_release ( + set nosnapshot=1 + set config=Release + set msi=1 + set licensertf=1 + set download_arg="--download=all" + set i18n_arg=small-icu +) + :args-done if "%config%"=="Debug" set debug_arg=--debug @@ -224,6 +236,7 @@ echo vcbuild.bat test : builds debug build and runs tests goto exit :exit +echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org goto :EOF rem *************** From bff9bcddb69450a0f5bdafc70a3f89e95c1631ad Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 7 Aug 2015 23:03:00 +0200 Subject: [PATCH 016/214] src: plug memory leaks In a few places dynamic memory was passed to the Buffer::New() overload that makes a copy of the input, not the one that takes ownership. This commit is a band-aid to fix the memory leaks. Longer term, we should look into using C++11 move semantics more effectively. Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny Reviewed-By: Trevor Norris --- src/node_buffer.h | 5 +++++ src/node_crypto.cc | 6 +++--- src/stream_wrap.cc | 2 +- src/udp_wrap.cc | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/node_buffer.h b/src/node_buffer.h index 5b935b8c063..f7c88f60e03 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -67,12 +67,17 @@ static inline bool IsWithinBounds(size_t off, size_t len, size_t max) { // in src/node_internals.h because of a circular dependency. #if defined(NODE_WANT_INTERNALS) v8::MaybeLocal New(Environment* env, size_t size); +// Makes a copy of |data|. v8::MaybeLocal New(Environment* env, const char* data, size_t len); +// Takes ownership of |data|. v8::MaybeLocal New(Environment* env, char* data, size_t length, FreeCallback callback, void* hint); +// Takes ownership of |data|. Must allocate |data| with malloc() or realloc() +// because ArrayBufferAllocator::Free() deallocates it again with free(). +// Mixing operator new and free() is undefined behavior so don't do that. v8::MaybeLocal Use(Environment* env, char* data, size_t length); #endif // defined(NODE_WANT_INTERNALS) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index e33b249242e..4e649e10688 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4477,7 +4477,7 @@ void ECDH::ComputeSecret(const FunctionCallbackInfo& args) { return env->ThrowError("Failed to compute ECDH key"); } - Local buf = Buffer::New(env, out, out_len).ToLocalChecked(); + Local buf = Buffer::Use(env, out, out_len).ToLocalChecked(); args.GetReturnValue().Set(buf); } @@ -4542,7 +4542,7 @@ void ECDH::GetPrivateKey(const FunctionCallbackInfo& args) { } Local buf = - Buffer::New(env, reinterpret_cast(out), size).ToLocalChecked(); + Buffer::Use(env, reinterpret_cast(out), size).ToLocalChecked(); args.GetReturnValue().Set(buf); } @@ -4945,7 +4945,7 @@ void RandomBytesCheck(RandomBytesRequest* req, Local argv[2]) { size_t size; req->return_memory(&data, &size); argv[0] = Null(req->env()->isolate()); - argv[1] = Buffer::New(req->env(), data, size).ToLocalChecked(); + argv[1] = Buffer::Use(req->env(), data, size).ToLocalChecked(); } } diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index ae941f5edbd..3097eac4859 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -223,7 +223,7 @@ void StreamWrap::OnReadImpl(ssize_t nread, CHECK_EQ(pending, UV_UNKNOWN_HANDLE); } - Local obj = Buffer::New(env, base, nread).ToLocalChecked(); + Local obj = Buffer::Use(env, base, nread).ToLocalChecked(); wrap->EmitData(nread, obj, pending_obj); } diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index dd3958ec0e3..791ef76848c 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -408,7 +408,7 @@ void UDPWrap::OnRecv(uv_udp_t* handle, } char* base = static_cast(realloc(buf->base, nread)); - argv[2] = Buffer::New(env, base, nread).ToLocalChecked(); + argv[2] = Buffer::Use(env, base, nread).ToLocalChecked(); argv[3] = AddressToJS(env, addr); wrap->MakeCallback(env->onmessage_string(), ARRAY_SIZE(argv), argv); } From 5586ceca1329c31363df1bcdbbc137980eda5b0a Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 13 Aug 2015 13:29:28 +0200 Subject: [PATCH 017/214] src: move internal functions out of node_buffer.h The circular dependency problem that put them there in the first place is no longer an issue. Move them out of the public node_buffer.h header and into the private node_internals.h header. Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny Reviewed-By: Trevor Norris --- src/node_buffer.h | 22 ---------------------- src/node_internals.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/node_buffer.h b/src/node_buffer.h index f7c88f60e03..49fb5741640 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -4,10 +4,6 @@ #include "node.h" #include "v8.h" -#if defined(NODE_WANT_INTERNALS) -#include "env.h" -#endif // defined(NODE_WANT_INTERNALS) - namespace node { namespace Buffer { @@ -63,24 +59,6 @@ static inline bool IsWithinBounds(size_t off, size_t len, size_t max) { return true; } -// Internal. Not for public consumption. We can't define these -// in src/node_internals.h because of a circular dependency. -#if defined(NODE_WANT_INTERNALS) -v8::MaybeLocal New(Environment* env, size_t size); -// Makes a copy of |data|. -v8::MaybeLocal New(Environment* env, const char* data, size_t len); -// Takes ownership of |data|. -v8::MaybeLocal New(Environment* env, - char* data, - size_t length, - FreeCallback callback, - void* hint); -// Takes ownership of |data|. Must allocate |data| with malloc() or realloc() -// because ArrayBufferAllocator::Free() deallocates it again with free(). -// Mixing operator new and free() is undefined behavior so don't do that. -v8::MaybeLocal Use(Environment* env, char* data, size_t length); -#endif // defined(NODE_WANT_INTERNALS) - } // namespace Buffer } // namespace node diff --git a/src/node_internals.h b/src/node_internals.h index c99b2feeb0b..aa4474becc1 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -272,6 +272,22 @@ class NodeInstanceData { DISALLOW_COPY_AND_ASSIGN(NodeInstanceData); }; +namespace Buffer { +v8::MaybeLocal New(Environment* env, size_t size); +// Makes a copy of |data|. +v8::MaybeLocal New(Environment* env, const char* data, size_t len); +// Takes ownership of |data|. +v8::MaybeLocal New(Environment* env, + char* data, + size_t length, + void (*callback)(char* data, void* hint), + void* hint); +// Takes ownership of |data|. Must allocate |data| with malloc() or realloc() +// because ArrayBufferAllocator::Free() deallocates it again with free(). +// Mixing operator new and free() is undefined behavior so don't do that. +v8::MaybeLocal Use(Environment* env, char* data, size_t length); +} // namespace Buffer + } // namespace node #endif // SRC_NODE_INTERNALS_H_ From fd63e1ce2b5883cb7a6425770b98435cb99df825 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 13 Aug 2015 13:47:18 +0200 Subject: [PATCH 018/214] src: introduce internal Buffer::Copy() function Rename the three argument overload of Buffer::New() to Buffer::Copy() and update the code base accordingly. The reason for renaming is to make it impossible to miss a call site. This coincidentally plugs a small memory leak in crypto.getAuthTag(). Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny Reviewed-By: Trevor Norris --- src/js_stream.cc | 2 +- src/node_buffer.cc | 6 +++--- src/node_crypto.cc | 34 ++++++++++++++++++---------------- src/node_internals.h | 3 +-- src/tls_wrap.cc | 2 +- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/js_stream.cc b/src/js_stream.cc index aa8de3a9ad9..16fabc9df34 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -90,7 +90,7 @@ int JSStream::DoWrite(WriteWrap* w, Local bufs_arr = Array::New(env()->isolate(), count); Local buf; for (size_t i = 0; i < count; i++) { - buf = Buffer::New(env(), bufs[i].base, bufs[i].len).ToLocalChecked(); + buf = Buffer::Copy(env(), bufs[i].base, bufs[i].len).ToLocalChecked(); bufs_arr->Set(i, buf); } diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 5ab599ebab9..5f68822fc83 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -281,13 +281,13 @@ MaybeLocal Copy(Isolate* isolate, const char* data, size_t length) { Environment* env = Environment::GetCurrent(isolate); EscapableHandleScope handle_scope(env->isolate()); Local obj; - if (Buffer::New(env, data, length).ToLocal(&obj)) + if (Buffer::Copy(env, data, length).ToLocal(&obj)) return handle_scope.Escape(obj); return Local(); } -MaybeLocal New(Environment* env, const char* data, size_t length) { +MaybeLocal Copy(Environment* env, const char* data, size_t length) { EscapableHandleScope scope(env->isolate()); // V8 currently only allows a maximum Typed Array index of max Smi. @@ -365,7 +365,7 @@ MaybeLocal New(Isolate* isolate, char* data, size_t length) { Environment* env = Environment::GetCurrent(isolate); EscapableHandleScope handle_scope(env->isolate()); Local obj; - if (Buffer::New(env, data, length).ToLocal(&obj)) + if (Buffer::Use(env, data, length).ToLocal(&obj)) return handle_scope.Escape(obj); return Local(); } diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 4e649e10688..fda1fad996d 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1021,12 +1021,12 @@ int SecureContext::TicketKeyCallback(SSL* ssl, Context::Scope context_scope(env->context()); Local argv[] = { - Buffer::New(env, - reinterpret_cast(name), - kTicketPartSize).ToLocalChecked(), - Buffer::New(env, - reinterpret_cast(iv), - kTicketPartSize).ToLocalChecked(), + Buffer::Copy(env, + reinterpret_cast(name), + kTicketPartSize).ToLocalChecked(), + Buffer::Copy(env, + reinterpret_cast(iv), + kTicketPartSize).ToLocalChecked(), Boolean::New(env->isolate(), enc != 0) }; Local ret = node::MakeCallback(env, @@ -1219,7 +1219,7 @@ int SSLWrap::NewSessionCallback(SSL* s, SSL_SESSION* sess) { memset(serialized, 0, size); i2d_SSL_SESSION(sess, &serialized); - Local session = Buffer::New( + Local session = Buffer::Copy( env, reinterpret_cast(sess->session_id), sess->session_id_length).ToLocalChecked(); @@ -1240,7 +1240,7 @@ void SSLWrap::OnClientHello(void* arg, Context::Scope context_scope(env->context()); Local hello_obj = Object::New(env->isolate()); - Local buff = Buffer::New( + Local buff = Buffer::Copy( env, reinterpret_cast(hello.session_id()), hello.session_size()).ToLocalChecked(); @@ -1701,7 +1701,7 @@ void SSLWrap::GetTLSTicket(const FunctionCallbackInfo& args) { if (sess == nullptr || sess->tlsext_tick == nullptr) return; - Local buff = Buffer::New( + Local buff = Buffer::Copy( env, reinterpret_cast(sess->tlsext_tick), sess->tlsext_ticklen).ToLocalChecked(); @@ -1983,7 +1983,7 @@ int SSLWrap::TLSExtStatusCallback(SSL* s, void* arg) { if (resp == nullptr) { arg = Null(env->isolate()); } else { - arg = Buffer::New( + arg = Buffer::Copy( env, reinterpret_cast(const_cast(resp)), len).ToLocalChecked(); @@ -2989,7 +2989,8 @@ bool CipherBase::GetAuthTag(char** out, unsigned int* out_len) const { if (initialised_ || kind_ != kCipher || !auth_tag_) return false; *out_len = auth_tag_len_; - *out = new char[auth_tag_len_]; + *out = static_cast(malloc(auth_tag_len_)); + CHECK_NE(*out, nullptr); memcpy(*out, auth_tag_, auth_tag_len_); return true; } @@ -3003,7 +3004,7 @@ void CipherBase::GetAuthTag(const FunctionCallbackInfo& args) { unsigned int out_len = 0; if (cipher->GetAuthTag(&out, &out_len)) { - Local buf = Buffer::New(env, out, out_len).ToLocalChecked(); + Local buf = Buffer::Use(env, out, out_len).ToLocalChecked(); args.GetReturnValue().Set(buf); } else { env->ThrowError("Attempting to get auth tag in unsupported state"); @@ -3120,8 +3121,9 @@ void CipherBase::Update(const FunctionCallbackInfo& args) { "Trying to add data in unsupported state"); } + CHECK(out != nullptr || out_len == 0); Local buf = - Buffer::New(env, reinterpret_cast(out), out_len).ToLocalChecked(); + Buffer::Copy(env, reinterpret_cast(out), out_len).ToLocalChecked(); if (out) delete[] out; @@ -3196,7 +3198,7 @@ void CipherBase::Final(const FunctionCallbackInfo& args) { } } - Local buf = Buffer::New( + Local buf = Buffer::Copy( env, reinterpret_cast(out_value), out_len).ToLocalChecked(); @@ -3978,7 +3980,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo& args) { } } - Local vbuf = Buffer::New( + Local vbuf = Buffer::Copy( env, reinterpret_cast(out_value), out_len).ToLocalChecked(); @@ -4515,7 +4517,7 @@ void ECDH::GetPublicKey(const FunctionCallbackInfo& args) { } Local buf = - Buffer::New(env, reinterpret_cast(out), size).ToLocalChecked(); + Buffer::Use(env, reinterpret_cast(out), size).ToLocalChecked(); args.GetReturnValue().Set(buf); } diff --git a/src/node_internals.h b/src/node_internals.h index aa4474becc1..f9068b650fb 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -273,9 +273,8 @@ class NodeInstanceData { }; namespace Buffer { +v8::MaybeLocal Copy(Environment* env, const char* data, size_t len); v8::MaybeLocal New(Environment* env, size_t size); -// Makes a copy of |data|. -v8::MaybeLocal New(Environment* env, const char* data, size_t len); // Takes ownership of |data|. v8::MaybeLocal New(Environment* env, char* data, diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index fc19a5ce0bb..fbb35fdb5e6 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -660,7 +660,7 @@ void TLSWrap::OnReadSelf(ssize_t nread, TLSWrap* wrap = static_cast(ctx); Local buf_obj; if (buf != nullptr) - buf_obj = Buffer::New(wrap->env(), buf->base, buf->len).ToLocalChecked(); + buf_obj = Buffer::Use(wrap->env(), buf->base, buf->len).ToLocalChecked(); wrap->EmitData(nread, buf_obj, Local()); } From 455ec570d17d02cfadcd79dbc361fa72b627c362 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 13 Aug 2015 13:53:39 +0200 Subject: [PATCH 019/214] src: rename Buffer::Use() to Buffer::New() Fixes: https://github.com/nodejs/node/issues/2308 PR-URL: https://github.com/nodejs/node/pull/2352 Reviewed-By: Fedor Indutny Reviewed-By: Trevor Norris --- src/node_buffer.cc | 4 ++-- src/node_crypto.cc | 10 +++++----- src/node_internals.h | 2 +- src/stream_wrap.cc | 2 +- src/tls_wrap.cc | 2 +- src/udp_wrap.cc | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 5f68822fc83..76a733311b0 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -365,13 +365,13 @@ MaybeLocal New(Isolate* isolate, char* data, size_t length) { Environment* env = Environment::GetCurrent(isolate); EscapableHandleScope handle_scope(env->isolate()); Local obj; - if (Buffer::Use(env, data, length).ToLocal(&obj)) + if (Buffer::New(env, data, length).ToLocal(&obj)) return handle_scope.Escape(obj); return Local(); } -MaybeLocal Use(Environment* env, char* data, size_t length) { +MaybeLocal New(Environment* env, char* data, size_t length) { EscapableHandleScope scope(env->isolate()); if (length > 0) { diff --git a/src/node_crypto.cc b/src/node_crypto.cc index fda1fad996d..bf24a9e48e4 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3004,7 +3004,7 @@ void CipherBase::GetAuthTag(const FunctionCallbackInfo& args) { unsigned int out_len = 0; if (cipher->GetAuthTag(&out, &out_len)) { - Local buf = Buffer::Use(env, out, out_len).ToLocalChecked(); + Local buf = Buffer::New(env, out, out_len).ToLocalChecked(); args.GetReturnValue().Set(buf); } else { env->ThrowError("Attempting to get auth tag in unsupported state"); @@ -4479,7 +4479,7 @@ void ECDH::ComputeSecret(const FunctionCallbackInfo& args) { return env->ThrowError("Failed to compute ECDH key"); } - Local buf = Buffer::Use(env, out, out_len).ToLocalChecked(); + Local buf = Buffer::New(env, out, out_len).ToLocalChecked(); args.GetReturnValue().Set(buf); } @@ -4517,7 +4517,7 @@ void ECDH::GetPublicKey(const FunctionCallbackInfo& args) { } Local buf = - Buffer::Use(env, reinterpret_cast(out), size).ToLocalChecked(); + Buffer::New(env, reinterpret_cast(out), size).ToLocalChecked(); args.GetReturnValue().Set(buf); } @@ -4544,7 +4544,7 @@ void ECDH::GetPrivateKey(const FunctionCallbackInfo& args) { } Local buf = - Buffer::Use(env, reinterpret_cast(out), size).ToLocalChecked(); + Buffer::New(env, reinterpret_cast(out), size).ToLocalChecked(); args.GetReturnValue().Set(buf); } @@ -4947,7 +4947,7 @@ void RandomBytesCheck(RandomBytesRequest* req, Local argv[2]) { size_t size; req->return_memory(&data, &size); argv[0] = Null(req->env()->isolate()); - argv[1] = Buffer::Use(req->env(), data, size).ToLocalChecked(); + argv[1] = Buffer::New(req->env(), data, size).ToLocalChecked(); } } diff --git a/src/node_internals.h b/src/node_internals.h index f9068b650fb..c68b7155b0c 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -284,7 +284,7 @@ v8::MaybeLocal New(Environment* env, // Takes ownership of |data|. Must allocate |data| with malloc() or realloc() // because ArrayBufferAllocator::Free() deallocates it again with free(). // Mixing operator new and free() is undefined behavior so don't do that. -v8::MaybeLocal Use(Environment* env, char* data, size_t length); +v8::MaybeLocal New(Environment* env, char* data, size_t length); } // namespace Buffer } // namespace node diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 3097eac4859..ae941f5edbd 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -223,7 +223,7 @@ void StreamWrap::OnReadImpl(ssize_t nread, CHECK_EQ(pending, UV_UNKNOWN_HANDLE); } - Local obj = Buffer::Use(env, base, nread).ToLocalChecked(); + Local obj = Buffer::New(env, base, nread).ToLocalChecked(); wrap->EmitData(nread, obj, pending_obj); } diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index fbb35fdb5e6..fc19a5ce0bb 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -660,7 +660,7 @@ void TLSWrap::OnReadSelf(ssize_t nread, TLSWrap* wrap = static_cast(ctx); Local buf_obj; if (buf != nullptr) - buf_obj = Buffer::Use(wrap->env(), buf->base, buf->len).ToLocalChecked(); + buf_obj = Buffer::New(wrap->env(), buf->base, buf->len).ToLocalChecked(); wrap->EmitData(nread, buf_obj, Local()); } diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 791ef76848c..dd3958ec0e3 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -408,7 +408,7 @@ void UDPWrap::OnRecv(uv_udp_t* handle, } char* base = static_cast(realloc(buf->base, nread)); - argv[2] = Buffer::Use(env, base, nread).ToLocalChecked(); + argv[2] = Buffer::New(env, base, nread).ToLocalChecked(); argv[3] = AddressToJS(env, addr); wrap->MakeCallback(env->onmessage_string(), ARRAY_SIZE(argv), argv); } From 3645dc62ed49c98e302e3be3ecc4bb404d3d632b Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 31 Jul 2015 16:25:15 -0700 Subject: [PATCH 020/214] build: work around VS2015 issue in ICU <56 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The particular ufile.c is from http://bugs.icu-project.org/trac/changeset/37704 and should be OK for ICU 54 and 55. Also, adds general mechanism for floating patches on top of ICU. Fixes: https://github.com/nodejs/node/issues/2279 PR-URL: https://github.com/nodejs/node/pull/2283 Reviewed-By: João Reis --- configure | 13 +- tools/icu/patches/54/source/io/ufile.c | 360 +++++++++++++++++++++++++ tools/icu/patches/55/source/io/ufile.c | 360 +++++++++++++++++++++++++ 3 files changed, 730 insertions(+), 3 deletions(-) create mode 100644 tools/icu/patches/54/source/io/ufile.c create mode 100644 tools/icu/patches/55/source/io/ufile.c diff --git a/configure b/configure index 5cb3e7a19b8..cd594d62788 100755 --- a/configure +++ b/configure @@ -781,7 +781,7 @@ def write(filename, data): do_not_edit = '# Do not edit. Generated by the configure script.\n' -def glob_to_var(dir_base, dir_sub): +def glob_to_var(dir_base, dir_sub, patch_dir): list = [] dir_all = os.path.join(dir_base, dir_sub) files = os.walk(dir_all) @@ -789,7 +789,14 @@ def glob_to_var(dir_base, dir_sub): (path, dirs, files) = ent for file in files: if file.endswith('.cpp') or file.endswith('.c') or file.endswith('.h'): - list.append('%s/%s' % (dir_sub, file)) + # srcfile uses "slash" as dir separator as its output is consumed by gyp + srcfile = '%s/%s' % (dir_sub, file) + if patch_dir: + patchfile = '%s/%s/%s' % (dir_base, patch_dir, file) + if os.path.isfile(patchfile): + srcfile = '%s/%s' % (patch_dir, file) + print 'Using version-specific floating patch %s' % patchfile + list.append(srcfile) break return list @@ -1011,7 +1018,7 @@ def configure_intl(o): for i in icu_src: var = 'icu_src_%s' % i path = '../../deps/icu/source/%s' % icu_src[i] - icu_config['variables'][var] = glob_to_var('tools/icu', path) + icu_config['variables'][var] = glob_to_var('tools/icu', path, 'patches/%s/source/%s' % (icu_ver_major, icu_src[i]) ) # write updated icu_config.gypi with a bunch of paths write(icu_config_name, do_not_edit + pprint.pformat(icu_config, indent=2) + '\n') diff --git a/tools/icu/patches/54/source/io/ufile.c b/tools/icu/patches/54/source/io/ufile.c new file mode 100644 index 00000000000..ab9f70a3d5c --- /dev/null +++ b/tools/icu/patches/54/source/io/ufile.c @@ -0,0 +1,360 @@ +/* +****************************************************************************** +* +* Copyright (C) 1998-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* File ufile.c +* +* Modification History: +* +* Date Name Description +* 11/19/98 stephen Creation. +* 03/12/99 stephen Modified for new C API. +* 06/16/99 stephen Changed T_LocaleBundle to u_locbund +* 07/19/99 stephen Fixed to use ucnv's default codepage. +****************************************************************************** +*/ + +/* + * fileno is not declared when building with GCC in strict mode. + */ +#if defined(__GNUC__) && defined(__STRICT_ANSI__) +#undef __STRICT_ANSI__ +#endif + +#include "locmap.h" +#include "unicode/ustdio.h" + +#if !UCONFIG_NO_CONVERSION + +#include "ufile.h" +#include "unicode/uloc.h" +#include "unicode/ures.h" +#include "unicode/ucnv.h" +#include "unicode/ustring.h" +#include "cstring.h" +#include "cmemory.h" + +#if U_PLATFORM_USES_ONLY_WIN32_API && !defined(fileno) +/* Windows likes to rename Unix-like functions */ +#define fileno _fileno +#endif + +static UFILE* +finit_owner(FILE *f, + const char *locale, + const char *codepage, + UBool takeOwnership + ) +{ + UErrorCode status = U_ZERO_ERROR; + UFILE *result; + if(f == NULL) { + return 0; + } + result = (UFILE*) uprv_malloc(sizeof(UFILE)); + if(result == NULL) { + return 0; + } + + uprv_memset(result, 0, sizeof(UFILE)); + result->fFileno = fileno(f); + +#if U_PLATFORM_USES_ONLY_WIN32_API && _MSC_VER < 1900 + /* + * Below is a very old workaround (ICU ticket:231). + * + * Previously, 'FILE*' from inside and outside ICU's DLL + * were different, because they pointed into local copies + * of the io block. At least by VS 2015 the implementation + * is something like: + * stdio = _acrt_iob_func(0) + * .. which is a function call, so should return the same pointer + * regardless of call site. + * As of _MSC_VER 1900 this patch is retired, at 16 years old. + */ + if (0 <= result->fFileno && result->fFileno <= 2) { + /* stdin, stdout and stderr need to be special cased for Windows 98 */ +#if _MSC_VER >= 1400 + result->fFile = &__iob_func()[_fileno(f)]; +#else + result->fFile = &_iob[_fileno(f)]; +#endif + } + else +#endif + { + result->fFile = f; + } + + result->str.fBuffer = result->fUCBuffer; + result->str.fPos = result->fUCBuffer; + result->str.fLimit = result->fUCBuffer; + +#if !UCONFIG_NO_FORMATTING + /* if locale is 0, use the default */ + if(u_locbund_init(&result->str.fBundle, locale) == 0) { + /* DO NOT FCLOSE HERE! */ + uprv_free(result); + return 0; + } +#endif + + /* If the codepage is not "" use the ucnv_open default behavior */ + if(codepage == NULL || *codepage != '\0') { + result->fConverter = ucnv_open(codepage, &status); + } + /* else result->fConverter is already memset'd to NULL. */ + + if(U_SUCCESS(status)) { + result->fOwnFile = takeOwnership; + } + else { +#if !UCONFIG_NO_FORMATTING + u_locbund_close(&result->str.fBundle); +#endif + /* DO NOT fclose here!!!!!! */ + uprv_free(result); + result = NULL; + } + + return result; +} + +U_CAPI UFILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_finit(FILE *f, + const char *locale, + const char *codepage) +{ + return finit_owner(f, locale, codepage, FALSE); +} + +U_CAPI UFILE* U_EXPORT2 +u_fadopt(FILE *f, + const char *locale, + const char *codepage) +{ + return finit_owner(f, locale, codepage, TRUE); +} + +U_CAPI UFILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fopen(const char *filename, + const char *perm, + const char *locale, + const char *codepage) +{ + UFILE *result; + FILE *systemFile = fopen(filename, perm); + if(systemFile == 0) { + return 0; + } + + result = finit_owner(systemFile, locale, codepage, TRUE); + + if (!result) { + /* Something bad happened. + Maybe the converter couldn't be opened. */ + fclose(systemFile); + } + + return result; /* not a file leak */ +} + +U_CAPI UFILE* U_EXPORT2 +u_fopen_u(const UChar *filename, + const char *perm, + const char *locale, + const char *codepage) +{ + UFILE *result; + char buffer[256]; + + u_austrcpy(buffer, filename); + + result = u_fopen(buffer, perm, locale, codepage); +#if U_PLATFORM_USES_ONLY_WIN32_API + /* Try Windows API _wfopen if the above fails. */ + if (!result) { + FILE *systemFile = _wfopen(filename, (UChar*)perm); + if (systemFile) { + result = finit_owner(systemFile, locale, codepage, TRUE); + } + if (!result) { + /* Something bad happened. + Maybe the converter couldn't be opened. */ + fclose(systemFile); + } + } +#endif + return result; /* not a file leak */ +} + +U_CAPI UFILE* U_EXPORT2 +u_fstropen(UChar *stringBuf, + int32_t capacity, + const char *locale) +{ + UFILE *result; + + if (capacity < 0) { + return NULL; + } + + result = (UFILE*) uprv_malloc(sizeof(UFILE)); + /* Null pointer test */ + if (result == NULL) { + return NULL; /* Just get out. */ + } + uprv_memset(result, 0, sizeof(UFILE)); + result->str.fBuffer = stringBuf; + result->str.fPos = stringBuf; + result->str.fLimit = stringBuf+capacity; + +#if !UCONFIG_NO_FORMATTING + /* if locale is 0, use the default */ + if(u_locbund_init(&result->str.fBundle, locale) == 0) { + /* DO NOT FCLOSE HERE! */ + uprv_free(result); + return 0; + } +#endif + + return result; +} + +U_CAPI UBool U_EXPORT2 +u_feof(UFILE *f) +{ + UBool endOfBuffer; + if (f == NULL) { + return TRUE; + } + endOfBuffer = (UBool)(f->str.fPos >= f->str.fLimit); + if (f->fFile != NULL) { + return endOfBuffer && feof(f->fFile); + } + return endOfBuffer; +} + +U_CAPI void U_EXPORT2 +u_fflush(UFILE *file) +{ + ufile_flush_translit(file); + ufile_flush_io(file); + if (file->fFile) { + fflush(file->fFile); + } + else if (file->str.fPos < file->str.fLimit) { + *(file->str.fPos++) = 0; + } + /* TODO: flush input */ +} + +U_CAPI void +u_frewind(UFILE *file) +{ + u_fflush(file); + ucnv_reset(file->fConverter); + if (file->fFile) { + rewind(file->fFile); + file->str.fLimit = file->fUCBuffer; + file->str.fPos = file->fUCBuffer; + } + else { + file->str.fPos = file->str.fBuffer; + } +} + +U_CAPI void U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fclose(UFILE *file) +{ + if (file) { + u_fflush(file); + ufile_close_translit(file); + + if(file->fOwnFile) + fclose(file->fFile); + +#if !UCONFIG_NO_FORMATTING + u_locbund_close(&file->str.fBundle); +#endif + + ucnv_close(file->fConverter); + uprv_free(file); + } +} + +U_CAPI FILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetfile( UFILE *f) +{ + return f->fFile; +} + +#if !UCONFIG_NO_FORMATTING + +U_CAPI const char* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetlocale( UFILE *file) +{ + return file->str.fBundle.fLocale; +} + +U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fsetlocale(UFILE *file, + const char *locale) +{ + u_locbund_close(&file->str.fBundle); + + return u_locbund_init(&file->str.fBundle, locale) == 0 ? -1 : 0; +} + +#endif + +U_CAPI const char* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetcodepage(UFILE *file) +{ + UErrorCode status = U_ZERO_ERROR; + const char *codepage = NULL; + + if (file->fConverter) { + codepage = ucnv_getName(file->fConverter, &status); + if(U_FAILURE(status)) + return 0; + } + return codepage; +} + +U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fsetcodepage( const char *codepage, + UFILE *file) +{ + UErrorCode status = U_ZERO_ERROR; + int32_t retVal = -1; + + /* We use the normal default codepage for this system, and not the one for the locale. */ + if ((file->str.fPos == file->str.fBuffer) && (file->str.fLimit == file->str.fBuffer)) { + ucnv_close(file->fConverter); + file->fConverter = ucnv_open(codepage, &status); + if(U_SUCCESS(status)) { + retVal = 0; + } + } + return retVal; +} + + +U_CAPI UConverter * U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetConverter(UFILE *file) +{ + return file->fConverter; +} +#if !UCONFIG_NO_FORMATTING +U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *file) +{ + return u_locbund_getNumberFormat(&file->str.fBundle, UNUM_DECIMAL); +} +#endif + +#endif diff --git a/tools/icu/patches/55/source/io/ufile.c b/tools/icu/patches/55/source/io/ufile.c new file mode 100644 index 00000000000..ab9f70a3d5c --- /dev/null +++ b/tools/icu/patches/55/source/io/ufile.c @@ -0,0 +1,360 @@ +/* +****************************************************************************** +* +* Copyright (C) 1998-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* File ufile.c +* +* Modification History: +* +* Date Name Description +* 11/19/98 stephen Creation. +* 03/12/99 stephen Modified for new C API. +* 06/16/99 stephen Changed T_LocaleBundle to u_locbund +* 07/19/99 stephen Fixed to use ucnv's default codepage. +****************************************************************************** +*/ + +/* + * fileno is not declared when building with GCC in strict mode. + */ +#if defined(__GNUC__) && defined(__STRICT_ANSI__) +#undef __STRICT_ANSI__ +#endif + +#include "locmap.h" +#include "unicode/ustdio.h" + +#if !UCONFIG_NO_CONVERSION + +#include "ufile.h" +#include "unicode/uloc.h" +#include "unicode/ures.h" +#include "unicode/ucnv.h" +#include "unicode/ustring.h" +#include "cstring.h" +#include "cmemory.h" + +#if U_PLATFORM_USES_ONLY_WIN32_API && !defined(fileno) +/* Windows likes to rename Unix-like functions */ +#define fileno _fileno +#endif + +static UFILE* +finit_owner(FILE *f, + const char *locale, + const char *codepage, + UBool takeOwnership + ) +{ + UErrorCode status = U_ZERO_ERROR; + UFILE *result; + if(f == NULL) { + return 0; + } + result = (UFILE*) uprv_malloc(sizeof(UFILE)); + if(result == NULL) { + return 0; + } + + uprv_memset(result, 0, sizeof(UFILE)); + result->fFileno = fileno(f); + +#if U_PLATFORM_USES_ONLY_WIN32_API && _MSC_VER < 1900 + /* + * Below is a very old workaround (ICU ticket:231). + * + * Previously, 'FILE*' from inside and outside ICU's DLL + * were different, because they pointed into local copies + * of the io block. At least by VS 2015 the implementation + * is something like: + * stdio = _acrt_iob_func(0) + * .. which is a function call, so should return the same pointer + * regardless of call site. + * As of _MSC_VER 1900 this patch is retired, at 16 years old. + */ + if (0 <= result->fFileno && result->fFileno <= 2) { + /* stdin, stdout and stderr need to be special cased for Windows 98 */ +#if _MSC_VER >= 1400 + result->fFile = &__iob_func()[_fileno(f)]; +#else + result->fFile = &_iob[_fileno(f)]; +#endif + } + else +#endif + { + result->fFile = f; + } + + result->str.fBuffer = result->fUCBuffer; + result->str.fPos = result->fUCBuffer; + result->str.fLimit = result->fUCBuffer; + +#if !UCONFIG_NO_FORMATTING + /* if locale is 0, use the default */ + if(u_locbund_init(&result->str.fBundle, locale) == 0) { + /* DO NOT FCLOSE HERE! */ + uprv_free(result); + return 0; + } +#endif + + /* If the codepage is not "" use the ucnv_open default behavior */ + if(codepage == NULL || *codepage != '\0') { + result->fConverter = ucnv_open(codepage, &status); + } + /* else result->fConverter is already memset'd to NULL. */ + + if(U_SUCCESS(status)) { + result->fOwnFile = takeOwnership; + } + else { +#if !UCONFIG_NO_FORMATTING + u_locbund_close(&result->str.fBundle); +#endif + /* DO NOT fclose here!!!!!! */ + uprv_free(result); + result = NULL; + } + + return result; +} + +U_CAPI UFILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_finit(FILE *f, + const char *locale, + const char *codepage) +{ + return finit_owner(f, locale, codepage, FALSE); +} + +U_CAPI UFILE* U_EXPORT2 +u_fadopt(FILE *f, + const char *locale, + const char *codepage) +{ + return finit_owner(f, locale, codepage, TRUE); +} + +U_CAPI UFILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fopen(const char *filename, + const char *perm, + const char *locale, + const char *codepage) +{ + UFILE *result; + FILE *systemFile = fopen(filename, perm); + if(systemFile == 0) { + return 0; + } + + result = finit_owner(systemFile, locale, codepage, TRUE); + + if (!result) { + /* Something bad happened. + Maybe the converter couldn't be opened. */ + fclose(systemFile); + } + + return result; /* not a file leak */ +} + +U_CAPI UFILE* U_EXPORT2 +u_fopen_u(const UChar *filename, + const char *perm, + const char *locale, + const char *codepage) +{ + UFILE *result; + char buffer[256]; + + u_austrcpy(buffer, filename); + + result = u_fopen(buffer, perm, locale, codepage); +#if U_PLATFORM_USES_ONLY_WIN32_API + /* Try Windows API _wfopen if the above fails. */ + if (!result) { + FILE *systemFile = _wfopen(filename, (UChar*)perm); + if (systemFile) { + result = finit_owner(systemFile, locale, codepage, TRUE); + } + if (!result) { + /* Something bad happened. + Maybe the converter couldn't be opened. */ + fclose(systemFile); + } + } +#endif + return result; /* not a file leak */ +} + +U_CAPI UFILE* U_EXPORT2 +u_fstropen(UChar *stringBuf, + int32_t capacity, + const char *locale) +{ + UFILE *result; + + if (capacity < 0) { + return NULL; + } + + result = (UFILE*) uprv_malloc(sizeof(UFILE)); + /* Null pointer test */ + if (result == NULL) { + return NULL; /* Just get out. */ + } + uprv_memset(result, 0, sizeof(UFILE)); + result->str.fBuffer = stringBuf; + result->str.fPos = stringBuf; + result->str.fLimit = stringBuf+capacity; + +#if !UCONFIG_NO_FORMATTING + /* if locale is 0, use the default */ + if(u_locbund_init(&result->str.fBundle, locale) == 0) { + /* DO NOT FCLOSE HERE! */ + uprv_free(result); + return 0; + } +#endif + + return result; +} + +U_CAPI UBool U_EXPORT2 +u_feof(UFILE *f) +{ + UBool endOfBuffer; + if (f == NULL) { + return TRUE; + } + endOfBuffer = (UBool)(f->str.fPos >= f->str.fLimit); + if (f->fFile != NULL) { + return endOfBuffer && feof(f->fFile); + } + return endOfBuffer; +} + +U_CAPI void U_EXPORT2 +u_fflush(UFILE *file) +{ + ufile_flush_translit(file); + ufile_flush_io(file); + if (file->fFile) { + fflush(file->fFile); + } + else if (file->str.fPos < file->str.fLimit) { + *(file->str.fPos++) = 0; + } + /* TODO: flush input */ +} + +U_CAPI void +u_frewind(UFILE *file) +{ + u_fflush(file); + ucnv_reset(file->fConverter); + if (file->fFile) { + rewind(file->fFile); + file->str.fLimit = file->fUCBuffer; + file->str.fPos = file->fUCBuffer; + } + else { + file->str.fPos = file->str.fBuffer; + } +} + +U_CAPI void U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fclose(UFILE *file) +{ + if (file) { + u_fflush(file); + ufile_close_translit(file); + + if(file->fOwnFile) + fclose(file->fFile); + +#if !UCONFIG_NO_FORMATTING + u_locbund_close(&file->str.fBundle); +#endif + + ucnv_close(file->fConverter); + uprv_free(file); + } +} + +U_CAPI FILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetfile( UFILE *f) +{ + return f->fFile; +} + +#if !UCONFIG_NO_FORMATTING + +U_CAPI const char* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetlocale( UFILE *file) +{ + return file->str.fBundle.fLocale; +} + +U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fsetlocale(UFILE *file, + const char *locale) +{ + u_locbund_close(&file->str.fBundle); + + return u_locbund_init(&file->str.fBundle, locale) == 0 ? -1 : 0; +} + +#endif + +U_CAPI const char* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetcodepage(UFILE *file) +{ + UErrorCode status = U_ZERO_ERROR; + const char *codepage = NULL; + + if (file->fConverter) { + codepage = ucnv_getName(file->fConverter, &status); + if(U_FAILURE(status)) + return 0; + } + return codepage; +} + +U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fsetcodepage( const char *codepage, + UFILE *file) +{ + UErrorCode status = U_ZERO_ERROR; + int32_t retVal = -1; + + /* We use the normal default codepage for this system, and not the one for the locale. */ + if ((file->str.fPos == file->str.fBuffer) && (file->str.fLimit == file->str.fBuffer)) { + ucnv_close(file->fConverter); + file->fConverter = ucnv_open(codepage, &status); + if(U_SUCCESS(status)) { + retVal = 0; + } + } + return retVal; +} + + +U_CAPI UConverter * U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_fgetConverter(UFILE *file) +{ + return file->fConverter; +} +#if !UCONFIG_NO_FORMATTING +U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *file) +{ + return u_locbund_getNumberFormat(&file->str.fBundle, UNUM_DECIMAL); +} +#endif + +#endif From d1307b2995c8ce05dbe35a279c75ed6f0e4c903f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 14 Aug 2015 01:56:30 +0200 Subject: [PATCH 021/214] src: don't use fopen() in require() fast path Fix a regression that was introduced in commit 1bbf8d0 ("lib: speed up require(), phase 2") where file paths with Unicode characters fail to load on Windows. Fixes: https://github.com/nodejs/node/issues/2236 PR-URL: https://github.com/nodejs/node/pull/2377 Reviewed-By: Bert Belder --- src/node_file.cc | 31 +++++++++++++++++++++------ test/parallel/test-require-unicode.js | 16 ++++++++++++++ 2 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 test/parallel/test-require-unicode.js diff --git a/src/node_file.cc b/src/node_file.cc index 0297b08e68d..5eacf9a68d1 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -442,31 +442,48 @@ Local BuildStatsObject(Environment* env, const uv_stat_t* s) { // comes from not creating Error objects on failure. static void InternalModuleReadFile(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + uv_loop_t* loop = env->event_loop(); CHECK(args[0]->IsString()); node::Utf8Value path(env->isolate(), args[0]); - FILE* const stream = fopen(*path, "rb"); - if (stream == nullptr) { + uv_fs_t open_req; + const int fd = uv_fs_open(loop, &open_req, *path, O_RDONLY, 0, nullptr); + uv_fs_req_cleanup(&open_req); + + if (fd < 0) { return; } std::vector chars; - while (!ferror(stream)) { + int64_t offset = 0; + for (;;) { const size_t kBlockSize = 32 << 10; const size_t start = chars.size(); chars.resize(start + kBlockSize); - const size_t numchars = fread(&chars[start], 1, kBlockSize, stream); - if (numchars < kBlockSize) { + + uv_buf_t buf; + buf.base = &chars[start]; + buf.len = kBlockSize; + + uv_fs_t read_req; + const ssize_t numchars = + uv_fs_read(loop, &read_req, fd, &buf, 1, offset, nullptr); + uv_fs_req_cleanup(&read_req); + + CHECK_GE(numchars, 0); + if (static_cast(numchars) < kBlockSize) { chars.resize(start + numchars); } if (numchars == 0) { break; } + offset += numchars; } - CHECK_EQ(false, ferror(stream)); - CHECK_EQ(0, fclose(stream)); + uv_fs_t close_req; + CHECK_EQ(0, uv_fs_close(loop, &close_req, fd, nullptr)); + uv_fs_req_cleanup(&close_req); size_t start = 0; if (chars.size() >= 3 && 0 == memcmp(&chars[0], "\xEF\xBB\xBF", 3)) { diff --git a/test/parallel/test-require-unicode.js b/test/parallel/test-require-unicode.js new file mode 100644 index 00000000000..0bccf06916c --- /dev/null +++ b/test/parallel/test-require-unicode.js @@ -0,0 +1,16 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); + +common.refreshTmpDir(); + +const dirname = path.join(common.tmpDir, '\u4e2d\u6587\u76ee\u5f55'); +fs.mkdirSync(dirname); +fs.writeFileSync(path.join(dirname, 'file.js'), 'module.exports = 42;'); +fs.writeFileSync(path.join(dirname, 'package.json'), + JSON.stringify({ name: 'test', main: 'file.js' })); +assert.equal(require(dirname), 42); +assert.equal(require(path.join(dirname, 'file.js')), 42); From 844d3f0e3e4f9e7c0b45f8fd7438e8a3609fb31c Mon Sep 17 00:00:00 2001 From: Sam Stites Date: Sat, 15 Aug 2015 10:07:07 -0700 Subject: [PATCH 022/214] path: use '===' instead of '==' for comparison Per: https://github.com/joyent/node/pull/7554 Originally submitted by @stites PR-URL: https://github.com/nodejs/node/pull/2388 Reviewed-By: Colin Ihrig Reviewed-By: Roman Reiss --- lib/path.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/path.js b/lib/path.js index 78c61579ec0..4bcb2b36720 100644 --- a/lib/path.js +++ b/lib/path.js @@ -277,7 +277,7 @@ win32.relative = function(from, to) { } } - if (samePartsLength == 0) { + if (samePartsLength === 0) { return to; } From a3160c0a33d726da8b6c9f6a8f0b23530a077704 Mon Sep 17 00:00:00 2001 From: muddletoes Date: Wed, 12 Nov 2014 13:42:34 -0500 Subject: [PATCH 023/214] test: correct spelling of 'childProcess' Per: https://github.com/joyent/node/pull/8715 Cleans up a minor spelling error in two tests. PR-URL: https://github.com/nodejs/node/pull/2389 Reviewed-By: Ben Noordhuis Reviewed-By: Roman Reiss --- test/sequential/test-stdin-from-file.js | 4 ++-- test/sequential/test-stdout-to-file.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/sequential/test-stdin-from-file.js b/test/sequential/test-stdin-from-file.js index 35aa5b1a89a..07b044769b3 100644 --- a/test/sequential/test-stdin-from-file.js +++ b/test/sequential/test-stdin-from-file.js @@ -2,7 +2,7 @@ var common = require('../common'); var assert = require('assert'); var join = require('path').join; -var childProccess = require('child_process'); +var childProcess = require('child_process'); var fs = require('fs'); var stdoutScript = join(common.fixturesDir, 'echo-close-check.js'); @@ -32,7 +32,7 @@ try { fs.writeFileSync(tmpFile, string); -childProccess.exec(cmd, function(err, stdout, stderr) { +childProcess.exec(cmd, function(err, stdout, stderr) { fs.unlinkSync(tmpFile); if (err) throw err; diff --git a/test/sequential/test-stdout-to-file.js b/test/sequential/test-stdout-to-file.js index 95374768836..41b61df4d72 100644 --- a/test/sequential/test-stdout-to-file.js +++ b/test/sequential/test-stdout-to-file.js @@ -2,7 +2,7 @@ var common = require('../common'); var assert = require('assert'); var path = require('path'); -var childProccess = require('child_process'); +var childProcess = require('child_process'); var fs = require('fs'); var scriptString = path.join(common.fixturesDir, 'print-chars.js'); @@ -26,7 +26,7 @@ function test(size, useBuffer, cb) { common.print(size + ' chars to ' + tmpFile + '...'); - childProccess.exec(cmd, function(err) { + childProcess.exec(cmd, function(err) { if (err) throw err; console.log('done!'); From b196c1da3c36c426009aa5d78c2356f79b09ce90 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 14 Aug 2015 10:12:16 +0200 Subject: [PATCH 024/214] src: fix memory leak in DLOpen PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis --- src/node.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/node.cc b/src/node.cc index c272139e551..e1ca866f869 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2124,6 +2124,7 @@ void DLOpen(const FunctionCallbackInfo& args) { if (is_dlopen_error) { Local errmsg = OneByteString(env->isolate(), uv_dlerror(&lib)); + uv_dlclose(&lib); #ifdef _WIN32 // Windows needs to add the filename into the error message errmsg = String::Concat(errmsg, args[1]->ToString(env->isolate())); @@ -2133,10 +2134,12 @@ void DLOpen(const FunctionCallbackInfo& args) { } if (mp == nullptr) { + uv_dlclose(&lib); env->ThrowError("Module did not self-register."); return; } if (mp->nm_version != NODE_MODULE_VERSION) { + uv_dlclose(&lib); char errmsg[1024]; snprintf(errmsg, sizeof(errmsg), @@ -2146,6 +2149,7 @@ void DLOpen(const FunctionCallbackInfo& args) { return; } if (mp->nm_flags & NM_F_BUILTIN) { + uv_dlclose(&lib); env->ThrowError("Built-in module self-registered."); return; } @@ -2162,6 +2166,7 @@ void DLOpen(const FunctionCallbackInfo& args) { } else if (mp->nm_register_func != nullptr) { mp->nm_register_func(exports, module, mp->nm_priv); } else { + uv_dlclose(&lib); env->ThrowError("Module has no declared entry point."); return; } From f45487cd6ef0118d2bace5973e19c9b4e44c7817 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 14 Aug 2015 14:23:00 +0200 Subject: [PATCH 025/214] crypto: fix memory leak in SetDHParam PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index bf24a9e48e4..07319df71ab 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -805,10 +805,12 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo& args) { return; const int keylen = BN_num_bits(dh->p); - if (keylen < 1024) + if (keylen < 1024) { + DH_free(dh); return env->ThrowError("DH parameter is less than 1024 bits"); - else if (keylen < 2048) + } else if (keylen < 2048) { fprintf(stderr, "WARNING: DH parameter is less than 2048 bits\n"); + } SSL_CTX_set_options(sc->ctx_, SSL_OP_SINGLE_DH_USE); int r = SSL_CTX_set_tmp_dh(sc->ctx_, dh); From a760a87803fe03ea94478eb480f471b31dca7450 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 14 Aug 2015 14:26:07 +0200 Subject: [PATCH 026/214] crypto: fix memory leak in SafeX509ExtPrint PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 07319df71ab..8a02d30e79b 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1297,6 +1297,7 @@ static bool SafeX509ExtPrint(BIO* out, X509_EXTENSION* ext) { if (nval == NULL) return false; X509V3_EXT_val_prn(out, nval, 0, 0); + sk_CONF_VALUE_pop_free(nval, X509V3_conf_free); } } sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free); From 6a16368611a25b6cac8fc3d0f4648ae787642b28 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 14 Aug 2015 14:28:39 +0200 Subject: [PATCH 027/214] crypto: fix memory leak in PublicKeyCipher::Cipher PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 8a02d30e79b..31f469286a7 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3931,6 +3931,8 @@ bool PublicKeyCipher::Cipher(const char* key_pem, fatal = false; exit: + if (x509 != nullptr) + X509_free(x509); if (pkey != nullptr) EVP_PKEY_free(pkey); if (bp != nullptr) From ba6eb8af1278773f620adc8cb1e2e1d15a3d3813 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 14 Aug 2015 14:30:52 +0200 Subject: [PATCH 028/214] crypto: fix memory leak in ECDH::SetPrivateKey PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 31f469286a7..090c908894e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4568,8 +4568,12 @@ void ECDH::SetPrivateKey(const FunctionCallbackInfo& args) { if (priv == nullptr) return env->ThrowError("Failed to convert Buffer to BN"); - if (!EC_KEY_set_private_key(ecdh->key_, priv)) + int result = EC_KEY_set_private_key(ecdh->key_, priv); + BN_free(priv); + + if (!result) { return env->ThrowError("Failed to convert BN to a private key"); + } } From 605f6ee904ca0b5c733a31e386a287a7b589b86b Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 14 Aug 2015 14:35:41 +0200 Subject: [PATCH 029/214] crypto: fix memory leak in PBKDF2Request PR-URL: https://github.com/nodejs/node/pull/2375 Reviewed-By: Ben Noordhuis --- src/node_crypto.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 090c908894e..c95e0fa31d7 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4622,6 +4622,7 @@ class PBKDF2Request : public AsyncWrap { } ~PBKDF2Request() override { + release(); persistent().Reset(); } @@ -4663,10 +4664,15 @@ class PBKDF2Request : public AsyncWrap { inline void release() { free(pass_); + pass_ = nullptr; passlen_ = 0; + free(salt_); + salt_ = nullptr; saltlen_ = 0; + free(key_); + key_ = nullptr; keylen_ = 0; } @@ -4737,7 +4743,6 @@ void EIO_PBKDF2After(uv_work_t* work_req, int status) { Local argv[2]; EIO_PBKDF2After(req, argv); req->MakeCallback(env->ondone_string(), ARRAY_SIZE(argv), argv); - req->release(); delete req; } @@ -4848,6 +4853,9 @@ void PBKDF2(const FunctionCallbackInfo& args) { Local argv[2]; EIO_PBKDF2(req); EIO_PBKDF2After(req, argv); + + delete req; + if (argv[0]->IsObject()) env->isolate()->ThrowException(argv[0]); else From fb0f5d733fe9d5713d5bb46ec1cad2200483ef90 Mon Sep 17 00:00:00 2001 From: Matt Loring Date: Tue, 30 Jun 2015 17:24:21 -0700 Subject: [PATCH 030/214] tools: run the tick processor without building v8 Currently, v8 native deps must be built in order to run the log processor on node profiling output. These scripts use node instead of d8 to remove this dependency. This change was originally proposed to the v8 team but since the changes are not v8 specific, we have moved the proposal here. See: https://codereview.chromium.org/1179173009/ PR-URL: https://github.com/nodejs/node/pull/2090 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Ben Noordhuis Reviewed-By: Fedor Indutny Reviewed-By: Jeremiah Senkpiel Reviewed-By: Trevor Norris --- test/parallel/test-tick-processor.js | 45 ++++++++++++ tools/v8-prof/linux-tick-processor | 23 ++++++ tools/v8-prof/mac-tick-processor | 7 ++ tools/v8-prof/polyfill.js | 92 ++++++++++++++++++++++++ tools/v8-prof/windows-tick-processor.bat | 19 +++++ 5 files changed, 186 insertions(+) create mode 100644 test/parallel/test-tick-processor.js create mode 100755 tools/v8-prof/linux-tick-processor create mode 100755 tools/v8-prof/mac-tick-processor create mode 100644 tools/v8-prof/polyfill.js create mode 100755 tools/v8-prof/windows-tick-processor.bat diff --git a/test/parallel/test-tick-processor.js b/test/parallel/test-tick-processor.js new file mode 100644 index 00000000000..ebcda79d679 --- /dev/null +++ b/test/parallel/test-tick-processor.js @@ -0,0 +1,45 @@ +'use strict'; +var fs = require('fs'); +var assert = require('assert'); +var path = require('path'); +var cp = require('child_process'); +var common = require('../common'); + +common.refreshTmpDir(); + +process.chdir(common.tmpDir); +cp.execFileSync(process.execPath, ['-prof', '-pe', + 'function foo(n) {' + + 'require(\'vm\').runInDebugContext(\'Debug\');' + + 'return n < 2 ? n : setImmediate(function() { foo(n-1) + foo(n-2);}); };' + + 'setTimeout(function() { process.exit(0); }, 2000);' + + 'foo(40);']); +var matches = fs.readdirSync(common.tmpDir).filter(function(file) { + return /^isolate-/.test(file); +}); +if (matches.length != 1) { + assert.fail('There should be a single log file.'); +} +var log = matches[0]; +var processor = + path.join(common.testDir, '..', 'tools', 'v8-prof', getScriptName()); +var out = cp.execSync(processor + ' ' + log, {encoding: 'utf8'}); +assert(out.match(/LazyCompile.*foo/)); +if (process.platform === 'win32' || + process.platform === 'sunos' || + process.platform === 'freebsd') { + console.log('1..0 # Skipped: C++ symbols are not mapped for this os.'); + return; +} +assert(out.match(/RunInDebugContext/)); + +function getScriptName() { + switch (process.platform) { + case 'darwin': + return 'mac-tick-processor'; + case 'win32': + return 'windows-tick-processor.bat'; + default: + return 'linux-tick-processor'; + } +} diff --git a/tools/v8-prof/linux-tick-processor b/tools/v8-prof/linux-tick-processor new file mode 100755 index 00000000000..858405c947f --- /dev/null +++ b/tools/v8-prof/linux-tick-processor @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +umask 077 +TEMP_SCRIPT_FILE="/tmp/node-tick-processor-input-script-$$" +tools_path=`cd $(dirname "$0");pwd` +v8_tools="$tools_path/../../deps/v8/tools" + +cat "$tools_path/polyfill.js" "$v8_tools/splaytree.js" "$v8_tools/codemap.js" \ + "$v8_tools/csvparser.js" "$v8_tools/consarray.js" \ + "$v8_tools/profile.js" "$v8_tools/profile_view.js" \ + "$v8_tools/logreader.js" "$v8_tools/tickprocessor.js" \ + "$v8_tools/SourceMap.js" \ + "$v8_tools/tickprocessor-driver.js" >> "$TEMP_SCRIPT_FILE" + +NODE=${NODE:-node} + +if [ ! -x "$NODE" ] && [ -x "$(dirname "$0")/../../iojs" ]; then + NODE="$(dirname "$0")/../../iojs" +fi + +"$NODE" "$TEMP_SCRIPT_FILE" $@ + +rm -f "$TEMP_SCRIPT_FILE" diff --git a/tools/v8-prof/mac-tick-processor b/tools/v8-prof/mac-tick-processor new file mode 100755 index 00000000000..968df80c286 --- /dev/null +++ b/tools/v8-prof/mac-tick-processor @@ -0,0 +1,7 @@ +#!/bin/sh + +# A wrapper script to call 'linux-tick-processor' with Mac-specific settings. + +tools_path=`cd $(dirname "$0");pwd` +v8_tools="$tools_path/../../deps/v8/tools" +"$tools_path/linux-tick-processor" --mac --nm="$v8_tools/mac-nm" $@ diff --git a/tools/v8-prof/polyfill.js b/tools/v8-prof/polyfill.js new file mode 100644 index 00000000000..0d78391b836 --- /dev/null +++ b/tools/v8-prof/polyfill.js @@ -0,0 +1,92 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Node polyfill +var fs = require('fs'); +var os = { + system: function(name, args) { + if (process.platform === 'linux' && name === 'nm') { + // Filter out vdso and vsyscall entries. + var arg = args[args.length - 1]; + if (arg === '[vdso]' || + arg == '[vsyscall]' || + /^[0-9a-f]+-[0-9a-f]+$/.test(arg)) { + return ''; + } + } + return require('child_process').execFileSync( + name, args, {encoding: 'utf8'}); + } +}; +var print = console.log; +function read(fileName) { + return fs.readFileSync(fileName, 'utf8'); +} +arguments = process.argv.slice(2); + +// Polyfill "readline()". +var fd = fs.openSync(arguments[arguments.length - 1], 'r'); +var buf = new Buffer(4096); +var dec = new (require('string_decoder').StringDecoder)('utf-8'); +var line = ''; +versionCheck(); +function readline() { + while (true) { + var lineBreak = line.indexOf('\n'); + if (lineBreak !== -1) { + var res = line.slice(0, lineBreak); + line = line.slice(lineBreak + 1); + return res; + } + var bytes = fs.readSync(fd, buf, 0, buf.length); + line += dec.write(buf.slice(0, bytes)); + if (line.length === 0) { + return false; + } + } +} + +function versionCheck() { + // v8-version looks like "v8-version,$major,$minor,$build,$patch,$candidate" + // whereas process.versions.v8 is either "$major.$minor.$build" or + // "$major.$minor.$build.$patch". + var firstLine = readline(); + line = firstLine + '\n' + line; + firstLine = firstLine.split(','); + var curVer = process.versions.v8.split('.'); + if (firstLine.length !== 6 && firstLine[0] !== 'v8-version') { + console.log('Unable to read v8-version from log file.'); + return; + } + // Compare major, minor and build; ignore the patch and candidate fields. + for (var i = 0; i < 3; i++) { + if (curVer[i] !== firstLine[i + 1]) { + console.log('Testing v8 version different from logging version'); + return; + } + } +} diff --git a/tools/v8-prof/windows-tick-processor.bat b/tools/v8-prof/windows-tick-processor.bat new file mode 100755 index 00000000000..83e6dde6b76 --- /dev/null +++ b/tools/v8-prof/windows-tick-processor.bat @@ -0,0 +1,19 @@ +@echo off +setlocal + +SET tools_dir=%~dp0 +SET v8_tools=%tools_dir%..\..\deps\v8\tools\ + +SET temp_script=%TEMP%\node-tick-processor-input-script + +IF NOT DEFINED NODE (SET NODE=node.exe) +%NODE% --version 2> NUL +if %ERRORLEVEL%==9009 (SET NODE=%~dp0\..\..\Release\iojs.exe) + + +type %tools_dir%polyfill.js %v8_tools%splaytree.js %v8_tools%codemap.js^ + %v8_tools%csvparser.js %v8_tools%consarray.js %v8_tools%profile.js^ + %v8_tools%profile_view.js %v8_tools%logreader.js %v8_tools%SourceMap.js^ + %v8_tools%tickprocessor.js %v8_tools%tickprocessor-driver.js >> %temp_script% +%NODE% %temp_script% --windows %* +del %temp_script% From cbb75c4f86bc1cfd315bd862ebd5e23d6f5f4b34 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 14 Aug 2015 15:57:33 -0700 Subject: [PATCH 031/214] tls: fix throughput issues after incorrect merge 1e066e4a was done incorrectly and has overwritten an important change in: c17449df. Using bigger output buffer increases performance in 3-4 times. PR-URL: https://github.com/nodejs/node/pull/2381 Fix: https://github.com/joyent/node/issues/25803 Reviewed-By: Trevor Norris Reviewed-By: Sakthipriyan Vairamani --- src/tls_wrap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls_wrap.h b/src/tls_wrap.h index b906d78de1f..7a9dc888ccb 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -53,7 +53,7 @@ class TLSWrap : public crypto::SSLWrap, size_t self_size() const override { return sizeof(*this); } protected: - static const int kClearOutChunkSize = 1024; + static const int kClearOutChunkSize = 16384; // Maximum number of bytes for hello parser static const int kMaxHelloLength = 16384; From 7fe6dd8f5d60b0a403abe6f94d8e60974c359ea7 Mon Sep 17 00:00:00 2001 From: "P.S.V.R" Date: Tue, 18 Aug 2015 10:32:21 +0800 Subject: [PATCH 032/214] crypto: check for OpenSSL errors when signing Errors might be injected into OpenSSL's error stack without the return value of `PEM_read_bio_PrivateKey` being set to `nullptr`. See the test of `test_bad_rsa_privkey.pem` for an example. PR-URL: https://github.com/nodejs/node/pull/2342 Reviewed-By: Fedor Indutny --- src/node_crypto.cc | 12 +++++++++++- test/fixtures/test_bad_rsa_privkey.pem | 10 ++++++++++ test/parallel/test-crypto.js | 16 ++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/test_bad_rsa_privkey.pem diff --git a/src/node_crypto.cc b/src/node_crypto.cc index c95e0fa31d7..1af462490f0 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3583,7 +3583,11 @@ SignBase::Error Sign::SignFinal(const char* key_pem, nullptr, CryptoPemCallback, const_cast(passphrase)); - if (pkey == nullptr) + + // Errors might be injected into OpenSSL's error stack + // without `pkey` being set to nullptr; + // cf. the test of `test_bad_rsa_privkey.pem` for an example. + if (pkey == nullptr || 0 != ERR_peek_error()) goto exit; if (EVP_SignFinal(&mdctx_, *sig, sig_len, pkey)) @@ -3631,6 +3635,9 @@ void Sign::SignFinal(const FunctionCallbackInfo& args) { md_len = 8192; // Maximum key size is 8192 bits md_value = new unsigned char[md_len]; + ClearErrorOnReturn clear_error_on_return; + (void) &clear_error_on_return; // Silence compiler warning. + Error err = sign->SignFinal( buf, buf_len, @@ -3965,6 +3972,9 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo& args) { unsigned char* out_value = nullptr; size_t out_len = 0; + ClearErrorOnReturn clear_error_on_return; + (void) &clear_error_on_return; // Silence compiler warning. + bool r = Cipher( kbuf, klen, diff --git a/test/fixtures/test_bad_rsa_privkey.pem b/test/fixtures/test_bad_rsa_privkey.pem new file mode 100644 index 00000000000..cc84a6fc6d6 --- /dev/null +++ b/test/fixtures/test_bad_rsa_privkey.pem @@ -0,0 +1,10 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAz0ZHmXyxQSdWk6NF +GRotTax0O94iHv843su0mOynV9QLvlAwMrUk9k4+/SwyLu0eE3iYsYgXstXi3t2u +rDSIMwIDAQABAkAH4ag/Udp7m79TBdZOygwG9BPHYv7xJstGzYAkgHssf7Yd5ZuC +hpKtBvWdPXZaAFbwF8NSisMl98Q/9zgB/q5BAiEA5zXuwMnwt4hE2YqzBDRFB4g9 +I+v+l1soy6x7Wdqo9esCIQDlf15qDb26uRDurBioE3IpZstWIIvLDdKqviZXKMs8 +2QIgWeC5QvA9RtsOCJLGLCg1fUwUmFYwzZ1+Kk6OVMuPSqkCIDIWFSXyL8kzoKVm +O89axxyQCaqXWcsMDkEjVLzK82gpAiB7lzdDHr7MoMWwV2wC/heEFC2p0Rw4wg9j +1V8QbL0Q0A== +-----END RSA PRIVATE KEY----- diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index 55b57e65154..57191b24ae3 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -124,5 +124,21 @@ assert.throws(function() { crypto.createSign('RSA-SHA256').update('test').sign(priv); }, /RSA_sign:digest too big for rsa key/); +assert.throws(function() { + // The correct header inside `test_bad_rsa_privkey.pem` should have been + // -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- + // instead of + // -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- + // It is generated in this way: + // $ openssl genrsa -out mykey.pem 512; + // $ openssl pkcs8 -topk8 -inform PEM -outform PEM -in mykey.pem \ + // -out private_key.pem -nocrypt; + // Then open private_key.pem and change its header and footer. + var sha1_privateKey = fs.readFileSync(common.fixturesDir + + '/test_bad_rsa_privkey.pem', 'ascii'); + // this would inject errors onto OpenSSL's error stack + crypto.createSign('sha1').sign(sha1_privateKey); +}, /asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag/); + // Make sure memory isn't released before being returned console.log(crypto.randomBytes(16)); From 34f2cfa8067053781473e30ead30e563141bf488 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Mon, 17 Aug 2015 22:51:42 +0200 Subject: [PATCH 033/214] src: better error message on failed Buffer malloc PR-URL: https://github.com/nodejs/node/pull/2422 Reviewed-By: Ben Noordhuis --- src/node_buffer.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 76a733311b0..c8be5b5a448 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -408,8 +408,10 @@ void Create(const FunctionCallbackInfo& args) { void* data; if (length > 0) { data = malloc(length); - if (data == nullptr) - return env->ThrowRangeError("invalid Buffer length"); + if (data == nullptr) { + return env->ThrowRangeError( + "Buffer allocation failed - process out of memory"); + } } else { data = nullptr; } From 850c794882368d7e27d86bea49b0658cde6d864f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Aug 2015 16:17:36 -0700 Subject: [PATCH 034/214] test: refactor test-fs-watchfile.js The test no longer waits about 5 seconds between callback invocations. It now writes to the tmp directory rather than the fixtures directory. Reviewed-By: Ben Noordhuis Reviewed-By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2393 --- test/parallel/test-fs-watchfile.js | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/test/parallel/test-fs-watchfile.js b/test/parallel/test-fs-watchfile.js index 35712741f77..5e075fb056e 100644 --- a/test/parallel/test-fs-watchfile.js +++ b/test/parallel/test-fs-watchfile.js @@ -4,7 +4,6 @@ const common = require('../common'); const fs = require('fs'); const path = require('path'); const assert = require('assert'); -const fixtures = path.join(__dirname, '..', 'fixtures'); // Basic usage tests. assert.throws(function() { @@ -19,7 +18,7 @@ assert.throws(function() { fs.watchFile(new Object(), function() {}); }, /Path must be a string/); -const enoentFile = path.join(fixtures, 'non-existent-file'); +const enoentFile = path.join(common.tmpDir, 'non-existent-file'); const expectedStatObject = new fs.Stats( 0, // dev 0, // mode @@ -37,24 +36,13 @@ const expectedStatObject = new fs.Stats( Date.UTC(1970, 0, 1, 0, 0, 0) // birthtime ); -function removeTestFile() { - try { - fs.unlinkSync(enoentFile); - } catch (ex) { - if (ex.code !== 'ENOENT') { - throw ex; - } - } -} - -// Make sure that the file does not exist, when the test starts -removeTestFile(); +common.refreshTmpDir(); // If the file initially didn't exist, and gets created at a later point of // time, the callback should be invoked again with proper values in stat object var fileExists = false; -fs.watchFile(enoentFile, common.mustCall(function(curr, prev) { +fs.watchFile(enoentFile, {interval: 0}, common.mustCall(function(curr, prev) { if (!fileExists) { // If the file does not exist, all the fields should be zero and the date // fields should be UNIX EPOCH time @@ -71,8 +59,7 @@ fs.watchFile(enoentFile, common.mustCall(function(curr, prev) { // As the file just got created, previous ino value should be lesser than // or equal to zero (non-existent file). assert(prev.ino <= 0); - // Stop watching the file and delete it + // Stop watching the file fs.unwatchFile(enoentFile); - removeTestFile(); } }, 2)); From 6483bc2e8f4b8b7a958eb6c9c1d5f1064e640d5d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 18 Aug 2015 08:38:20 -0700 Subject: [PATCH 035/214] doc: clarify options for fs.watchFile() The explanation for the `options` argument to `fs.watchFile()` had missing punctuation. I took the opportunity to try to rewrite the paragraph for greater clarity. PR-URL: https://github.com/nodejs/node/pull/2425 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Brendan Ashworth --- doc/api/fs.markdown | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index ebc2046d76a..c9fd8466811 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -557,11 +557,12 @@ The synchronous version of `fs.appendFile`. Returns `undefined`. Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. -The second argument is optional. The `options` if provided should be an object -containing two members a boolean, `persistent`, and `interval`. `persistent` -indicates whether the process should continue to run as long as files are -being watched. `interval` indicates how often the target should be polled, -in milliseconds. The default is `{ persistent: true, interval: 5007 }`. +The `options` argument may be omitted. If provided, it should be an object. The +`options` object may contain a boolean named `persistent` that indicates +whether the process should continue to run as long as files are being watched. +The `options` object may specify an `interval` property indicating how often the +target should be polled in milliseconds. The default is +`{ persistent: true, interval: 5007 }`. The `listener` gets two arguments the current stat object and the previous stat object: From 46cdb2f6e26920bfba419d5943bc497fd8cae75b Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 18 Aug 2015 20:29:10 +0200 Subject: [PATCH 036/214] test: lint addon tests Add files in test/addon to the `make cpplint` rule and fix up existing style issues. Tests scraped from doc/api/addon.md are filtered out because those are predominantly for illustrative purposes. PR-URL: https://github.com/nodejs/node/pull/2427 Reviewed-By: Trevor Norris --- Makefile | 13 ++++++- test/addons/async-hello-world/binding.cc | 34 +++++++++---------- test/addons/at-exit/binding.cc | 2 +- .../hello-world-function-export/binding.cc | 12 +++---- test/addons/hello-world/binding.cc | 12 +++---- 5 files changed, 39 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 286b6180a66..7027ba973f9 100644 --- a/Makefile +++ b/Makefile @@ -483,8 +483,19 @@ CPPLINT_EXCLUDE += src/node_win32_perfctr_provider.cc CPPLINT_EXCLUDE += src/queue.h CPPLINT_EXCLUDE += src/tree.h CPPLINT_EXCLUDE += src/v8abbr.h +CPPLINT_EXCLUDE += $(wildcard test/addons/doc-*/*.cc test/addons/doc-*/*.h) -CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard src/*.cc src/*.h src/*.c tools/icu/*.h tools/icu/*.cc deps/debugger-agent/include/* deps/debugger-agent/src/*)) +CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \ + deps/debugger-agent/include/* \ + deps/debugger-agent/src/* \ + src/*.c \ + src/*.cc \ + src/*.h \ + test/addons/*/*.cc \ + test/addons/*/*.h \ + tools/icu/*.cc \ + tools/icu/*.h \ + )) cpplint: @$(PYTHON) tools/cpplint.py $(CPPLINT_FILES) diff --git a/test/addons/async-hello-world/binding.cc b/test/addons/async-hello-world/binding.cc index f458dc6a563..049afab7e78 100644 --- a/test/addons/async-hello-world/binding.cc +++ b/test/addons/async-hello-world/binding.cc @@ -3,35 +3,33 @@ #include #include -using namespace v8; -using namespace node; - struct async_req { uv_work_t req; int input; int output; - Persistent callback; + v8::Persistent callback; }; void DoAsync(uv_work_t* r) { async_req* req = reinterpret_cast(r->data); - sleep(1); // simulate CPU intensive process... + sleep(1); // Simulate CPU intensive process... req->output = req->input * 2; } void AfterAsync(uv_work_t* r) { - Isolate* isolate = Isolate::GetCurrent(); - HandleScope scope(isolate); + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::HandleScope scope(isolate); async_req* req = reinterpret_cast(r->data); - Handle argv[2] = { - Null(isolate), - Integer::New(isolate, req->output) + v8::Handle argv[2] = { + v8::Null(isolate), + v8::Integer::New(isolate, req->output) }; - TryCatch try_catch; + v8::TryCatch try_catch(isolate); - Local callback = Local::New(isolate, req->callback); + v8::Local callback = + v8::Local::New(isolate, req->callback); callback->Call(isolate->GetCurrentContext()->Global(), 2, argv); // cleanup @@ -39,13 +37,13 @@ void AfterAsync(uv_work_t* r) { delete req; if (try_catch.HasCaught()) { - FatalException(isolate, try_catch); + node::FatalException(isolate, try_catch); } } -void Method(const FunctionCallbackInfo& args) { - Isolate* isolate = Isolate::GetCurrent(); - HandleScope scope(isolate); +void Method(const v8::FunctionCallbackInfo& args) { + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::HandleScope scope(isolate); async_req* req = new async_req; req->req.data = req; @@ -53,7 +51,7 @@ void Method(const FunctionCallbackInfo& args) { req->input = args[0]->IntegerValue(); req->output = 0; - Local callback = Local::Cast(args[1]); + v8::Local callback = v8::Local::Cast(args[1]); req->callback.Reset(isolate, callback); uv_queue_work(uv_default_loop(), @@ -62,7 +60,7 @@ void Method(const FunctionCallbackInfo& args) { (uv_after_work_cb)AfterAsync); } -void init(Handle exports, Handle module) { +void init(v8::Handle exports, v8::Handle module) { NODE_SET_METHOD(module, "exports", Method); } diff --git a/test/addons/at-exit/binding.cc b/test/addons/at-exit/binding.cc index 156dbe4ff54..9f192cdb14f 100644 --- a/test/addons/at-exit/binding.cc +++ b/test/addons/at-exit/binding.cc @@ -21,7 +21,7 @@ static void at_exit_cb1(void* arg) { HandleScope handle_scope(isolate); assert(arg == 0); Local obj = Object::New(isolate); - assert(!obj.IsEmpty()); // assert VM is still alive + assert(!obj.IsEmpty()); // Assert VM is still alive. assert(obj->IsObject()); at_exit_cb1_called++; } diff --git a/test/addons/hello-world-function-export/binding.cc b/test/addons/hello-world-function-export/binding.cc index 91fc26cef65..88a6ba59992 100644 --- a/test/addons/hello-world-function-export/binding.cc +++ b/test/addons/hello-world-function-export/binding.cc @@ -1,15 +1,13 @@ #include #include -using namespace v8; - -void Method(const FunctionCallbackInfo& args) { - Isolate* isolate = Isolate::GetCurrent(); - HandleScope scope(isolate); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, "world")); +void Method(const v8::FunctionCallbackInfo& args) { + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::HandleScope scope(isolate); + args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } -void init(Handle exports, Handle module) { +void init(v8::Handle exports, v8::Handle module) { NODE_SET_METHOD(module, "exports", Method); } diff --git a/test/addons/hello-world/binding.cc b/test/addons/hello-world/binding.cc index 1a6d179abe2..c8bbd554413 100644 --- a/test/addons/hello-world/binding.cc +++ b/test/addons/hello-world/binding.cc @@ -1,15 +1,13 @@ #include #include -using namespace v8; - -void Method(const FunctionCallbackInfo& args) { - Isolate* isolate = Isolate::GetCurrent(); - HandleScope scope(isolate); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, "world")); +void Method(const v8::FunctionCallbackInfo& args) { + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::HandleScope scope(isolate); + args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } -void init(Handle target) { +void init(v8::Handle target) { NODE_SET_METHOD(target, "hello", Method); } From 194eeb841b23cc09644864f6d0f53a250ff374ff Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 18 Aug 2015 21:02:52 +0200 Subject: [PATCH 037/214] test: drop Isolate::GetCurrent() from addon tests v8::Isolate::GetCurrent() is not exactly deprecated at this point but its use is strongly discouraged. Update the addon tests so they no longer use it. PR-URL: https://github.com/nodejs/node/pull/2427 Reviewed-By: Trevor Norris --- test/addons/async-hello-world/binding.cc | 8 +++++--- test/addons/at-exit/binding.cc | 6 ++---- test/addons/hello-world-function-export/binding.cc | 2 +- test/addons/hello-world/binding.cc | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/addons/async-hello-world/binding.cc b/test/addons/async-hello-world/binding.cc index 049afab7e78..aee3a3763f4 100644 --- a/test/addons/async-hello-world/binding.cc +++ b/test/addons/async-hello-world/binding.cc @@ -7,6 +7,7 @@ struct async_req { uv_work_t req; int input; int output; + v8::Isolate* isolate; v8::Persistent callback; }; @@ -17,9 +18,9 @@ void DoAsync(uv_work_t* r) { } void AfterAsync(uv_work_t* r) { - v8::Isolate* isolate = v8::Isolate::GetCurrent(); - v8::HandleScope scope(isolate); async_req* req = reinterpret_cast(r->data); + v8::Isolate* isolate = req->isolate; + v8::HandleScope scope(isolate); v8::Handle argv[2] = { v8::Null(isolate), @@ -42,7 +43,7 @@ void AfterAsync(uv_work_t* r) { } void Method(const v8::FunctionCallbackInfo& args) { - v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::Isolate* isolate = args.GetIsolate(); v8::HandleScope scope(isolate); async_req* req = new async_req; @@ -50,6 +51,7 @@ void Method(const v8::FunctionCallbackInfo& args) { req->input = args[0]->IntegerValue(); req->output = 0; + req->isolate = isolate; v8::Local callback = v8::Local::Cast(args[1]); req->callback.Reset(isolate, callback); diff --git a/test/addons/at-exit/binding.cc b/test/addons/at-exit/binding.cc index 9f192cdb14f..d300aad3e82 100644 --- a/test/addons/at-exit/binding.cc +++ b/test/addons/at-exit/binding.cc @@ -16,10 +16,8 @@ static int at_exit_cb1_called = 0; static int at_exit_cb2_called = 0; static void at_exit_cb1(void* arg) { - // FIXME(bnoordhuis) Isolate::GetCurrent() is on its way out. - Isolate* isolate = Isolate::GetCurrent(); + Isolate* isolate = static_cast(arg); HandleScope handle_scope(isolate); - assert(arg == 0); Local obj = Object::New(isolate); assert(!obj.IsEmpty()); // Assert VM is still alive. assert(obj->IsObject()); @@ -37,7 +35,7 @@ static void sanity_check(void) { } void init(Handle target) { - AtExit(at_exit_cb1); + AtExit(at_exit_cb1, target->CreationContext()->GetIsolate()); AtExit(at_exit_cb2, cookie); AtExit(at_exit_cb2, cookie); atexit(sanity_check); diff --git a/test/addons/hello-world-function-export/binding.cc b/test/addons/hello-world-function-export/binding.cc index 88a6ba59992..68db22748fd 100644 --- a/test/addons/hello-world-function-export/binding.cc +++ b/test/addons/hello-world-function-export/binding.cc @@ -2,7 +2,7 @@ #include void Method(const v8::FunctionCallbackInfo& args) { - v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::Isolate* isolate = args.GetIsolate(); v8::HandleScope scope(isolate); args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } diff --git a/test/addons/hello-world/binding.cc b/test/addons/hello-world/binding.cc index c8bbd554413..4982bc3e55d 100644 --- a/test/addons/hello-world/binding.cc +++ b/test/addons/hello-world/binding.cc @@ -2,7 +2,7 @@ #include void Method(const v8::FunctionCallbackInfo& args) { - v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::Isolate* isolate = args.GetIsolate(); v8::HandleScope scope(isolate); args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } From 2ff183dd86e4e5e13db634c12dcf1dc448dbb45f Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 30 Jul 2015 18:12:36 -0400 Subject: [PATCH 038/214] Update FIPS instructions in README.md Update the instructions to follow the requirements in the security policy and user guide PR-URL: https://github.com/nodejs/node/pull/2278 Fixes: https://github.com/nodejs/node/issues/2242 Reviewed-By: Fedor Indutny Reviewed-By: Rod Vagg --- README.md | 50 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 60e7620fbf3..dcf36e4dbce 100644 --- a/README.md +++ b/README.md @@ -269,20 +269,46 @@ NOTE: Windows is not yet supported It is possible to build io.js with [OpenSSL FIPS module](https://www.openssl.org/docs/fips/fipsnotes.html). +**Note** that building in this way does **not** allow you to +claim that the runtime is FIPS 140-2 validated. Instead you +can indicate that the runtime uses a validated module. See +the [security policy] +(http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf) +page 60 for more details. In addition, the validation for +the underlying module is only valid if it is deployed in +accordance with its [security policy] +(http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf). +If you need FIPS validated cryptography it is recommended that you +read both the [security policy] +(http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf) +and [user guide] (https://openssl.org/docs/fips/UserGuide-2.0.pdf). + Instructions: -1. Download and verify `openssl-fips-x.x.x.tar.gz` from - https://www.openssl.org/source/ -2. Extract source to `openssl-fips` folder -3. ``cd openssl-fips && ./config fipscanisterbuild --prefix=`pwd`/out`` - (NOTE: On OS X, you may want to run - ``./Configure darwin64-x86_64-cc --prefix=`pwd`/out`` if you are going to - build x64-mode io.js) -4. `make -j && make install` -5. Get into io.js checkout folder -6. `./configure --openssl-fips=/path/to/openssl-fips/out` -7. Build io.js with `make -j` -8. Verify with `node -p "process.versions.openssl"` (`1.0.2a-fips`) +1. Obtain a copy of openssl-fips-x.x.x.tar.gz. + To comply with the security policy you must ensure the path + through which you get the file complies with the requirements + for a "secure intallation" as described in section 6.6 in + the [user guide] (https://openssl.org/docs/fips/UserGuide-2.0.pdf). + For evaluation/experimentation you can simply download and verify + `openssl-fips-x.x.x.tar.gz` from https://www.openssl.org/source/ +2. Extract source to `openssl-fips` folder and `cd openssl-fips` +3. `./config` +4. `make` +5. `make install` + (NOTE: to comply with the security policy you must use the exact + commands in steps 3-5 without any additional options as per + Appendix A in the [security policy] + (http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf). + The only exception is that `./config no-asm` can be + used in place of `./config` ) +6. Get into io.js checkout folder +7. `./configure --openssl-fips=/path/to/openssl-fips/installdir` + For example on ubuntu 12 the installation directory was + /usr/local/ssl/fips-2.0 +8. Build io.js with `make -j` +9. Verify with `node -p "process.versions.openssl"` (`1.0.2a-fips`) + ## Resources for Newcomers From 53596fd2454fda431a4b2b578760cbab3729c374 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Tue, 18 Aug 2015 12:00:00 -0400 Subject: [PATCH 039/214] 2015-08-18 io.js v3.1.0 Release Notable changes: * buffer: Fixed a couple large memory leaks (Ben Noordhuis) https://github.com/nodejs/node/pull/2352. * crypto: - Fixed a couple of minor memory leaks (Karl Skomski) https://github.com/nodejs/node/pull/2375. - Signing now checks for OpenSSL errors (P.S.V.R) https://github.com/nodejs/node/pull/2342. **Note that this may expose previously hidden errors in user code.** * intl: Intl using small-icu is now enabled by default in builds (Steven R. Loomis) https://github.com/nodejs/node/pull/2264. - `String#normalize()` can now be used for unicode normalization. - The `Intl` object and various `String` and `Number` methods are present, but only support the English locale. - For support of all locales, node must be built with full-icu. * tls: Fixed tls throughput being much lower after an incorrect merge (Fedor Indutny) https://github.com/nodejs/node/pull/2381. * tools: The v8 tick processor now comes bundled with node (Matt Loring) https://github.com/nodejs/node/pull/2090. - This can be used by producing performance profiling output by running node with `--perf`, then running your appropriate platform's script on the output as found in https://github.com/nodejs/node/tree/master/tools/v8-prof. * util: `util.inspect(obj)` now prints the constructor name of the object if there is one (Christopher Monsanto) https://github.com/nodejs/io.js/pull/1935. PR-URL: https://github.com/nodejs/node/pull/2347 --- CHANGELOG.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++ src/node_version.h | 6 ++-- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b045eceb58..f89e1c63525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,74 @@ # io.js ChangeLog +## 2015-08-18, Version 3.1.0, @Fishrock123 + +### Notable changes + +* **buffer**: Fixed a couple large memory leaks (Ben Noordhuis) [#2352](https://github.com/nodejs/node/pull/2352). +* **crypto**: + - Fixed a couple of minor memory leaks (Karl Skomski) [#2375](https://github.com/nodejs/node/pull/2375). + - Signing now checks for OpenSSL errors (P.S.V.R) [#2342](https://github.com/nodejs/node/pull/2342). **Note that this may expose previously hidden errors in user code.** +* **intl**: Intl support using small-icu is now enabled by default in builds (Steven R. Loomis) [#2264](https://github.com/nodejs/node/pull/2264). + - [`String#normalize()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize) can now be used for unicode normalization. + - The [`Intl`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl) object and various `String` and `Number` methods are present, but only support the English locale. + - For support of all locales, node must be built with [full-icu](https://github.com/nodejs/node#build-with-full-icu-support-all-locales-supported-by-icu). +* **tls**: Fixed tls throughput being much lower after an incorrect merge (Fedor Indutny) [#2381](https://github.com/nodejs/node/pull/2381). +* **tools**: The v8 tick processor now comes bundled with node (Matt Loring) [#2090](https://github.com/nodejs/node/pull/2090). + - This can be used by producing performance profiling output by running node with `--perf`, then running your appropriate platform's script on the output as found in [tools/v8-prof](https://github.com/nodejs/node/tree/master/tools/v8-prof). +* **util**: `util.inspect(obj)` now prints the constructor name of the object if there is one (Christopher Monsanto) [#1935](https://github.com/nodejs/io.js/pull/1935). + +### Known issues + +See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and current list of known issues. + +* Possible remaining post-3.0.0 buffer memory leak(s), details at [#2308](https://github.com/nodejs/node/issues/2308). Mostly fixed in [2781333...8841947](https://github.com/nodejs/node/compare/27813339cf713275fa7bbf2ae497d13b66aa78ce...88419479ccb6384473339f09e5c55f234f4ee194) - [#2352](https://github.com/nodejs/node/pull/2352), and also [6fff0f7...a40ae51](https://github.com/nodejs/node/compare/6fff0f73dc371153507d96ecd5f88c1ddc7780c9...a40ae513bb99ec3f85ea5b864a366bc7552d61f0) - [#2375](https://github.com/nodejs/node/pull/2375). +* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/io.js/issues/1264). +* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/io.js/issues/690) +* `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/nodejs/io.js/issues/760). +* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/io.js/issues/894) +* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/io.js/issues/1435). + +### Commits + +* [[`3645dc62ed`](https://github.com/nodejs/node/commit/3645dc62ed)] - **build**: work around VS2015 issue in ICU <56 (Steven R. Loomis) [#2283](https://github.com/nodejs/node/pull/2283) +* [[`1f12e03266`](https://github.com/nodejs/node/commit/1f12e03266)] - **(SEMVER-MINOR)** **build**: intl: converge from joyent/node (Steven R. Loomis) [#2264](https://github.com/nodejs/node/pull/2264) +* [[`071640abdd`](https://github.com/nodejs/node/commit/071640abdd)] - **build**: Intl: bump ICU4C from 54 to 55 (Steven R. Loomis) [#2293](https://github.com/nodejs/node/pull/2293) +* [[`07a88b0c8b`](https://github.com/nodejs/node/commit/07a88b0c8b)] - **build**: update manifest to include Windows 10 (Lucien Greathouse) [#2332](https://github.com/nodejs/io.js/pull/2332) +* [[`0bb099f444`](https://github.com/nodejs/node/commit/0bb099f444)] - **build**: expand ~ in install prefix early (Ben Noordhuis) [#2307](https://github.com/nodejs/io.js/pull/2307) +* [[`7fe6dd8f5d`](https://github.com/nodejs/node/commit/7fe6dd8f5d)] - **crypto**: check for OpenSSL errors when signing (P.S.V.R) [#2342](https://github.com/nodejs/node/pull/2342) +* [[`605f6ee904`](https://github.com/nodejs/node/commit/605f6ee904)] - **crypto**: fix memory leak in PBKDF2Request (Karl Skomski) [#2375](https://github.com/nodejs/node/pull/2375) +* [[`ba6eb8af12`](https://github.com/nodejs/node/commit/ba6eb8af12)] - **crypto**: fix memory leak in ECDH::SetPrivateKey (Karl Skomski) [#2375](https://github.com/nodejs/node/pull/2375) +* [[`6a16368611`](https://github.com/nodejs/node/commit/6a16368611)] - **crypto**: fix memory leak in PublicKeyCipher::Cipher (Karl Skomski) [#2375](https://github.com/nodejs/node/pull/2375) +* [[`a760a87803`](https://github.com/nodejs/node/commit/a760a87803)] - **crypto**: fix memory leak in SafeX509ExtPrint (Karl Skomski) [#2375](https://github.com/nodejs/node/pull/2375) +* [[`f45487cd6e`](https://github.com/nodejs/node/commit/f45487cd6e)] - **crypto**: fix memory leak in SetDHParam (Karl Skomski) [#2375](https://github.com/nodejs/node/pull/2375) +* [[`2ff183dd86`](https://github.com/nodejs/node/commit/2ff183dd86)] - **doc**: Update FIPS instructions in README.md (Michael Dawson) [#2278](https://github.com/nodejs/node/pull/2278) +* [[`6483bc2e8f`](https://github.com/nodejs/node/commit/6483bc2e8f)] - **doc**: clarify options for fs.watchFile() (Rich Trott) [#2425](https://github.com/nodejs/node/pull/2425) +* [[`e76822f454`](https://github.com/nodejs/node/commit/e76822f454)] - **doc**: multiple documentation updates cherry picked from v0.12 (James M Snell) [#2302](https://github.com/nodejs/io.js/pull/2302) +* [[`1738c9680b`](https://github.com/nodejs/node/commit/1738c9680b)] - **net**: ensure Socket reported address is current (Ryan Graham) [#2095](https://github.com/nodejs/io.js/pull/2095) +* [[`844d3f0e3e`](https://github.com/nodejs/node/commit/844d3f0e3e)] - **path**: use '===' instead of '==' for comparison (Sam Stites) [#2388](https://github.com/nodejs/node/pull/2388) +* [[`7118b8a882`](https://github.com/nodejs/node/commit/7118b8a882)] - **path**: remove dead code in favor of unit tests (Nathan Woltman) [#2282](https://github.com/nodejs/io.js/pull/2282) +* [[`34f2cfa806`](https://github.com/nodejs/node/commit/34f2cfa806)] - **src**: better error message on failed Buffer malloc (Karl Skomski) [#2422](https://github.com/nodejs/node/pull/2422) +* [[`b196c1da3c`](https://github.com/nodejs/node/commit/b196c1da3c)] - **src**: fix memory leak in DLOpen (Karl Skomski) [#2375](https://github.com/nodejs/node/pull/2375) +* [[`d1307b2995`](https://github.com/nodejs/node/commit/d1307b2995)] - **src**: don't use fopen() in require() fast path (Ben Noordhuis) [#2377](https://github.com/nodejs/node/pull/2377) +* [[`455ec570d1`](https://github.com/nodejs/node/commit/455ec570d1)] - **src**: rename Buffer::Use() to Buffer::New() (Ben Noordhuis) [#2352](https://github.com/nodejs/node/pull/2352) +* [[`fd63e1ce2b`](https://github.com/nodejs/node/commit/fd63e1ce2b)] - **src**: introduce internal Buffer::Copy() function (Ben Noordhuis) [#2352](https://github.com/nodejs/node/pull/2352) +* [[`5586ceca13`](https://github.com/nodejs/node/commit/5586ceca13)] - **src**: move internal functions out of node_buffer.h (Ben Noordhuis) [#2352](https://github.com/nodejs/node/pull/2352) +* [[`bff9bcddb6`](https://github.com/nodejs/node/commit/bff9bcddb6)] - **src**: plug memory leaks (Ben Noordhuis) [#2352](https://github.com/nodejs/node/pull/2352) +* [[`ccf12df4f3`](https://github.com/nodejs/node/commit/ccf12df4f3)] - **(SEMVER-MINOR)** **src**: add total_available_size to v8 statistics (Roman Klauke) [#2348](https://github.com/nodejs/io.js/pull/2348) +* [[`194eeb841b`](https://github.com/nodejs/node/commit/194eeb841b)] - **test**: drop Isolate::GetCurrent() from addon tests (Ben Noordhuis) [#2427](https://github.com/nodejs/node/pull/2427) +* [[`46cdb2f6e2`](https://github.com/nodejs/node/commit/46cdb2f6e2)] - **test**: lint addon tests (Ben Noordhuis) [#2427](https://github.com/nodejs/node/pull/2427) +* [[`850c794882`](https://github.com/nodejs/node/commit/850c794882)] - **test**: refactor test-fs-watchfile.js (Rich Trott) [#2393](https://github.com/nodejs/node/pull/2393) +* [[`a3160c0a33`](https://github.com/nodejs/node/commit/a3160c0a33)] - **test**: correct spelling of 'childProcess' (muddletoes) [#2389](https://github.com/nodejs/node/pull/2389) +* [[`e51f90d747`](https://github.com/nodejs/node/commit/e51f90d747)] - **test**: option to run a subset of tests (João Reis) [#2260](https://github.com/nodejs/io.js/pull/2260) +* [[`cc46d3bca3`](https://github.com/nodejs/node/commit/cc46d3bca3)] - **test**: clarify dropMembership() call (Rich Trott) [#2062](https://github.com/nodejs/io.js/pull/2062) +* [[`0ee4df9c7a`](https://github.com/nodejs/node/commit/0ee4df9c7a)] - **test**: make listen-fd-cluster/server more robust (Sam Roberts) [#1944](https://github.com/nodejs/io.js/pull/1944) +* [[`cf9ba81398`](https://github.com/nodejs/node/commit/cf9ba81398)] - **test**: address timing issues in simple http tests (Gireesh Punathil) [#2294](https://github.com/nodejs/io.js/pull/2294) +* [[`cbb75c4f86`](https://github.com/nodejs/node/commit/cbb75c4f86)] - **tls**: fix throughput issues after incorrect merge (Fedor Indutny) [#2381](https://github.com/nodejs/node/pull/2381) +* [[`94b765f409`](https://github.com/nodejs/node/commit/94b765f409)] - **tls**: fix check for reused session (Fedor Indutny) [#2312](https://github.com/nodejs/io.js/pull/2312) +* [[`e83a41ad65`](https://github.com/nodejs/node/commit/e83a41ad65)] - **tls**: introduce internal `onticketkeycallback` (Fedor Indutny) [#2312](https://github.com/nodejs/io.js/pull/2312) +* [[`fb0f5d733f`](https://github.com/nodejs/node/commit/fb0f5d733f)] - **(SEMVER-MINOR)** **tools**: run the tick processor without building v8 (Matt Loring) [#2090](https://github.com/nodejs/node/pull/2090) +* [[`7606bdb897`](https://github.com/nodejs/node/commit/7606bdb897)] - **(SEMVER-MINOR)** **util**: display constructor when inspecting objects (Christopher Monsanto) [#1935](https://github.com/nodejs/io.js/pull/1935) + ## 2015-08-04, Version 3.0.0, @rvagg ### Notable changes diff --git a/src/node_version.h b/src/node_version.h index cf259469de4..c62e7aed90a 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -2,10 +2,10 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 3 -#define NODE_MINOR_VERSION 0 -#define NODE_PATCH_VERSION 1 +#define NODE_MINOR_VERSION 1 +#define NODE_PATCH_VERSION 0 -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) From 8576324cea16d39817abf59837ffa359de7b8758 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Tue, 18 Aug 2015 12:00:26 -0400 Subject: [PATCH 040/214] Working on v3.1.1 PR-URL: https://github.com/nodejs/node/pull/2347 --- src/node_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_version.h b/src/node_version.h index c62e7aed90a..08ca81fa904 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -3,9 +3,9 @@ #define NODE_MAJOR_VERSION 3 #define NODE_MINOR_VERSION 1 -#define NODE_PATCH_VERSION 0 +#define NODE_PATCH_VERSION 1 -#define NODE_VERSION_IS_RELEASE 1 +#define NODE_VERSION_IS_RELEASE 0 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) From 3e6a6fcdd6bed59a7ff3732c2a5b45c19e6edcda Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Wed, 12 Aug 2015 00:01:50 +0530 Subject: [PATCH 041/214] events: deprecate static listenerCount function As per the discussion in #734, this patch deprecates the usage of `EventEmitter.listenerCount` static function in the docs, and introduces the `listenerCount` function in the prototype of `EventEmitter` itself. PR-URL: https://github.com/nodejs/node/pull/2349 Reviewed-By: Trevor Norris Reviewed-By: Brian White --- ...t.js => ee-listener-count-on-prototype.js} | 3 +-- doc/api/events.markdown | 7 ++++++ lib/_http_client.js | 2 +- lib/_http_server.js | 4 ++-- lib/_stream_readable.js | 4 ++-- lib/_tls_wrap.js | 9 ++++---- lib/events.js | 22 +++++++++++-------- lib/fs.js | 2 +- lib/readline.js | 8 +++---- lib/stream.js | 2 +- src/node.js | 3 +-- .../test-event-emitter-listener-count.js | 18 +++++++++++++++ test/parallel/test-event-emitter-subclass.js | 2 +- 13 files changed, 56 insertions(+), 30 deletions(-) rename benchmark/events/{ee-listener-count.js => ee-listener-count-on-prototype.js} (80%) create mode 100644 test/parallel/test-event-emitter-listener-count.js diff --git a/benchmark/events/ee-listener-count.js b/benchmark/events/ee-listener-count-on-prototype.js similarity index 80% rename from benchmark/events/ee-listener-count.js rename to benchmark/events/ee-listener-count-on-prototype.js index a697c41b8b4..8d536edd627 100644 --- a/benchmark/events/ee-listener-count.js +++ b/benchmark/events/ee-listener-count-on-prototype.js @@ -7,14 +7,13 @@ function main(conf) { var n = conf.n | 0; var ee = new EventEmitter(); - var listenerCount = EventEmitter.listenerCount; for (var k = 0; k < 10; k += 1) ee.on('dummy', function() {}); bench.start(); for (var i = 0; i < n; i += 1) { - var r = listenerCount(ee, 'dummy'); + var r = ee.listenerCount('dummy'); } bench.end(n); } diff --git a/doc/api/events.markdown b/doc/api/events.markdown index a51905ab4da..de547a5b8b5 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -137,10 +137,17 @@ Execute each of the listeners in order with the supplied arguments. Returns `true` if event had listeners, `false` otherwise. +### emitter.listenerCount(type) + +* `type` {Value} The type of event + +Returns the number of listeners listening to the `type` of event. + ### Class Method: EventEmitter.listenerCount(emitter, event) Return the number of listeners for a given event. +_Note: This is deprecated. Use `emitter.listenerCount` instead._ ### Event: 'newListener' diff --git a/lib/_http_client.js b/lib/_http_client.js index 50d1052b44e..e705117ab63 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -322,7 +322,7 @@ function socketOnData(d) { var bodyHead = d.slice(bytesParsed, d.length); var eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade'; - if (EventEmitter.listenerCount(req, eventName) > 0) { + if (req.listenerCount(eventName) > 0) { req.upgradeOrConnect = true; // detach the socket diff --git a/lib/_http_server.js b/lib/_http_server.js index 1a4bd7555a5..6769f4a1521 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -343,7 +343,7 @@ function connectionListener(socket) { parser = null; var eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade'; - if (EventEmitter.listenerCount(self, eventName) > 0) { + if (self.listenerCount(eventName) > 0) { debug('SERVER have listener for %s', eventName); var bodyHead = d.slice(bytesParsed, d.length); @@ -467,7 +467,7 @@ function connectionListener(socket) { (req.httpVersionMajor == 1 && req.httpVersionMinor == 1) && continueExpression.test(req.headers['expect'])) { res._expect_continue = true; - if (EventEmitter.listenerCount(self, 'checkContinue') > 0) { + if (self.listenerCount('checkContinue') > 0) { self.emit('checkContinue', req, res); } else { res.writeContinue(); diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 7be7723e52c..11069985a4d 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -533,7 +533,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { debug('onerror', er); unpipe(); dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) + if (dest.listenerCount('error') === 0) dest.emit('error', er); } // This is a brutally ugly hack to make sure that our error handler @@ -582,7 +582,7 @@ function pipeOnDrain(src) { debug('pipeOnDrain', state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { + if (state.awaitDrain === 0 && src.listenerCount('data')) { state.flowing = true; flow(src); } diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index b5d1899480b..df86512c77e 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -5,7 +5,6 @@ const crypto = require('crypto'); const net = require('net'); const tls = require('tls'); const util = require('util'); -const listenerCount = require('events').listenerCount; const common = require('_tls_common'); const StreamWrap = require('_stream_wrap').StreamWrap; const Buffer = require('buffer').Buffer; @@ -116,7 +115,7 @@ function requestOCSP(self, hello, ctx, cb) { if (ctx.context) ctx = ctx.context; - if (listenerCount(self.server, 'OCSPRequest') === 0) { + if (self.server.listenerCount('OCSPRequest') === 0) { return cb(null); } else { self.server.emit('OCSPRequest', @@ -396,11 +395,11 @@ TLSSocket.prototype._init = function(socket, wrap) { ssl.handshakes = 0; if (this.server) { - if (listenerCount(this.server, 'resumeSession') > 0 || - listenerCount(this.server, 'newSession') > 0) { + if (this.server.listenerCount('resumeSession') > 0 || + this.server.listenerCount('newSession') > 0) { ssl.enableSessionCallbacks(); } - if (listenerCount(this.server, 'OCSPRequest') > 0) + if (this.server.listenerCount('OCSPRequest') > 0) ssl.enableCertCb(); } } else { diff --git a/lib/events.js b/lib/events.js index 3ea798b3bdb..722b64537e1 100644 --- a/lib/events.js +++ b/lib/events.js @@ -395,19 +395,23 @@ EventEmitter.prototype.listeners = function listeners(type) { }; EventEmitter.listenerCount = function(emitter, type) { - var evlistener; - var ret = 0; - var events = emitter._events; + return emitter.listenerCount(type); +}; + +EventEmitter.prototype.listenerCount = function listenerCount(type) { + const events = this._events; if (events) { - evlistener = events[type]; - if (typeof evlistener === 'function') - ret = 1; - else if (evlistener) - ret = evlistener.length; + const evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener) { + return evlistener.length; + } } - return ret; + return 0; }; // About 1.5x faster than the two-arg version of Array#splice(). diff --git a/lib/fs.js b/lib/fs.js index 138a90e2f2e..9bfd14cd29b 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1354,7 +1354,7 @@ fs.unwatchFile = function(filename, listener) { stat.removeAllListeners('change'); } - if (EventEmitter.listenerCount(stat, 'change') === 0) { + if (stat.listenerCount('change') === 0) { stat.stop(); statWatchers.delete(filename); } diff --git a/lib/readline.js b/lib/readline.js index 02fa9d08f66..6164bcc85fb 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -683,7 +683,7 @@ Interface.prototype._ttyWrite = function(s, key) { switch (key.name) { case 'c': - if (EventEmitter.listenerCount(this, 'SIGINT') > 0) { + if (this.listenerCount('SIGINT') > 0) { this.emit('SIGINT'); } else { // This readline instance is finished @@ -746,7 +746,7 @@ Interface.prototype._ttyWrite = function(s, key) { case 'z': if (process.platform == 'win32') break; - if (EventEmitter.listenerCount(this, 'SIGTSTP') > 0) { + if (this.listenerCount('SIGTSTP') > 0) { this.emit('SIGTSTP'); } else { process.once('SIGCONT', (function(self) { @@ -907,7 +907,7 @@ function emitKeypressEvents(stream) { stream[ESCAPE_DECODER].next(); function onData(b) { - if (EventEmitter.listenerCount(stream, 'keypress') > 0) { + if (stream.listenerCount('keypress') > 0) { var r = stream[KEYPRESS_DECODER].write(b); if (r) { for (var i = 0; i < r.length; i++) { @@ -936,7 +936,7 @@ function emitKeypressEvents(stream) { } } - if (EventEmitter.listenerCount(stream, 'keypress') > 0) { + if (stream.listenerCount('keypress') > 0) { stream.on('data', onData); } else { stream.on('newListener', onNewListener); diff --git a/lib/stream.js b/lib/stream.js index 8d3535dc4d2..2e0cdfc3134 100644 --- a/lib/stream.js +++ b/lib/stream.js @@ -70,7 +70,7 @@ Stream.prototype.pipe = function(dest, options) { // don't leave dangling pipes when there are errors. function onerror(er) { cleanup(); - if (EE.listenerCount(this, 'error') === 0) { + if (this.listenerCount('error') === 0) { throw er; // Unhandled stream error in pipe. } } diff --git a/src/node.js b/src/node.js index af66b1784e7..e2c1de9d35d 100644 --- a/src/node.js +++ b/src/node.js @@ -802,8 +802,7 @@ }); process.on('removeListener', function(type, listener) { - if (signalWraps.hasOwnProperty(type) && - NativeModule.require('events').listenerCount(this, type) === 0) { + if (signalWraps.hasOwnProperty(type) && this.listenerCount(type) === 0) { signalWraps[type].close(); delete signalWraps[type]; } diff --git a/test/parallel/test-event-emitter-listener-count.js b/test/parallel/test-event-emitter-listener-count.js new file mode 100644 index 00000000000..c5b75c819d1 --- /dev/null +++ b/test/parallel/test-event-emitter-listener-count.js @@ -0,0 +1,18 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const EventEmitter = require('events'); + +const emitter = new EventEmitter(); +emitter.on('foo', function() {}); +emitter.on('foo', function() {}); +emitter.on('baz', function() {}); +// Allow any type +emitter.on(123, function() {}); + +assert.strictEqual(EventEmitter.listenerCount(emitter, 'foo'), 2); +assert.strictEqual(emitter.listenerCount('foo'), 2); +assert.strictEqual(emitter.listenerCount('bar'), 0); +assert.strictEqual(emitter.listenerCount('baz'), 1); +assert.strictEqual(emitter.listenerCount(123), 1); diff --git a/test/parallel/test-event-emitter-subclass.js b/test/parallel/test-event-emitter-subclass.js index 32773827118..fe915be34ef 100644 --- a/test/parallel/test-event-emitter-subclass.js +++ b/test/parallel/test-event-emitter-subclass.js @@ -46,4 +46,4 @@ var ee2 = new MyEE2(); ee1.on('x', function() {}); -assert.equal(EventEmitter.listenerCount(ee2, 'x'), 0); +assert.equal(ee2.listenerCount('x'), 0); From 11d1b8fcaf47b30c7126a37c8d548bad51f721b2 Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Tue, 18 Aug 2015 11:11:28 -0700 Subject: [PATCH 042/214] test: improve test-net-pingpong This includes the following changes: - a more strict data check rather than a regex - reduced number of annoying log calls The most important of the changes is the annoying log calls, which speeds up the test execution from about 0m1.130s to 0m0.481s on my machine. PR-URL: https://github.com/nodejs/node/pull/2429 Reviewed-By: Rich Trott --- test/parallel/test-net-pingpong.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/test/parallel/test-net-pingpong.js b/test/parallel/test-net-pingpong.js index 9a0c8af5b06..be7dfa43594 100644 --- a/test/parallel/test-net-pingpong.js +++ b/test/parallel/test-net-pingpong.js @@ -27,20 +27,17 @@ function pingPongTest(port, host) { // than one message. assert.ok(0 <= socket.bufferSize && socket.bufferSize <= 4); - console.log('server got: ' + data); assert.equal(true, socket.writable); assert.equal(true, socket.readable); assert.equal(true, count <= N); - if (/PING/.exec(data)) { - socket.write('PONG', function() { - sentPongs++; - console.error('sent PONG'); - }); - } + assert.equal(data, 'PING'); + + socket.write('PONG', function() { + sentPongs++; + }); }); socket.on('end', function() { - console.error(socket); assert.equal(true, socket.allowHalfOpen); assert.equal(true, socket.writable); // because allowHalfOpen assert.equal(false, socket.readable); @@ -73,8 +70,6 @@ function pingPongTest(port, host) { }); client.on('data', function(data) { - console.log('client got: ' + data); - assert.equal('PONG', data); count += 1; From b60e690023d00e4fda13f6df909b22ce5bcb032e Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Tue, 18 Aug 2015 11:36:20 -0700 Subject: [PATCH 043/214] test: improve test-net-server-pause-on-connect Previously the test had a massive timeout (3s!), reduce this to a platform specific timeout of 50ms. This test runs two servers at the same time in an attempt to compare behaviour. I've added a check to make sure one event fires before the other event, as is expected, but that is a possible race condition. Improves test run time on my machine from 0m3.141s to 0m0.356s. PR-URL: https://github.com/nodejs/node/pull/2429 Reviewed-By: Rich Trott --- test/parallel/test-net-server-pause-on-connect.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-net-server-pause-on-connect.js b/test/parallel/test-net-server-pause-on-connect.js index db57114302f..3f54ecea3c6 100644 --- a/test/parallel/test-net-server-pause-on-connect.js +++ b/test/parallel/test-net-server-pause-on-connect.js @@ -16,14 +16,22 @@ var server1 = net.createServer({pauseOnConnect: true}, function(socket) { }); setTimeout(function() { + // After 50(ish) ms, the other socket should have already read the data. + assert.equal(read, true); assert.equal(socket.bytesRead, 0, 'no data should have been read yet'); + socket.resume(); stopped = false; - }, 3000); + }, common.platformTimeout(50)); }); +// read is a timing check, as server1's timer should fire after server2's +// connection receives the data. Note that this could be race-y. +var read = false; var server2 = net.createServer({pauseOnConnect: false}, function(socket) { socket.on('data', function(data) { + read = true; + assert.equal(data.toString(), msg, 'invalid data received'); socket.end(); server2.close(); @@ -37,3 +45,8 @@ server1.listen(common.PORT, function() { server2.listen(common.PORT + 1, function() { net.createConnection({port: common.PORT + 1}).write(msg); }); + +process.on('exit', function() { + assert.equal(stopped, false); + assert.equal(read, true); +}); From 3545e236fc1af93738625ecc6a23b86dc8d7c7a1 Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Tue, 18 Aug 2015 11:45:59 -0700 Subject: [PATCH 044/214] test: reduce timeouts in test-net-keepalive Previously 1000-1200ms, they're now (platform dependent) 50-100ms. Improves test run time on my machine from 0m1.335s to 0m0.236s. PR-URL: https://github.com/nodejs/node/pull/2429 Reviewed-By: Rich Trott --- test/parallel/test-net-keepalive.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-net-keepalive.js b/test/parallel/test-net-keepalive.js index 3c339f7abaa..efbbc5ea798 100644 --- a/test/parallel/test-net-keepalive.js +++ b/test/parallel/test-net-keepalive.js @@ -8,8 +8,8 @@ var echoServer = net.createServer(function(connection) { serverConnection = connection; connection.setTimeout(0); assert.notEqual(connection.setKeepAlive, undefined); - // send a keepalive packet after 1000 ms - connection.setKeepAlive(true, 1000); + // send a keepalive packet after 50 ms + connection.setKeepAlive(true, common.platformTimeout(50)); connection.on('end', function() { connection.end(); }); @@ -27,5 +27,5 @@ echoServer.on('listening', function() { serverConnection.end(); clientConnection.end(); echoServer.close(); - }, 1200); + }, common.platformTimeout(100)); }); From 2d3f09bd76a999aeefc7179b281e7c70930d2b28 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 11 Aug 2015 12:27:22 -0700 Subject: [PATCH 045/214] stream_base: various improvements Expose and use in TLSWrap an `v8::External` wrap of the `StreamBase*` pointer instead of guessing the ancestor C++ class in `node_wrap.h`. Make use of `StreamBase::Callback` structure for storing/passing both callback and context in a single object. Introduce `GetObject()` for future user-land usage, when a child class is not going to be inherited from AsyncWrap. PR-URL: https://github.com/nodejs/node/pull/2351 Reviewed-By: Trevor Norris --- lib/_tls_wrap.js | 4 ++- src/env.h | 1 + src/node_wrap.h | 15 --------- src/stream_base-inl.h | 18 +++++++++++ src/stream_base.cc | 27 +++++++++++++--- src/stream_base.h | 72 +++++++++++++++++++++++++------------------ src/stream_wrap.cc | 6 ++-- src/tls_wrap.cc | 18 +++++------ 8 files changed, 96 insertions(+), 65 deletions(-) diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index df86512c77e..1bff7579fc2 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -319,7 +319,9 @@ TLSSocket.prototype._wrapHandle = function(wrap) { var context = options.secureContext || options.credentials || tls.createSecureContext(); - res = tls_wrap.wrap(handle, context.context, options.isServer); + res = tls_wrap.wrap(handle._externalStream, + context.context, + options.isServer); res._parent = handle; res._parentWrap = wrap; res._secureContext = context; diff --git a/src/env.h b/src/env.h index bf80881907e..1801ffecd3c 100644 --- a/src/env.h +++ b/src/env.h @@ -88,6 +88,7 @@ namespace node { V(exponent_string, "exponent") \ V(exports_string, "exports") \ V(ext_key_usage_string, "ext_key_usage") \ + V(external_stream_string, "_externalStream") \ V(family_string, "family") \ V(fatal_exception_string, "_fatalException") \ V(fd_string, "fd") \ diff --git a/src/node_wrap.h b/src/node_wrap.h index 58b042a63b4..d508a4a470f 100644 --- a/src/node_wrap.h +++ b/src/node_wrap.h @@ -34,21 +34,6 @@ namespace node { } \ } while (0) -#define WITH_GENERIC_STREAM(env, obj, BODY) \ - do { \ - WITH_GENERIC_UV_STREAM(env, obj, BODY, { \ - if (env->tls_wrap_constructor_template().IsEmpty() == false && \ - env->tls_wrap_constructor_template()->HasInstance(obj)) { \ - TLSWrap* const wrap = Unwrap(obj); \ - BODY \ - } else if (env->jsstream_constructor_template().IsEmpty() == false && \ - env->jsstream_constructor_template()->HasInstance(obj)) { \ - JSStream* const wrap = Unwrap(obj); \ - BODY \ - } \ - }); \ - } while (0) - inline uv_stream_t* HandleToStream(Environment* env, v8::Local obj) { v8::HandleScope scope(env->isolate()); diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index d74b47de600..dd0bbcfbd87 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -10,6 +10,7 @@ namespace node { +using v8::External; using v8::FunctionCallbackInfo; using v8::FunctionTemplate; using v8::Handle; @@ -36,6 +37,13 @@ void StreamBase::AddMethods(Environment* env, v8::DEFAULT, attributes); + t->InstanceTemplate()->SetAccessor(env->external_stream_string(), + GetExternal, + nullptr, + env->as_external(), + v8::DEFAULT, + attributes); + env->SetProtoMethod(t, "readStart", JSMethod); env->SetProtoMethod(t, "readStop", JSMethod); if ((flags & kFlagNoShutdown) == 0) @@ -72,6 +80,16 @@ void StreamBase::GetFD(Local key, } +template +void StreamBase::GetExternal(Local key, + const PropertyCallbackInfo& args) { + StreamBase* wrap = Unwrap(args.Holder()); + + Local ext = External::New(args.GetIsolate(), wrap); + args.GetReturnValue().Set(ext); +} + + template & args)> void StreamBase::JSMethod(const FunctionCallbackInfo& args) { diff --git a/src/stream_base.cc b/src/stream_base.cc index b2518404a8f..d957465abcd 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -72,7 +72,6 @@ void StreamBase::AfterShutdown(ShutdownWrap* req_wrap, int status) { // The wrap and request objects should still be there. CHECK_EQ(req_wrap->persistent().IsEmpty(), false); - CHECK_EQ(wrap->GetAsyncWrap()->persistent().IsEmpty(), false); HandleScope handle_scope(env->isolate()); Context::Scope context_scope(env->context()); @@ -80,7 +79,7 @@ void StreamBase::AfterShutdown(ShutdownWrap* req_wrap, int status) { Local req_wrap_obj = req_wrap->object(); Local argv[3] = { Integer::New(env->isolate(), status), - wrap->GetAsyncWrap()->object(), + wrap->GetObject(), req_wrap_obj }; @@ -370,7 +369,6 @@ void StreamBase::AfterWrite(WriteWrap* req_wrap, int status) { // The wrap and request objects should still be there. CHECK_EQ(req_wrap->persistent().IsEmpty(), false); - CHECK_EQ(wrap->GetAsyncWrap()->persistent().IsEmpty(), false); // Unref handle property Local req_wrap_obj = req_wrap->object(); @@ -379,7 +377,7 @@ void StreamBase::AfterWrite(WriteWrap* req_wrap, int status) { Local argv[] = { Integer::New(env->isolate(), status), - wrap->GetAsyncWrap()->object(), + wrap->GetObject(), req_wrap_obj, Undefined(env->isolate()) }; @@ -414,7 +412,16 @@ void StreamBase::EmitData(ssize_t nread, if (argv[2].IsEmpty()) argv[2] = Undefined(env->isolate()); - GetAsyncWrap()->MakeCallback(env->onread_string(), ARRAY_SIZE(argv), argv); + AsyncWrap* async = GetAsyncWrap(); + if (async == nullptr) { + node::MakeCallback(env, + GetObject(), + env->onread_string(), + ARRAY_SIZE(argv), + argv); + } else { + async->MakeCallback(env->onread_string(), ARRAY_SIZE(argv), argv); + } } @@ -428,6 +435,16 @@ int StreamBase::GetFD() { } +AsyncWrap* StreamBase::GetAsyncWrap() { + return nullptr; +} + + +Local StreamBase::GetObject() { + return GetAsyncWrap()->object(); +} + + int StreamResource::DoTryWrite(uv_buf_t** bufs, size_t* count) { // No TryWrite by default return 0; diff --git a/src/stream_base.h b/src/stream_base.h index 31854b3435a..c5a09777925 100644 --- a/src/stream_base.h +++ b/src/stream_base.h @@ -106,6 +106,22 @@ class WriteWrap: public ReqWrap, class StreamResource { public: + template + struct Callback { + Callback() : fn(nullptr), ctx(nullptr) {} + Callback(T fn, void* ctx) : fn(fn), ctx(ctx) {} + Callback(const Callback&) = default; + + inline bool is_empty() { return fn == nullptr; } + inline void clear() { + fn = nullptr; + ctx = nullptr; + } + + T fn; + void* ctx; + }; + typedef void (*AfterWriteCb)(WriteWrap* w, void* ctx); typedef void (*AllocCb)(size_t size, uv_buf_t* buf, void* ctx); typedef void (*ReadCb)(ssize_t nread, @@ -113,11 +129,8 @@ class StreamResource { uv_handle_type pending, void* ctx); - StreamResource() : after_write_cb_(nullptr), - alloc_cb_(nullptr), - read_cb_(nullptr) { + StreamResource() { } - virtual ~StreamResource() = default; virtual int DoShutdown(ShutdownWrap* req_wrap) = 0; @@ -131,44 +144,37 @@ class StreamResource { // Events inline void OnAfterWrite(WriteWrap* w) { - if (after_write_cb_ != nullptr) - after_write_cb_(w, after_write_ctx_); + if (!after_write_cb_.is_empty()) + after_write_cb_.fn(w, after_write_cb_.ctx); } inline void OnAlloc(size_t size, uv_buf_t* buf) { - if (alloc_cb_ != nullptr) - alloc_cb_(size, buf, alloc_ctx_); + if (!alloc_cb_.is_empty()) + alloc_cb_.fn(size, buf, alloc_cb_.ctx); } inline void OnRead(size_t nread, const uv_buf_t* buf, uv_handle_type pending = UV_UNKNOWN_HANDLE) { - if (read_cb_ != nullptr) - read_cb_(nread, buf, pending, read_ctx_); + if (!read_cb_.is_empty()) + read_cb_.fn(nread, buf, pending, read_cb_.ctx); } - inline void set_after_write_cb(AfterWriteCb cb, void* ctx) { - after_write_ctx_ = ctx; - after_write_cb_ = cb; + inline void set_after_write_cb(Callback c) { + after_write_cb_ = c; } - inline void set_alloc_cb(AllocCb cb, void* ctx) { - alloc_cb_ = cb; - alloc_ctx_ = ctx; - } + inline void set_alloc_cb(Callback c) { alloc_cb_ = c; } + inline void set_read_cb(Callback c) { read_cb_ = c; } - inline void set_read_cb(ReadCb cb, void* ctx) { - read_cb_ = cb; - read_ctx_ = ctx; - } + inline Callback after_write_cb() { return after_write_cb_; } + inline Callback alloc_cb() { return alloc_cb_; } + inline Callback read_cb() { return read_cb_; } private: - AfterWriteCb after_write_cb_; - void* after_write_ctx_; - AllocCb alloc_cb_; - void* alloc_ctx_; - ReadCb read_cb_; - void* read_ctx_; + Callback after_write_cb_; + Callback alloc_cb_; + Callback read_cb_; }; class StreamBase : public StreamResource { @@ -211,7 +217,9 @@ class StreamBase : public StreamResource { virtual ~StreamBase() = default; - virtual AsyncWrap* GetAsyncWrap() = 0; + // One of these must be implemented + virtual AsyncWrap* GetAsyncWrap(); + virtual v8::Local GetObject(); // Libuv callbacks static void AfterShutdown(ShutdownWrap* req, int status); @@ -227,8 +235,12 @@ class StreamBase : public StreamResource { int WriteString(const v8::FunctionCallbackInfo& args); template - static void GetFD(v8::Local, - const v8::PropertyCallbackInfo&); + static void GetFD(v8::Local key, + const v8::PropertyCallbackInfo& args); + + template + static void GetExternal(v8::Local key, + const v8::PropertyCallbackInfo& args); template ctx_, SSLWrap::NewSessionCallback); stream_->Consume(); - stream_->set_after_write_cb(OnAfterWriteImpl, this); - stream_->set_alloc_cb(OnAllocImpl, this); - stream_->set_read_cb(OnReadImpl, this); + stream_->set_after_write_cb({ OnAfterWriteImpl, this }); + stream_->set_alloc_cb({ OnAllocImpl, this }); + stream_->set_read_cb({ OnReadImpl, this }); - set_alloc_cb(OnAllocSelf, this); - set_read_cb(OnReadSelf, this); + set_alloc_cb({ OnAllocSelf, this }); + set_read_cb({ OnReadSelf, this }); InitSSL(); } @@ -177,15 +176,12 @@ void TLSWrap::Wrap(const FunctionCallbackInfo& args) { if (args.Length() < 3 || !args[2]->IsBoolean()) return env->ThrowTypeError("Third argument should be boolean"); - Local stream_obj = args[0].As(); + Local stream_obj = args[0].As(); Local sc = args[1].As(); Kind kind = args[2]->IsTrue() ? SSLWrap::kServer : SSLWrap::kClient; - StreamBase* stream = nullptr; - WITH_GENERIC_STREAM(env, stream_obj, { - stream = wrap; - }); + StreamBase* stream = static_cast(stream_obj->Value()); CHECK_NE(stream, nullptr); TLSWrap* res = new TLSWrap(env, kind, stream, Unwrap(sc)); From 7f02443a9a3931934b5708ef8550305634a05289 Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Wed, 19 Aug 2015 15:44:20 -0700 Subject: [PATCH 046/214] repl: dont throw ENOENT on NODE_REPL_HISTORY_FILE If you have no history file written to disk, but the environment variable set, `fs.readFileSync` will throw an ENOENT error, but there's nothing to convert. The converter should ignore ENOENT on that `fs.readFileSync` call. Fixes: https://github.com/nodejs/node/issues/2449 PR-URL: https://github.com/nodejs/node/pull/2451 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Sakthipriyan Vairamani --- lib/internal/repl.js | 4 +++- test/sequential/test-repl-persistent-history.js | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/internal/repl.js b/lib/internal/repl.js index 75909f72e24..b2c74e179c5 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -122,8 +122,10 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { } repl.history = repl.history.slice(-repl.historySize); } catch (err) { - return ready( + if (err.code !== 'ENOENT') { + return ready( new Error(`Could not parse history data in ${oldHistoryPath}.`)); + } } } diff --git a/test/sequential/test-repl-persistent-history.js b/test/sequential/test-repl-persistent-history.js index 8d550f6c1d7..ef433912da5 100644 --- a/test/sequential/test-repl-persistent-history.js +++ b/test/sequential/test-repl-persistent-history.js @@ -69,6 +69,7 @@ const fixtures = path.join(common.testDir, 'fixtures'); const historyFixturePath = path.join(fixtures, '.node_repl_history'); const historyPath = path.join(common.tmpDir, '.fixture_copy_repl_history'); const oldHistoryPath = path.join(fixtures, 'old-repl-history-file.json'); +const enoentHistoryPath = path.join(fixtures, 'enoent-repl-history-file.json'); const tests = [{ @@ -76,6 +77,12 @@ const tests = [{ test: [UP], expected: [prompt, replDisabled, prompt] }, +{ + env: { NODE_REPL_HISTORY: '', + NODE_REPL_HISTORY_FILE: enoentHistoryPath }, + test: [UP], + expected: [prompt, replDisabled, prompt] +}, { env: { NODE_REPL_HISTORY: '', NODE_REPL_HISTORY_FILE: oldHistoryPath }, From 3579f3a2a46da105d07de0c53a6dbe09e3b37366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 20 Aug 2015 11:37:02 +0200 Subject: [PATCH 047/214] test: disallow unreachable code PR-URL: https://github.com/nodejs/node/pull/2289 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Roman Reiss Reviewed-By: Brendan Ashworth --- test/.eslintrc | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/.eslintrc b/test/.eslintrc index 608c62dff5f..2a8f61cb35f 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -1,8 +1,6 @@ ## Test-specific linter rules rules: - ## allow unreachable code - no-unreachable: 0 ## allow undeclared variables no-undef: 0 ## allow global Buffer usage From e714b5620e98ca01d176e16d7afdae467935d0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 2 Aug 2015 12:09:38 +0200 Subject: [PATCH 048/214] test: remove unreachable code There is no way a line can be called after throwing an exception. PR-URL: https://github.com/nodejs/node/pull/2289 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Roman Reiss Reviewed-By: Brendan Ashworth --- test/message/throw_custom_error.js | 4 ---- test/message/throw_custom_error.out | 3 +-- test/message/throw_non_error.js | 4 ---- test/message/throw_non_error.out | 3 +-- test/parallel/test-domain.js | 1 - test/parallel/test-file-write-stream.js | 1 - test/parallel/test-http-content-length.js | 1 - test/parallel/test-listen-fd-detached-inherit.js | 2 +- 8 files changed, 3 insertions(+), 16 deletions(-) diff --git a/test/message/throw_custom_error.js b/test/message/throw_custom_error.js index 270b37d14dd..bb5dae05a9b 100644 --- a/test/message/throw_custom_error.js +++ b/test/message/throw_custom_error.js @@ -2,9 +2,5 @@ var common = require('../common'); var assert = require('assert'); -console.error('before'); - // custom error throwing throw ({ name: 'MyCustomError', message: 'This is a custom message' }); - -console.error('after'); diff --git a/test/message/throw_custom_error.out b/test/message/throw_custom_error.out index bfb928d48dd..ef73c52c889 100644 --- a/test/message/throw_custom_error.out +++ b/test/message/throw_custom_error.out @@ -1,5 +1,4 @@ -before -*test*message*throw_custom_error.js:8 +*test*message*throw_custom_error.js:6 throw ({ name: 'MyCustomError', message: 'This is a custom message' }); ^ MyCustomError: This is a custom message diff --git a/test/message/throw_non_error.js b/test/message/throw_non_error.js index 33e0a051d65..a1046b725e9 100644 --- a/test/message/throw_non_error.js +++ b/test/message/throw_non_error.js @@ -2,9 +2,5 @@ var common = require('../common'); var assert = require('assert'); -console.error('before'); - // custom error throwing throw ({ foo: 'bar' }); - -console.error('after'); diff --git a/test/message/throw_non_error.out b/test/message/throw_non_error.out index c859d5f16a5..15f95fcc116 100644 --- a/test/message/throw_non_error.out +++ b/test/message/throw_non_error.out @@ -1,5 +1,4 @@ -before -*test*message*throw_non_error.js:8 +*test*message*throw_non_error.js:6 throw ({ foo: 'bar' }); ^ [object Object] diff --git a/test/parallel/test-domain.js b/test/parallel/test-domain.js index cca01572123..918e3288e8d 100644 --- a/test/parallel/test-domain.js +++ b/test/parallel/test-domain.js @@ -163,7 +163,6 @@ expectCaught++; // as a callback instead. function fn(er) { throw new Error('This function should never be called!'); - process.exit(1); } var bound = d.intercept(fn); diff --git a/test/parallel/test-file-write-stream.js b/test/parallel/test-file-write-stream.js index 7309a6bf9db..36ef283528b 100644 --- a/test/parallel/test-file-write-stream.js +++ b/test/parallel/test-file-write-stream.js @@ -26,7 +26,6 @@ file }) .on('error', function(err) { throw err; - console.error('error!', err.stack); }) .on('drain', function() { console.error('drain!', callbacks.drain); diff --git a/test/parallel/test-http-content-length.js b/test/parallel/test-http-content-length.js index 6c9576cdabf..ec60396a245 100644 --- a/test/parallel/test-http-content-length.js +++ b/test/parallel/test-http-content-length.js @@ -40,7 +40,6 @@ var server = http.createServer(function(req, res) { break; default: throw new Error('Unreachable'); - break; } receivedRequests++; diff --git a/test/parallel/test-listen-fd-detached-inherit.js b/test/parallel/test-listen-fd-detached-inherit.js index 7d4df0c1aec..472b1e8ff93 100644 --- a/test/parallel/test-listen-fd-detached-inherit.js +++ b/test/parallel/test-listen-fd-detached-inherit.js @@ -64,8 +64,8 @@ function test() { // Then output the child's pid, and immediately exit. function parent() { var server = net.createServer(function(conn) { - throw new Error('Should not see connections on parent'); conn.end('HTTP/1.1 403 Forbidden\r\n\r\nI got problems.\r\n'); + throw new Error('Should not see connections on parent'); }).listen(PORT, function() { console.error('server listening on %d', PORT); From 3f821b96ebbcb8afb89d0d05a728c43f06528d8e Mon Sep 17 00:00:00 2001 From: Jacob Edelman Date: Sat, 15 Aug 2015 10:56:12 -0700 Subject: [PATCH 049/214] doc: fix spelling mistake in node.js comment Per: https://github.com/joyent/node/pull/8876 PR-URL: https://github.com/nodejs/node/pull/2391 Reviewed-By: Ben Noordhuis Reviewed-By: Roman Reiss --- src/node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index e2c1de9d35d..685a3692c61 100644 --- a/src/node.js +++ b/src/node.js @@ -277,7 +277,7 @@ process._tickDomainCallback = _tickDomainCallback; // This tickInfo thing is used so that the C++ code in src/node.cc - // can have easy accesss to our nextTick state, and avoid unnecessary + // can have easy access to our nextTick state, and avoid unnecessary // calls into JS land. const tickInfo = process._setupNextTick(_tickCallback, _runMicrotasks); From d9b70f9cbfe1d76a516378afa0ade0818d45bfd4 Mon Sep 17 00:00:00 2001 From: Mike Atkins Date: Mon, 10 Aug 2015 11:55:37 -0400 Subject: [PATCH 050/214] tls: handle empty cert in checkServerIndentity This resolves joyent/node#9272. `tlsSocket.getPeerCertificate` will return an empty object when the peer does not provide a certificate, but, prior to this, when the certificate is empty, `checkServerIdentity` would throw because the `subject` wasn't present on the cert. `checkServerIdentity` must return an error, not throw one, so this returns an error when the cert is empty instead of throwing a `TypeError`. PR-URL: https://github.com/nodejs/node/pull/2343 Reviewed-By: Fedor Indutny Reviewed-By: Shigeki Ohtsu --- lib/tls.js | 4 +++- test/parallel/test-tls-check-server-identity.js | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/tls.js b/lib/tls.js index 714fdebfc07..0e22242bc47 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -151,7 +151,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) { host, ips.join(', ')); } - } else { + } else if (cert.subject) { // Transform hostname to canonical form if (!/\.$/.test(host)) host += '.'; @@ -204,6 +204,8 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) { cert.subject.CN); } } + } else { + reason = 'Cert is empty'; } if (!valid) { diff --git a/test/parallel/test-tls-check-server-identity.js b/test/parallel/test-tls-check-server-identity.js index e659f40aa90..8d2155b94ea 100644 --- a/test/parallel/test-tls-check-server-identity.js +++ b/test/parallel/test-tls-check-server-identity.js @@ -30,6 +30,13 @@ var tests = [ 'DNS:omg.com' }, + // Empty Cert + { + host: 'a.com', + cert: { }, + error: 'Cert is empty' + }, + // Multiple CN fields { host: 'foo.com', cert: { From 77075ec90652840b666de36c3e0e437009c7c7a2 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Wed, 12 Aug 2015 15:30:01 +0200 Subject: [PATCH 051/214] crypto: fix mem {de}allocation in ExportChallenge Use correct deallocator for returned buffera. Don't free internal structure via ASN1_STRING_data. Deallocate NETSCAPE_SPKI. PR-URL: https://github.com/nodejs/node/pull/2359 Reviewed-By: Fedor Indutny --- src/node_crypto.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 1af462490f0..c647d327edc 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5279,10 +5279,12 @@ const char* Certificate::ExportChallenge(const char* data, int len) { if (sp == nullptr) return nullptr; - const char* buf = nullptr; - buf = reinterpret_cast(ASN1_STRING_data(sp->spkac->challenge)); + unsigned char* buf = nullptr; + ASN1_STRING_to_UTF8(&buf, sp->spkac->challenge); - return buf; + NETSCAPE_SPKI_free(sp); + + return reinterpret_cast(buf); } @@ -5309,7 +5311,7 @@ void Certificate::ExportChallenge(const FunctionCallbackInfo& args) { Local outString = Encode(env->isolate(), cert, strlen(cert), BUFFER); - delete[] cert; + OPENSSL_free(const_cast(cert)); args.GetReturnValue().Set(outString); } From f5cf24afbcf06764e6d0f860df17319b4d999d64 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 19 Aug 2015 20:45:26 +1000 Subject: [PATCH 052/214] doc: add TSC meeting minutes 2015-07-22 PR-URL: https://github.com/nodejs/node/pull/2436 Reviewed-By: Ben Noordhuis --- doc/tsc-meetings/2015-07-22.md | 168 +++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 doc/tsc-meetings/2015-07-22.md diff --git a/doc/tsc-meetings/2015-07-22.md b/doc/tsc-meetings/2015-07-22.md new file mode 100644 index 00000000000..bca7d7991fe --- /dev/null +++ b/doc/tsc-meetings/2015-07-22.md @@ -0,0 +1,168 @@ +# Node.js Foundation TSC Meeting 2015-07-22 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-22 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/69 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/1r8boI4E67Cq7PEsYeIpXkFZM0be4Ww5UDlNr_uXOop0 + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting. + +### nodejs/io.js + +* doc: add GPG fingerprint for cjihrig [#2217](https://github.com/nodejs/io.js/pull/2217) +* Process & Approval for Collab Summit Travel Fund [#2213](https://github.com/nodejs/io.js/issues/2213) +* TC39 representation for the Node.js Foundation [#2153](https://github.com/nodejs/io.js/issues/2153) +* Next branch release versioning [#2215](https://github.com/nodejs/io.js/issues/2215) + +## Minutes + + +### Present + +* Mikeal Rogers +* Rod Vagg (TSC) +* Colin Ihrig (TSC) +* James Snell (TSC) +* Fedor Indutny (TSC) +* Michael Dawson (TSC) +* Steven R Loomis (TSC) +* Jeremiah Senkpiel (TSC) +* Brian White (TSC) +* Ben Noordhuis (TSC) +* Trevor Norris (TSC) +* Chris Dickinson (TSC) +* Mike Dolan (Linux F) +* Emily Ratliff (Linux F) + +### Security Policy Discussion + +Emily Ratliff from the LF has joined us to help with our security and disclosure policy. TSC members were sent a briefing prior to the meeting. + +Discussed ISO 29147 “Vulnerability Disclosure Overview” and ISO 30111 “Vulnerability Handling Processes Overview”. + + +### Review of the previous meeting + +* Foundation Discussion (@mikeal leading) +* Intl [#238](https://github.com/nodejs/io.js/issues/238) +* TC39 representation [#2153](https://github.com/nodejs/io.js/issues/2153) +* lts: LTS Proposal (https://github.com/nodejs/LTS#proposed-lts)[ Proposal: Release Process] [#1997](https://github.com/nodejs/io.js/issues/1997) + +### Standup: + +* Mikeal Rogers: preparing for the foundation board meeting +* Rod Vagg: working on 3.0 and release candidates / NAN +* Colin Ihrig: reviewing issues & PRs, worked with julien to do releases from joyent/node 0.x branches +* James Snell: working on smoke-testing npm modules +* Fedor Indutny: doing so bug fixes, and reviewing PRs +* Michael Dawson: some joyent/node issue triage, PPC build work +* Steven R Loomis: some Intl WG work, working on getting the Intl commits from joyent/node into io.js +* Jeremiah Senkpiel: reviewing issues + prs, doing work on REPL in light of 3.0; fixing bugs in REPL +* Brian White: working more on the in-browser node.js/io.js benchmarking tool, which is now in a usable state. using it now to test current and future performance improvement techniques for the the js http parser +* Ben Noordhuis: (no mic) +* Trevor Norris: did a fix for the buffer implementation for the 3.0 release +* Chris Dickinson: npm work. + +### doc: add GPG fingerprint for cjihrig [#2217](https://github.com/nodejs/io.js/pull/2217) + +* Rod +1 +* James +1 +* Fedor +1 +* Michael +1 +* Steven +1 +* Jeremiah +1 +* Brian +1 +* Ben +1 +* Trevor +1 +* Chris +1 + +Action: make sure Colin’s GPG key setup is correct on the PR, after we can merge and Rod can add Colin’s credentials to the build server. + +### Process & Approval for Collab Summit Travel Fund [#2213](https://github.com/nodejs/io.js/issues/2213) + +* Mikeal: budget auditing requires that spending be approved by the board - need to approve the budget and the process for expenditure of those funds. Mikeal has a proposal for the process with basic limits and a process for having the TSC approve expenditure beyond that. + + +**Process as outlined** + +* TSC approves target budget (max amount to spend on travel) and caps on each type of spend (with the possibility that the TSC can approve a specific spend over if need be). +* Contributors in need of the fund apply (this will happen in the GitHub thread) but should explicitly state if they need flight, accommodation or both. +* If the number of contributors in need of the fund exceeds the target budget the TSC will prioritize the list of contributors applying for the fund. + + +Voting on approving the process stated above: + +* Rod: +1 +* James: +1 +* Fedor: +1 +* Michael: +1 +* Steven: +1 +* Jeremiah: +1 +* Brian: +1 +* Ben: +1 +* Trevor: +1 +* Chris: +1 + + +Specific proposal for August + +* 15K max budget (we had previously talked about 10K but I don't think that is enough) +* Approve a $900 max spend per person on accommodations. +* Approve a $500 max spend on domestic travel +* Approve a $1500 max spend on international travel (if someone has to go over it just requires additional TSC approval) + +* Rod: +1 +* James: +1 +* Fedor: +1 +* Michael: +1 +* Steven: +1 +* Jeremiah: +1 +* Brian: +1 +* Ben: +1 +* Trevor: +1 +* Chris: +1 + + +Approval for extra expenditure for @joaocgreis (from Portugal): $1,742.66 + +* Rod: +1 +* James: +1 +* Fedor: +1 +* Michael: +1 +* Steven: +1 +* Jeremiah: +1 +* Brian: +1 +* Ben: +1 +* Trevor: +1 +* Chris: +1 + +Approval for expenditure on @yosuke-furukawa (from Japan) max spend of $2400 + +* Rod: +1 +* James: +1 +* Fedor: +1 +* Michael: +1 +* Steven: +1 +* Jeremiah: +1 +* Brian: +1 +* Ben: +1 +* Trevor: +1 +* Chris: +1 + +### Next branch release versioning [#2215](https://github.com/nodejs/io.js/issues/2215) + +* Rod outlined the state of play: + - LTS WG moved from “proposal” to “plan” but are still depending on the stable release branch having a clear process + - LTS WG discussed a proposal by Trevor for how to handle next/canary/alpha & master & release branches & LTS branches: https://gist.github.com/trevnorris/7620a64b086e95271197 +* Mikeal: it’s more helpful if we think about V8 upgrades as a pull-request to master rather than a separate “next” that has to be separately managed. + +Much bikeshedding was had in an attempt to move forward. + +Group agreed in general with Trevor’s proposal, will organise further discussions amongst the group of interested parties at another time. + +### Next Meeting + +July 29th 2015 From 56a2ae9cef7bbdac31cee0f99b45bc83170a4c11 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Fri, 21 Aug 2015 04:15:55 -0500 Subject: [PATCH 053/214] src: improve startup time Previously, V8:SetFlagsFromCommandLine was being called even if v8_argc was 0. This change prevents that from being called unless v8 arguments are actually passed. Improves startup time by about 5%. PR-URL: https://github.com/nodejs/node/pull/2483 Reviewed-By: Rod Vagg Reviewed-By: Sakthipriyan Vairamani --- src/node.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index e1ca866f869..ad9184e53c8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3706,7 +3706,8 @@ void Init(int* argc, #endif // The const_cast doesn't violate conceptual const-ness. V8 doesn't modify // the argv array or the elements it points to. - V8::SetFlagsFromCommandLine(&v8_argc, const_cast(v8_argv), true); + if (v8_argc != 0) + V8::SetFlagsFromCommandLine(&v8_argc, const_cast(v8_argv), true); // Anything that's still in v8_argv is not a V8 or a node option. for (int i = 1; i < v8_argc; i++) { From c1ce423b357b2f35d1d39419e0b03517963cccab Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 20 Aug 2015 16:57:14 -0700 Subject: [PATCH 054/214] string_bytes: fix unaligned write in UCS2 Support unaligned output buffer when writing out UCS2 in `StringBytes::Write`. Fix: https://github.com/nodejs/node/issues/2457 PR-URL: https://github.com/nodejs/node/pull/2480 Reviewed-By: Trevor Norris --- src/string_bytes.cc | 80 +++++++++++++++++++++++++++++++++++++-------- src/string_bytes.h | 9 +++++ 2 files changed, 76 insertions(+), 13 deletions(-) diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 0abdbf85bbc..3d568c6ca13 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -293,6 +293,46 @@ bool StringBytes::GetExternalParts(Isolate* isolate, } +size_t StringBytes::WriteUCS2(char* buf, + size_t buflen, + size_t nbytes, + const char* data, + Local str, + int flags, + size_t* chars_written) { + uint16_t* const dst = reinterpret_cast(buf); + + size_t max_chars = (buflen / sizeof(*dst)); + size_t nchars; + size_t alignment = reinterpret_cast(dst) % sizeof(*dst); + if (alignment == 0) { + nchars = str->Write(dst, 0, max_chars, flags); + *chars_written = nchars; + return nchars * sizeof(*dst); + } + + uint16_t* aligned_dst = + reinterpret_cast(buf + sizeof(*dst) - alignment); + ASSERT_EQ(reinterpret_cast(aligned_dst) % sizeof(*dst), 0); + + // Write all but the last char + nchars = str->Write(aligned_dst, 0, max_chars - 1, flags); + + // Shift everything to unaligned-left + memmove(dst, aligned_dst, nchars * sizeof(*dst)); + + // One more char to be written + uint16_t last; + if (nchars == max_chars - 1 && str->Write(&last, nchars, 1, flags) != 0) { + memcpy(buf + nchars * sizeof(*dst), &last, sizeof(last)); + nchars++; + } + + *chars_written = nchars; + return nchars * sizeof(*dst); +} + + size_t StringBytes::Write(Isolate* isolate, char* buf, size_t buflen, @@ -334,26 +374,40 @@ size_t StringBytes::Write(Isolate* isolate, break; case UCS2: { - uint16_t* const dst = reinterpret_cast(buf); size_t nchars; + if (is_extern && !str->IsOneByte()) { memcpy(buf, data, nbytes); - nchars = nbytes / sizeof(*dst); + nchars = nbytes / sizeof(uint16_t); } else { - nchars = buflen / sizeof(*dst); - nchars = str->Write(dst, 0, nchars, flags); - nbytes = nchars * sizeof(*dst); - } - if (IsBigEndian()) { - // Node's "ucs2" encoding wants LE character data stored in - // the Buffer, so we need to reorder on BE platforms. See - // http://nodejs.org/api/buffer.html regarding Node's "ucs2" - // encoding specification - for (size_t i = 0; i < nchars; i++) - dst[i] = dst[i] << 8 | dst[i] >> 8; + nbytes = WriteUCS2(buf, buflen, nbytes, data, str, flags, &nchars); } if (chars_written != nullptr) *chars_written = nchars; + + if (!IsBigEndian()) + break; + + // Node's "ucs2" encoding wants LE character data stored in + // the Buffer, so we need to reorder on BE platforms. See + // http://nodejs.org/api/buffer.html regarding Node's "ucs2" + // encoding specification + + const bool is_aligned = + reinterpret_cast(buf) % sizeof(uint16_t); + if (is_aligned) { + uint16_t* const dst = reinterpret_cast(buf); + for (size_t i = 0; i < nchars; i++) + dst[i] = dst[i] << 8 | dst[i] >> 8; + break; + } + + ASSERT_EQ(sizeof(uint16_t), 2); + for (size_t i = 0; i < nchars; i++) { + char tmp = buf[i * 2]; + buf[i * 2] = buf[i * 2 + 1]; + buf[i * 2 + 1] = tmp; + } break; } diff --git a/src/string_bytes.h b/src/string_bytes.h index 2fcfedaa098..7c044ebaf56 100644 --- a/src/string_bytes.h +++ b/src/string_bytes.h @@ -151,6 +151,15 @@ class StringBytes { enum encoding encoding) { return Encode(v8::Isolate::GetCurrent(), buf, buflen, encoding); }) + + private: + static size_t WriteUCS2(char* buf, + size_t buflen, + size_t nbytes, + const char* data, + v8::Local str, + int flags, + size_t* chars_written); }; } // namespace node From 1cd794f1296ec1b7ead8da2e4456a218d44bc158 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 21 Aug 2015 12:48:10 -0700 Subject: [PATCH 055/214] buffer: reapply 07c0667 Original commit message: buffer: align chunks on 8-byte boundary When slicing global pool - ensure that the underlying buffer's data ptr is 8-byte alignment to do not ruin expectations of 3rd party C++ addons. NOTE: 0.10 node.js always returned aligned pointers and io.js should do this too for compatibility. PR-URL: https://github.com/nodejs/node/pull/2487 Reviewed-By: Trevor Norris --- lib/buffer.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/buffer.js b/lib/buffer.js index 403c344bdbe..4166724b732 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -21,6 +21,15 @@ function createPool() { } +function alignPool() { + // Ensure aligned slices + if (poolOffset & 0x7) { + poolOffset |= 0x7; + poolOffset++; + } +} + + function Buffer(arg) { // Common case. if (typeof arg === 'number') { @@ -66,6 +75,7 @@ function allocate(size) { createPool(); var b = binding.slice(allocPool, poolOffset, poolOffset + size); poolOffset += size; + alignPool(); return b; } else { return binding.create(size); @@ -86,6 +96,7 @@ function fromString(string, encoding) { var actual = allocPool.write(string, poolOffset, encoding); var b = binding.slice(allocPool, poolOffset, poolOffset + actual); poolOffset += actual; + alignPool(); return b; } From 5d7486941b7ca5df8d8bd199ffb694ae1c5e9cec Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 17 Aug 2015 12:03:32 -0700 Subject: [PATCH 056/214] repl: filter integer keys from repl tab complete list Refactored version of https://github.com/joyent/node/pull/25819 Removes integer keys (and keys starting with numbers) from candidate list on repl tab complete. Refactored the originally submitted change to simplify and ensure that the integer keys do not show up on objects either. Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2409 --- lib/repl.js | 17 ++++-- test/parallel/test-repl-tab-complete.js | 70 +++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 4 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 366b2b7b0a7..d099725bc1d 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -561,6 +561,15 @@ const requireRE = /\brequire\s*\(['"](([\w\.\/-]+\/)?([\w\.\/-]*))/; const simpleExpressionRE = /(([a-zA-Z_$](?:\w|\$)*)\.)*([a-zA-Z_$](?:\w|\$)*)\.?$/; +function intFilter(item) { + // filters out anything not starting with A-Z, a-z, $ or _ + return /^[A-Za-z_$]/.test(item); +} + +function filteredOwnPropertyNames(obj) { + if (!obj) return []; + return Object.getOwnPropertyNames(obj).filter(intFilter); +} // Provide a list of completions for the given leading text. This is // given to the readline interface for handling tab completion. @@ -705,9 +714,9 @@ REPLServer.prototype.complete = function(line, callback) { if (this.useGlobal || vm.isContext(this.context)) { var contextProto = this.context; while (contextProto = Object.getPrototypeOf(contextProto)) { - completionGroups.push(Object.getOwnPropertyNames(contextProto)); + completionGroups.push(filteredOwnPropertyNames(contextProto)); } - completionGroups.push(Object.getOwnPropertyNames(this.context)); + completionGroups.push(filteredOwnPropertyNames(this.context)); addStandardGlobals(completionGroups, filter); completionGroupsLoaded(); } else { @@ -733,7 +742,7 @@ REPLServer.prototype.complete = function(line, callback) { if (obj != null) { if (typeof obj === 'object' || typeof obj === 'function') { try { - memberGroups.push(Object.getOwnPropertyNames(obj)); + memberGroups.push(filteredOwnPropertyNames(obj)); } catch (ex) { // Probably a Proxy object without `getOwnPropertyNames` trap. // We simply ignore it here, as we don't want to break the @@ -751,7 +760,7 @@ REPLServer.prototype.complete = function(line, callback) { p = obj.constructor ? obj.constructor.prototype : null; } while (p !== null) { - memberGroups.push(Object.getOwnPropertyNames(p)); + memberGroups.push(filteredOwnPropertyNames(p)); p = Object.getPrototypeOf(p); // Circular refs possible? Let's guard against that. sentinel--; diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 856fd9b041f..aca26648cf4 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -248,3 +248,73 @@ testMe.complete('proxy.', common.mustCall(function(error, data) { assert.strictEqual(error, null); assert.deepEqual(data, [[], 'proxy.']); })); + +// Make sure tab completion does not include integer members of an Array +var array_elements = [ [ + 'ary.__defineGetter__', + 'ary.__defineSetter__', + 'ary.__lookupGetter__', + 'ary.__lookupSetter__', + 'ary.__proto__', + 'ary.constructor', + 'ary.hasOwnProperty', + 'ary.isPrototypeOf', + 'ary.propertyIsEnumerable', + 'ary.toLocaleString', + 'ary.toString', + 'ary.valueOf', + '', + 'ary.concat', + 'ary.entries', + 'ary.every', + 'ary.filter', + 'ary.forEach', + 'ary.indexOf', + 'ary.join', + 'ary.keys', + 'ary.lastIndexOf', + 'ary.length', + 'ary.map', + 'ary.pop', + 'ary.push', + 'ary.reduce', + 'ary.reduceRight', + 'ary.reverse', + 'ary.shift', + 'ary.slice', + 'ary.some', + 'ary.sort', + 'ary.splice', + 'ary.unshift' ], + 'ary.']; + +putIn.run(['.clear']); + +putIn.run(['var ary = [1,2,3];']); +testMe.complete('ary.', common.mustCall(function(error, data) { + assert.deepEqual(data, array_elements); +})); + +// Make sure tab completion does not include integer keys in an object +var obj_elements = [ [ + 'obj.__defineGetter__', + 'obj.__defineSetter__', + 'obj.__lookupGetter__', + 'obj.__lookupSetter__', + 'obj.__proto__', + 'obj.constructor', + 'obj.hasOwnProperty', + 'obj.isPrototypeOf', + 'obj.propertyIsEnumerable', + 'obj.toLocaleString', + 'obj.toString', + 'obj.valueOf', + '', + 'obj.a' ], + 'obj.' ]; +putIn.run(['.clear']); +putIn.run(['var obj = {1:"a","1a":"b",a:"b"};']); + +testMe.complete('obj.', common.mustCall(function(error, data) { + assert.deepEqual(data, obj_elements); +})); From 87a9ef0a404a1758ba160020505702d0909f2540 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 20 Aug 2015 11:00:16 +1000 Subject: [PATCH 057/214] doc: add audio recording links to TSC meeting minutes PR-URL: https://github.com/nodejs/node/pull/2454 Reviewed-By: James M Snell --- doc/tsc-meetings/2015-05-27.md | 1 + doc/tsc-meetings/2015-06-10.md | 1 + doc/tsc-meetings/2015-06-17.md | 1 + doc/tsc-meetings/2015-07-01.md | 1 + doc/tsc-meetings/2015-07-08.md | 1 + doc/tsc-meetings/2015-07-15.md | 1 + 6 files changed, 6 insertions(+) diff --git a/doc/tsc-meetings/2015-05-27.md b/doc/tsc-meetings/2015-05-27.md index 7d93cd89dd4..e6fd277f194 100644 --- a/doc/tsc-meetings/2015-05-27.md +++ b/doc/tsc-meetings/2015-05-27.md @@ -2,6 +2,7 @@ ## Links +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-05-27 * **Public YouTube feed**: http://www.youtube.com/watch?v=0DPfLxulsbQ * **GitHub Issue**: https://github.com/nodejs/node/issues/41 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1-KlxiQGMsJFNJu3meok9e9XFsM39k_PMnQmY_9d_cy0 diff --git a/doc/tsc-meetings/2015-06-10.md b/doc/tsc-meetings/2015-06-10.md index 989541d1c88..d3bee7b7c87 100644 --- a/doc/tsc-meetings/2015-06-10.md +++ b/doc/tsc-meetings/2015-06-10.md @@ -2,6 +2,7 @@ ## Links +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-06-10 * **GitHub Issue**: https://github.com/nodejs/node/issues/53 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1cn7SKaKYUMYLBiQhE6HAAknnwPabKsYjpOuyQkVikW8 diff --git a/doc/tsc-meetings/2015-06-17.md b/doc/tsc-meetings/2015-06-17.md index b4dc10571ac..5add97a8722 100644 --- a/doc/tsc-meetings/2015-06-17.md +++ b/doc/tsc-meetings/2015-06-17.md @@ -2,6 +2,7 @@ ## Links +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-06-17 * **GitHub Issue**: https://github.com/nodejs/node/issues/56 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1d4mAJgm06rpPWLDqhZcxsRnKMrS92Ip4CW2akOyeIL4 diff --git a/doc/tsc-meetings/2015-07-01.md b/doc/tsc-meetings/2015-07-01.md index ca7f9b06e93..0ab9587d42b 100644 --- a/doc/tsc-meetings/2015-07-01.md +++ b/doc/tsc-meetings/2015-07-01.md @@ -2,6 +2,7 @@ ## Links +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-01 * **GitHub Issue**: https://github.com/nodejs/node/issues/60 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1TN3Ks0fC4ciY3jeS0VxXxXRkT_dq8-tfs-bWQqZGRoE diff --git a/doc/tsc-meetings/2015-07-08.md b/doc/tsc-meetings/2015-07-08.md index d70f39b7df5..2391467e7a7 100644 --- a/doc/tsc-meetings/2015-07-08.md +++ b/doc/tsc-meetings/2015-07-08.md @@ -2,6 +2,7 @@ ## Links +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-08 * **GitHub Issue**: https://github.com/nodejs/node/issues/64 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1HuRtu5ZP7ZlrIp756EbZYo4I26v2RY-7CY1pr_3y1nY diff --git a/doc/tsc-meetings/2015-07-15.md b/doc/tsc-meetings/2015-07-15.md index 485c3513b41..c1f7dd8bd91 100644 --- a/doc/tsc-meetings/2015-07-15.md +++ b/doc/tsc-meetings/2015-07-15.md @@ -2,6 +2,7 @@ ## Links +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-15 * **GitHub Issue**: https://github.com/nodejs/node/issues/67 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1r8boI4E67Cq7PEsYeIpXkFZM0be4Ww5UDlNr_uXOop0 From 14f2aee1dff45127dd0848ad8631c58e6cf66814 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 20 Aug 2015 13:29:55 +1000 Subject: [PATCH 058/214] doc: fix links to original gh issues for TSC meetings nodejs/node -> nodejs/node-convergence-archive PR-URL: https://github.com/nodejs/node/pull/2454 Reviewed-By: James M Snell --- doc/tsc-meetings/2015-05-27.md | 2 +- doc/tsc-meetings/2015-06-10.md | 2 +- doc/tsc-meetings/2015-06-17.md | 2 +- doc/tsc-meetings/2015-07-01.md | 2 +- doc/tsc-meetings/2015-07-08.md | 2 +- doc/tsc-meetings/2015-07-15.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/tsc-meetings/2015-05-27.md b/doc/tsc-meetings/2015-05-27.md index e6fd277f194..ade08a20ec7 100644 --- a/doc/tsc-meetings/2015-05-27.md +++ b/doc/tsc-meetings/2015-05-27.md @@ -4,7 +4,7 @@ * **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-05-27 * **Public YouTube feed**: http://www.youtube.com/watch?v=0DPfLxulsbQ -* **GitHub Issue**: https://github.com/nodejs/node/issues/41 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/41 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1-KlxiQGMsJFNJu3meok9e9XFsM39k_PMnQmY_9d_cy0 ## Agenda diff --git a/doc/tsc-meetings/2015-06-10.md b/doc/tsc-meetings/2015-06-10.md index d3bee7b7c87..a554b582649 100644 --- a/doc/tsc-meetings/2015-06-10.md +++ b/doc/tsc-meetings/2015-06-10.md @@ -3,7 +3,7 @@ ## Links * **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-06-10 -* **GitHub Issue**: https://github.com/nodejs/node/issues/53 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/53 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1cn7SKaKYUMYLBiQhE6HAAknnwPabKsYjpOuyQkVikW8 ## Agenda diff --git a/doc/tsc-meetings/2015-06-17.md b/doc/tsc-meetings/2015-06-17.md index 5add97a8722..9011391db3e 100644 --- a/doc/tsc-meetings/2015-06-17.md +++ b/doc/tsc-meetings/2015-06-17.md @@ -3,7 +3,7 @@ ## Links * **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-06-17 -* **GitHub Issue**: https://github.com/nodejs/node/issues/56 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/56 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1d4mAJgm06rpPWLDqhZcxsRnKMrS92Ip4CW2akOyeIL4 ## Agenda diff --git a/doc/tsc-meetings/2015-07-01.md b/doc/tsc-meetings/2015-07-01.md index 0ab9587d42b..9fcbd9e2a36 100644 --- a/doc/tsc-meetings/2015-07-01.md +++ b/doc/tsc-meetings/2015-07-01.md @@ -3,7 +3,7 @@ ## Links * **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-01 -* **GitHub Issue**: https://github.com/nodejs/node/issues/60 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/60 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1TN3Ks0fC4ciY3jeS0VxXxXRkT_dq8-tfs-bWQqZGRoE ## Agenda diff --git a/doc/tsc-meetings/2015-07-08.md b/doc/tsc-meetings/2015-07-08.md index 2391467e7a7..0b4b60be8c7 100644 --- a/doc/tsc-meetings/2015-07-08.md +++ b/doc/tsc-meetings/2015-07-08.md @@ -3,7 +3,7 @@ ## Links * **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-08 -* **GitHub Issue**: https://github.com/nodejs/node/issues/64 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/64 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1HuRtu5ZP7ZlrIp756EbZYo4I26v2RY-7CY1pr_3y1nY ## Agenda diff --git a/doc/tsc-meetings/2015-07-15.md b/doc/tsc-meetings/2015-07-15.md index c1f7dd8bd91..c78be93bc6d 100644 --- a/doc/tsc-meetings/2015-07-15.md +++ b/doc/tsc-meetings/2015-07-15.md @@ -3,7 +3,7 @@ ## Links * **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-15 -* **GitHub Issue**: https://github.com/nodejs/node/issues/67 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/67 * **Original Minutes Google Doc**: https://docs.google.com/document/d/1r8boI4E67Cq7PEsYeIpXkFZM0be4Ww5UDlNr_uXOop0 ## Agenda From 7130b4cf1d5236cf4a7b43ae3a046636e707e56c Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 20 Aug 2015 13:41:07 +1000 Subject: [PATCH 059/214] doc: fix links to original converged repo nodejs/node -> nodejs/node-convergence-archive PR-URL: https://github.com/nodejs/node/pull/2454 Reviewed-By: James M Snell --- doc/tsc-meetings/2015-05-27.md | 18 +++++++++--------- doc/tsc-meetings/2015-06-17.md | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/tsc-meetings/2015-05-27.md b/doc/tsc-meetings/2015-05-27.md index ade08a20ec7..7c0bce36d5d 100644 --- a/doc/tsc-meetings/2015-05-27.md +++ b/doc/tsc-meetings/2015-05-27.md @@ -11,12 +11,12 @@ Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting. -### nodejs/node +### nodejs/node-convergence-archive -* \[Converge\] timers: Avoid linear scan in `_unrefActive`. [#23](https://github.com/nodejs/node/issues/23) -* \[Converge\] child_process argument type checking [#22](https://github.com/nodejs/node/issues/22) -* \[Converge\] SSLv2/3 disable/enable related commits [#20](https://github.com/nodejs/node/issues/20) -* doc: Add new working groups [#15](https://github.com/nodejs/node/pull/15) +* \[Converge\] timers: Avoid linear scan in `_unrefActive`. [#23](https://github.com/nodejs/node-convergence-archive/issues/23) +* \[Converge\] child_process argument type checking [#22](https://github.com/nodejs/node-convergence-archive/issues/22) +* \[Converge\] SSLv2/3 disable/enable related commits [#20](https://github.com/nodejs/node-convergence-archive/issues/20) +* doc: Add new working groups [#15](https://github.com/nodejs/node-convergence-archive/pull/15) ### nodejs/io.js @@ -69,7 +69,7 @@ Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting ## Minutes -### \[Converge\] timers: Avoid linear scan in `_unrefActive`. [#23](https://github.com/nodejs/node/issues/23) +### \[Converge\] timers: Avoid linear scan in `_unrefActive`. [#23](https://github.com/nodejs/node-convergence-archive/issues/23) * James: conflicting approaches in both repos * Ben: both are terrible under different workloads - do away with the code and start again @@ -77,13 +77,13 @@ Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting * Bert: some problems with http - discussion happened about the implementation * Chris: would be good to have Julien’s input since he was active on the joyent/node impl -### \[Converge\] child_process argument type checking [#22](https://github.com/nodejs/node/issues/22) +### \[Converge\] child_process argument type checking [#22](https://github.com/nodejs/node-convergence-archive/issues/22) * James: arg checking merged in 0.10 after the fork * Discussion about why this wasn’t merged to io.js * Defer back to GitHub discussion after no reason for not merging could be found on the call -### \[Converge\] SSLv2/3 disable/enable related commits [#20](https://github.com/nodejs/node/issues/20) +### \[Converge\] SSLv2/3 disable/enable related commits [#20](https://github.com/nodejs/node-convergence-archive/issues/20) * James: SSLv2/3 removed in io.js, merging these commits would involve reverting * Jeremiah proposed 0.12 being the LTS for SSLv2/3 support @@ -91,7 +91,7 @@ Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting * Michael: we don’t know how extensively it’s being used? * James: pending research into that question we’ll leave this alone, come back if there’s a compelling reason to revert -### doc: Add new working groups [#15](https://github.com/nodejs/node/pull/15) +### doc: Add new working groups [#15](https://github.com/nodejs/node-convergence-archive/pull/15) * Michael: Benchmarking and Post Mortem Debugging working groups are ready and have started, i18n group needs a bit more work to get off the ground * Group didn’t see any reason not to go forward with these groups, they have repos and can be in an “incubating” state for now diff --git a/doc/tsc-meetings/2015-06-17.md b/doc/tsc-meetings/2015-06-17.md index 9011391db3e..c07fe82b705 100644 --- a/doc/tsc-meetings/2015-06-17.md +++ b/doc/tsc-meetings/2015-06-17.md @@ -12,7 +12,7 @@ Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting ### nodejs/node -* Create a security team [#48](https://github.com/nodejs/node/issues/48) +* Create a security team [#48](https://github.com/nodejs/node-convergence-archive/issues/48) ### nodejs/io.js @@ -72,7 +72,7 @@ Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting * Steven: getting back on board * Bert: libuv work for multi-worker on Windows (https://github.com/libuv/libuv/pull/396), found a potential libuv/Windows contributor at NodeConf, NF board meeting * Alexis: Working on build & CI convergence with Rod, CI can now automatically decide what options to use for different node versions, and porting node-accept-pull-request CI job. -* Julien: time off, launching nodejs.org updates for NF launch, working on changes for 0.10/0.12 releases, onboarded two new collaborators for joyent/node - https://github.com/nodejs/node/wiki/Breaking-changes-between-v0.12-and-next-LTS-release +* Julien: time off, launching nodejs.org updates for NF launch, working on changes for 0.10/0.12 releases, onboarded two new collaborators for joyent/node - https://github.com/nodejs/LTS/wiki/Breaking-changes-between-v0.12-and-next-LTS-release * Shigeki: Working on upgrading OpenSSL, the upgrade process is becoming much simpler, landed the CINNIC whitelist * Jeremiah: NodeConf - brought back good feedback, helping spin up the Diversity WG, integrating timers heap impl, struggling with bugs * Brian: not much, triage & PR review From 51ef9106f52456b0cef9ec71a655dc886ed38f5d Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 20 Aug 2015 10:43:17 +1000 Subject: [PATCH 060/214] doc: add TSC meeting minutes 2015-06-03 PR-URL: https://github.com/nodejs/node/pull/2453 Reviewed-By: James M Snell --- doc/tsc-meetings/2015-06-03.md | 166 +++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 doc/tsc-meetings/2015-06-03.md diff --git a/doc/tsc-meetings/2015-06-03.md b/doc/tsc-meetings/2015-06-03.md new file mode 100644 index 00000000000..e9b75db5d3a --- /dev/null +++ b/doc/tsc-meetings/2015-06-03.md @@ -0,0 +1,166 @@ +# Node.js Foundation TSC Meeting 2015-06-03 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-06-03 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/47 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/1sTD0uryasBR15UBzEbJj3oHYtnuN9ZIqVxA2A_-N56E + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting. + +### nodejs/io.js + +* Add working group state per Project Lifecycle. [#1880](https://github.com/nodejs/io.js/pull/1880) +* Proposal: Split TSC agenda in to two meetings [#1879](https://github.com/nodejs/io.js/issues/1879) +* Chrome 43 released; time for V8 4.3! [#1735](https://github.com/nodejs/io.js/issues/1735) +* TSC needs to elect a board representative. [#1697](https://github.com/nodejs/io.js/issues/1697) +* Expose `deepEqual` and `deepStrictEqual` in `util`. #1172 [#1177](https://github.com/nodejs/io.js/pull/1177) + +## Present + +* Rod Vagg (TSC) +* Mikeal Rogers +* Shigeki Ohtsu (TSC) +* Chris Dickinson (TSC) +* Colin Ihrig (TSC) +* Julien Gilli (TSC) +* James Snell (TSC) +* Michael Dawson (TSC) +* Bert Belder (TSC) +* Fedor Indutny (TSC) +* Jeremiah Senkpiel (TSC) +* Domenic Denicola +* Alexis Campailla (TSC) +* Ben Noordhuis (TSC) + +## Quick stand-up + +* Rod: working on the build, looking into npm smoke-testing +* Mikeal: getting foundation legalities and officialities in order +* Shigeki: working on security issues, reviewing root cert update +* Chris: working on getting npm static analysis working [estoc](https://github.com/chrisdickinson/estoc) +* Colin: reviewing prs and issues, doing some libuv work (uv_os_homedir, which landed in libuv 1.6.0) +* Julien: vacation, nodejs.org downtime postmortem +* James: working on convergence, triaging joyent/node issues +* Michael: triaging some joyent/node issues, working on powerpc build and npm testing +* Bert: not much, looked at some issues, discussing with Saul if libuv should move into the Node Foundation +* Fedor: reviewed some pull requests and issues, working on some openssl mode +* Jeremiah: issues, convergence, `_unrefActive` timers work, looking at improving Ben’s binary heap implementation +* Domenic: vm fixes in v8 integrating patches +* Alexis: patch for timers firing early, CI convergence work - jenkins hackery +* Ben: reviewing pull requests, making libuv threadpool more scalable +* Brian: JS dns resolver +* Trevor: merged UInt8Array Buffer changes into the next branch, additional ArrayBuffer-related changes and fiddling + +## Review of last meeting + +### nodejs/node + +* \[Converge\] timers: Avoid linear scan in `_unrefActive`. [#23](https://github.com/nodejs/node/issues/23) +* \[Converge\] child_process argument type checking [#22](https://github.com/nodejs/node/issues/22) +* \[Converge\] SSLv2/3 disable/enable related commits [#20](https://github.com/nodejs/node/issues/20) +* doc: Add new working groups [#15](https://github.com/nodejs/node/pull/15) + +### nodejs/io.js + +* Buffer implemented using Uint8Array [#1810](https://github.com/nodejs/io.js/issues/1810) +* \[Discussion\] FFI - Giving Buffer more low-level C functionality [#1750](https://github.com/nodejs/io.js/pull/1750) +* Chrome 43 released; time for V8 4.3! [#1735](https://github.com/nodejs/io.js/issues/1735) +* Deprecation Policy [#1704](https://github.com/nodejs/io.js/issues/1704) +* TSC needs to elect a board representative. [#1697](https://github.com/nodejs/io.js/issues/1697) +* V8 4.4 to remove indexed properties via external data [#1451](https://github.com/nodejs/io.js/issues/1451) + +## Minutes + +### Add working group state per Project Lifecycle. [#1880](https://github.com/nodejs/io.js/pull/1880) + +* Mikeal: making working groups as “core” means they get to elect a TSC seat. +* Brief discussion about what WG’s should be considered “core” and get a TSC seat. +* Deferred to GitHub. + +### Chrome 43 released; time for V8 4.3! [#1735](https://github.com/nodejs/io.js/issues/1735) + +Domenic: things are ready to go. There’s some concern about double-breakage in 4.3 and 4.4. + +Jeremiah: what about the maybe changes? + +Domenic: the non-Maybe versions are still there, and haven’t been removed yet, either in 4.3 or 4.4 or even 4.5 (which isn’t finalized yet though). + +Rod: blocker is whether the double-breakage is real, if not then we should move forward. + +Domenic: there’s also the issue of some people in the thread advocating blocking a release on readying the ecosystem. + +Rod: we shouldn’t be following the ecosystem and waiting for them to catch up before we release. + +Mikeal: it’s more a matter of how we approach these things. + +Michael: LTS should help this? + +Mikeal: the problem is about major releases and the messaging - currently when people download them lots of stuff is broken. + +Domenic called for a vote on a 3.0 release _assuming there is no double-breakage_. + +Rod: I need to get the fix for node-gyp in place. Also we should see if we can get nvm to allow testing nightlies so that people can test them more easily (including on Travis). + +Jeremiah: when I last talked to Jordan (@ljharb) he wanted to make sure that the mechanism we used for nightlies would also be the mechanism used in the converged project. + +Mikeal: well that’s definitely true. So we should be good. + +Trevor: do we have a way of measuring uptake? + +Domenic/Rod: npm traffic is probably the best metric. + +Rod calls for a vote. + +Domenic: can we clarify whether we allow minor, covered-by-nan breakages between 4.3/3.0.0 and 4.4/4.0.0, or do we require no breakages at all? + +Mikeal: is nan released? + +Jeremiah: not yet; it is experimental and they don’t release until we merge next into master + +Mikeal: that seems bad + +(General agreement that we want nan to release first.) + +Trevor: looking at nan they seem to be working to encapsulate changes all the way out to V8 4.6. + +Bert: what was the problem with putting nan into core? + +Rod/Ben: sometimes V8 makes big changes that cause breaking changes in nan. E.g. isolates, buffer changes, maybes. Until now it’s been just individual APIs, but the 4.3 and 4.4 change has been very big. nan’s promise is just that you can write against a single, possibly-changing API that will support multiple node versions. + +### Expose `deepEqual` and `deepStrictEqual` in `util`. #1172 [#1177](https://github.com/nodejs/io.js/pull/1177) + +Jeremiah: what do we want to expose from core, there’s pressure from some parts of the community for core to be more isomorphic and support a lot of browser stuff. This issue is specifically about exposing what’s already implemented. + +Ben: why not pull it out of core and put it in npm? util has always been about utilities that core uses. + +Rod: when you expose something you’re stuck with it forever, minimising surface area should be our goal because the more we have to officially support the slower our release cycle will be. + +### Proposal: Split TSC agenda in to two meetings [#1879](https://github.com/nodejs/io.js/issues/1879) + +Mikeal: the scope of the TSC responsibilities are too wide, making meeting times go to long. The suggestion is to split up in to “project” related issues and “core” related issues. + +Rod: can there be a clear distinction between the issues? + +Domenic: assuming nobody wanted to attend two meetings, would there be enough? + +Mikeal: yes because there are lots of people that aren’t here who would be in the other group + +Rod: I wonder about the timing, e.g. letting the foundation kickoff happen first; it feels a bit premature to split now. + +Mikeal: it’s a little premature but that’s because we haven’t onboarded the core working groups to this meeting. + +Bert: in favour of the proposal. + +_Discussed the pros and cons and agreed to tentatively move forward with experimentation, time slot for the new “project” meeting would either be after the current meeting or the day after that meeting._ + +### TSC needs to elect a board representative. [#1697](https://github.com/nodejs/io.js/issues/1697) + +***Call ended prematurely due to Uberconference difficulties*** + +## Next meeting + +* + From aaefde793e0c7db74be41d14178702391a3ad9af Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 20 Aug 2015 20:46:08 +1000 Subject: [PATCH 061/214] doc: add TSC meeting minutes 2015-08-19 PR-URL: https://github.com/nodejs/node/pull/2460 Reviewed-By: James M Snell --- doc/tsc-meetings/2015-08-19.md | 120 +++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 doc/tsc-meetings/2015-08-19.md diff --git a/doc/tsc-meetings/2015-08-19.md b/doc/tsc-meetings/2015-08-19.md new file mode 100644 index 00000000000..55b862aa88b --- /dev/null +++ b/doc/tsc-meetings/2015-08-19.md @@ -0,0 +1,120 @@ +# Node.js Foundation TSC Meeting 2015-08-19 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-08-19 +* **GitHub Issue**: https://github.com/nodejs/node/issues/2435 +* **Minutes Google Doc**: https://docs.google.com/document/d/1xsj_4UlrLNxahRvC7SpLtFM3D-Ks6CZEqEM5nyj6bjk +* _Previous Minutes Google Doc: _ + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting. + +* Procedure for rolling out node-accept-pull-request [#2434](https://github.com/nodejs/node/issues/2434) +* Release procedure changes & nominating @sam-github and @jasnell as releasers [#2416](https://github.com/nodejs/node/issues/2416) + +## Minutes + + +### Present + +* Mikeal Rogers +* Rod Vagg (TSC) +* James Snell (TSC) +* Michael Dawson (TSC) +* Steven R Loomis (TSC) +* Chris Dickinson (TSC) +* Alexis Campailla (TSC) +* Brian White (TSC) +* Jeremiah Senkpiel (TSC) +* Shigeki Ohtsu (TSC) +* Trevor Norris (TSC) +* Domenic Denicola +* Ben Noordhuis (TSC) +* Colin Ihrig (TSC) +* Bert Belder (TSC) + + +### Standup + +* Mikeal Rogers: Linuxconf, preparing next board meeting agenda, nailing down the foundation conf +* Rod Vagg: build work, memory leak testing, progress towards v4 (mainly infra) +* James Snell: some joyent/node PR triaging, preparing for nodeconf.eu +* Michael Dawson: nodeconf.eu, some AIX build work, talking to the v8 team about security notifications +* Steven R Loomis: Intl WG, landed Intl with small-icu by default in nodejs/node +* Chris Dickinson: first docs WG meeting, working on streams docs (again), working on docs tooling +* Alexis Campailla: working on ci convergence and jenkins jobs +* Brian White: not much, looking over issues and PRs, submitted a couple PRs +* Jeremiah Senkpiel: not so much, working on 0.10, 0.12 -> v4 upgrade docs, 3.1.0 release which should be ready straight after this meeting. +* Shigeki Ohtsu: little time to work on node right now, joined the LTS meeting to discuss OpenSSL LTS +* Trevor Norris: reviewing issues and PRs, noticed a bug in asyncwrap +* Domenic Denicola: issues and PRs, v8 team has a new Project Manager who is more interested in node; communicated our API stability concerns to him +* Ben Noordhuis: fixed a big memory leak, fixed a regression in windows module loading, reviewing PRs, responding to bug reports + +### Review of the previous meeting + +* Travel assistance amendment (no issue for this) +* FYI: Collaboration WG: https://github.com/nodejs/collaboration +* Summit recap +* level-set on repo rename +* Future: “project lifecycle” (Mikeal) - process by which top level projects are added (libuv, node-gyp, etc), (conferences…) + +### Procedure for rolling out node-accept-pull-request [#2434](https://github.com/nodejs/node/issues/2434) + +* Discussed some potential concerns, which were alleviated: +* Jeremiah: Wondered how to land PRs where nits needed to be fixed. +* Bert: Concerns about Jenkins costantly building the wrong PR in the io.js CI infrastructure. +* Trevor: asked for a dropdown to pick the reviewers. +* Bert: asked whether the job would support landing multiple commits. Alexis confirmed this. +* Alexis: mentioned that there is also an node-accept-commit job that is more low-level and advanced. + +### Release procedure changes & nominating @sam-github and @jasnell as releasers [#2416](https://github.com/nodejs/node/issues/2416) + +Votes for @jasnell: + +* Rod Vagg: +1 +* Michael Dawson: +1 +* Steven R Loomis: +1 +* Chris Dickinson: +1 +* Alexis Campailla: +1 +* Brian White: +1 +* Jeremiah Senkpiel: +1 +* Shigeki Ohtsu: +1 +* Trevor Norris: +1 +* Ben Noordhuis: +1 +* Colin Ihrig: +1 +* Bert Belder: +1 + +Votes for @sam-github: + +* Rod Vagg: +1 +* Michael Dawson: +1 +* Steven R Loomis: +1 +* Chris Dickinson: +1 +* Alexis Campailla: +1 +* Brian White: +1 +* Jeremiah Senkpiel: +1 +* Shigeki Ohtsu: +1 +* Trevor Norris: +1 +* Ben Noordhuis: +1 +* Colin Ihrig: +1 +* Bert Belder: +1 + +No objections to combining the a whole "release team" to handle all release branches including 0.10, 0.12, stable and LTS. + +### node-gyp is now in our org [#2379](https://github.com/nodejs/node/issues/2379) + +* Rod: node-gyp has a busy issue tracker and has no tests, needs more eyes +* Ben: Zero tests? +* Rod: Correct. +* Domenic: on Windows Chromium’s depot_tools will automatically download VS community edition and put it in the right place. Someone with copious free time could have node-gyp do similar things. + +* Discussed maybe looking at `gn` (the eventual replacement for `gyp`) + +* Domenic: even v8 still uses gyp, don’t worry about it for a good while until noise about it being deprecated gets louder +* Rod: issue [#151](https://github.com/nodejs/build/issues/151) in build has a discussion about precompiled native addons. Chime in! + +## Next Meeting + +August 26th From 2c7b9257ea091943e2c46fcad45d6faf9766749d Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 19 Aug 2015 20:47:47 +1000 Subject: [PATCH 062/214] doc: add TSC meeting minutes 2015-07-29 PR-URL: https://github.com/nodejs/node/pull/2437 Reviewed-By: Ben Noordhuis --- doc/tsc-meetings/2015-07-29.md | 89 ++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 doc/tsc-meetings/2015-07-29.md diff --git a/doc/tsc-meetings/2015-07-29.md b/doc/tsc-meetings/2015-07-29.md new file mode 100644 index 00000000000..e3b27a30dd1 --- /dev/null +++ b/doc/tsc-meetings/2015-07-29.md @@ -0,0 +1,89 @@ +# Node.js Foundation TSC Meeting 2015-07-29 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-07-29 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/71 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/1FBmDczHD4D8jfffc6A8CW-K9mmT0KI8shG6dm_d3jXI +* Previous minutes: https://docs.google.com/document/d/1eCETYn44gAOUp0udl22QxqyxrJ0oEeAFRdWHDCIq9V4 + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting. + +### nodejs/io.js + +* Next branch release versioning [#2215](https://github.com/nodejs/io.js/issues/2215) +* TSC Chair - Election? [#2136](https://github.com/nodejs/io.js/issues/2136) + +## Minutes + + +### Present + +* Mikeal Rogers +* Rod Vagg (TSC) +* Colin Ihrig (TSC) +* James Snell (TSC) +* Fedor Indutny (TSC) +* Michael Dawson (TSC) +* Steven R Loomis (TSC) +* Jeremiah Senkpiel (TSC) +* Shigeki Ohtsu(TSC) +* Ben Noordhuis (TSC) +* Trevor Norris (TSC) +* Chris Dickinson (TSC) +* Alexis Campailla (TSC) +* Bert Belder (TSC) + +### Review of the previous meeting + +* Security Policy Discussion +* doc: add GPG fingerprint for cjihrig [#2217](https://github.com/nodejs/io.js/pull/2217) +* Process & Approval for Collab Summit Travel Fund [#2213](https://github.com/nodejs/io.js/issues/2213) +* Next branch release versioning [#2215](https://github.com/nodejs/io.js/issues/2215) + + +### Standup: + +* Mikeal Rogers: Got ready for the board meeting, working to get the new website spun up based on the iojs.org build system +* Rod Vagg: Finished writing NAN 2.0 documentation +* Colin Ihrig: Issues & PRs, did the 2.5.0 release (armv6 build had an issue), playing around with the citgm package smoke-testing tool +* James Snell: Working on citgm (npm package smoke-testing), halfway done writing up the release plan +* Fedor Indutny: ? +* Michael Dawson: Triaging joyent/node issues / PRs, looking at AIX build support on the `next` branch, looking at updating some docs +* Steven R Loomis: Worked on the Intl converge PR [#2264](https://github.com/nodejs/io.js/pull/2264) +* Jeremiah Senkpiel: Issue and PR review, helping to get someone to start contributing to core +* Ben Noordhuis: not much, reviewed some PRs this week and did some minor patches +* Trevor Norris: Just had time to review some issues and respond to PRs +* Chris Dickinson: Not much, did docs work, trying to document streams (again), and the REPL history-paintext change PR [#2224](https://github.com/nodejs/io.js/pull/2224) +* Alexis Campailla: Working on CI/Jenkins convergence, and some windows issue triage +* Shigeki Ohtsu: Working on the updated crypto module for weak ciphers +* Bert Belder: Not much except started reviewing a VS2015 support PR + +#### Next branch release versioning [#2215](https://github.com/nodejs/io.js/issues/2215) + +Discussion about the release plan (not yet written up, James Snell is working on that.) + +#### TSC Chair - Election? [#2136](https://github.com/nodejs/io.js/issues/2136) + +Vote? + +* Colin: +1 +* Chris: +1 +* James: +1 +* Fedor: +1 +* Michael: +1 +* Steven: +1 +* Jeremiah: +1 +* Shigeki: +1 +* Ben: +1 +* Trevor: +1 +* Chris: +1 +* Alexis: +1 +* Bert: +1 + +### Next Meeting + +Not happening on August 5th (as it usually would). +Possibly a (short) TSC meeting will be held during the summit. From cd0c362f67ad95d5bfa014521041137b890ed2f7 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 6 Aug 2015 15:33:47 -0700 Subject: [PATCH 063/214] doc: update AUTHORS list Update AUTHORS list using tools/update-authors.sh PR-URL: https://github.com/nodejs/node/pull/2318 Reviewed-By: Ben Noordhuis --- .mailmap | 3 ++- AUTHORS | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 38e5c1928a7..e92c1dd7066 100644 --- a/.mailmap +++ b/.mailmap @@ -77,6 +77,7 @@ Maciej Małecki Malte-Thorben Bruns Malte-Thorben Bruns Mathias Pettersson +Matthew Lyes Michael Bernstein Michael Wilber Micheil Smith @@ -112,7 +113,7 @@ Siddharth Mahendraker Simon Willison Stanislav Opichal Stefan Bühler -Steven R. Loomis +Steven R. Loomis TJ Holowaychuk TJ Holowaychuk Tadashi SAWADA diff --git a/AUTHORS b/AUTHORS index 2b2fe64309b..c9a855b178d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -631,6 +631,7 @@ dead-horse Luis Reis Jackson Tian sudodoki +Steven Loomis haoxin Artur Cistov MK Safi @@ -773,5 +774,15 @@ Pierre Inglebert Ivan Yan Sangmin Yoon Mark Plomer +Phillip Johnsen +Matteo Collina +jomo +Gireesh Punathil +Lucien Greathouse +Chad Johnston +Sam Stites +Matthew Lyes +Matt Loring +P.S.V.R # Generated by tools/update-authors.sh From 64a8f30a701aeb676eef6897a11d7869574b9e60 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Sat, 22 Aug 2015 13:40:55 +0530 Subject: [PATCH 064/214] tools: fix anchors in generated documents When an anchor tag is used within a pre tag, the link is not distinguishable. This patch makes sure that the links are highlighted by underlining them. PR-URL: https://github.com/nodejs/node/pull/2491 Reviewed-By: Roman Reiss --- doc/api_assets/style.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 709a835f814..d40253e5ae1 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -79,6 +79,15 @@ code a:hover { color: white !important; } +.api_stability_0 a, +.api_stability_1 a, +.api_stability_2 a, +.api_stability_3 a, +.api_stability_4 a, +.api_stability_5 a { + text-decoration: underline; +} + .api_stability_0 { background-color: #D60027; } From 023386c852c8c83aa16bc5df14046b0b7e0a62c2 Mon Sep 17 00:00:00 2001 From: Roman Klauke Date: Sat, 22 Aug 2015 19:19:14 +0200 Subject: [PATCH 065/214] fs: replace bad_args macro with concrete error msg Instead of throwing an error with `Bad arguments` the fs methods return a concrete error message. If an argument is missing, the methods throw an error with the information, what is missing. In case of a type mismatch, they throw an error with some hints, what datatype is expected. PR-URL: https://github.com/nodejs/node/pull/2495 Reviewed-By: Trevor Norris Reviewed-By: Sakthipriyan Vairamani --- src/node_file.cc | 81 ++++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index 5eacf9a68d1..f10b99e94b1 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -47,8 +47,6 @@ using v8::Value; #define TYPE_ERROR(msg) env->ThrowTypeError(msg) -#define THROW_BAD_ARGS TYPE_ERROR("Bad argument") - #define GET_OFFSET(a) ((a)->IsNumber() ? (a)->IntegerValue() : -1) class FSReqWrap: public ReqWrap { @@ -306,7 +304,7 @@ static void Access(const FunctionCallbackInfo& args) { HandleScope scope(env->isolate()); if (args.Length() < 2) - return THROW_BAD_ARGS; + return TYPE_ERROR("path and mode are required"); if (!args[0]->IsString()) return TYPE_ERROR("path must be a string"); if (!args[1]->IsInt32()) @@ -326,9 +324,10 @@ static void Access(const FunctionCallbackInfo& args) { static void Close(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 1 || !args[0]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 1) + return TYPE_ERROR("fd is required"); + if (!args[0]->IsInt32()) + return TYPE_ERROR("fd must be a file descriptor"); int fd = args[0]->Int32Value(); @@ -559,9 +558,10 @@ static void LStat(const FunctionCallbackInfo& args) { static void FStat(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 1 || !args[0]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 1) + return TYPE_ERROR("fd is required"); + if (!args[0]->IsInt32()) + return TYPE_ERROR("fd must be a file descriptor"); int fd = args[0]->Int32Value(); @@ -678,9 +678,10 @@ static void Rename(const FunctionCallbackInfo& args) { static void FTruncate(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 2 || !args[0]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 2) + return TYPE_ERROR("fd and length are required"); + if (!args[0]->IsInt32()) + return TYPE_ERROR("fd must be a file descriptor"); int fd = args[0]->Int32Value(); @@ -706,9 +707,10 @@ static void FTruncate(const FunctionCallbackInfo& args) { static void Fdatasync(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 1 || !args[0]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 1) + return TYPE_ERROR("fd is required"); + if (!args[0]->IsInt32()) + return TYPE_ERROR("fd must be a file descriptor"); int fd = args[0]->Int32Value(); @@ -722,9 +724,10 @@ static void Fdatasync(const FunctionCallbackInfo& args) { static void Fsync(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 1 || !args[0]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 1) + return TYPE_ERROR("fd is required"); + if (!args[0]->IsInt32()) + return TYPE_ERROR("fd must be a file descriptor"); int fd = args[0]->Int32Value(); @@ -772,9 +775,12 @@ static void RMDir(const FunctionCallbackInfo& args) { static void MKDir(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 2 || !args[0]->IsString() || !args[1]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 2) + return TYPE_ERROR("path and mode are required"); + if (!args[0]->IsString()) + return TYPE_ERROR("path must be a string"); + if (!args[1]->IsInt32()) + return TYPE_ERROR("mode must be an integer"); node::Utf8Value path(env->isolate(), args[0]); int mode = static_cast(args[1]->Int32Value()); @@ -990,9 +996,12 @@ static void WriteString(const FunctionCallbackInfo& args) { static void Read(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 2 || !args[0]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 2) + return TYPE_ERROR("fd and buffer are required"); + if (!args[0]->IsInt32()) + return TYPE_ERROR("fd must be a file descriptor"); + if (!Buffer::HasInstance(args[1])) + return TYPE_ERROR("Second argument needs to be a buffer"); int fd = args[0]->Int32Value(); @@ -1003,10 +1012,6 @@ static void Read(const FunctionCallbackInfo& args) { char * buf = nullptr; - if (!Buffer::HasInstance(args[1])) { - return env->ThrowError("Second argument needs to be a buffer"); - } - Local buffer_obj = args[1]->ToObject(env->isolate()); char *buffer_data = Buffer::Data(buffer_obj); size_t buffer_length = Buffer::Length(buffer_obj); @@ -1043,9 +1048,13 @@ static void Read(const FunctionCallbackInfo& args) { static void Chmod(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 2 || !args[0]->IsString() || !args[1]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 2) + return TYPE_ERROR("path and mode are required"); + if (!args[0]->IsString()) + return TYPE_ERROR("path must be a string"); + if (!args[1]->IsInt32()) + return TYPE_ERROR("mode must be an integer"); + node::Utf8Value path(env->isolate(), args[0]); int mode = static_cast(args[1]->Int32Value()); @@ -1063,9 +1072,13 @@ static void Chmod(const FunctionCallbackInfo& args) { static void FChmod(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - if (args.Length() < 2 || !args[0]->IsInt32() || !args[1]->IsInt32()) { - return THROW_BAD_ARGS; - } + if (args.Length() < 2) + return TYPE_ERROR("fd and mode are required"); + if (!args[0]->IsInt32()) + return TYPE_ERROR("fd must be a file descriptor"); + if (!args[1]->IsInt32()) + return TYPE_ERROR("mode must be an integer"); + int fd = args[0]->Int32Value(); int mode = static_cast(args[1]->Int32Value()); From 5df06fd8df233202b0ffd97c8af6493822b4ee6f Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Tue, 18 Aug 2015 16:32:07 -0700 Subject: [PATCH 066/214] test: add spaces after keywords eg changes: if(x) { ... } to: if (x) { ... } --- test/gc/test-http-client-timeout.js | 2 +- test/internet/test-dgram-broadcast-multi-process.js | 2 +- test/internet/test-dns.js | 2 +- test/parallel/test-net-listen-fd0.js | 2 +- test/parallel/test-stream2-base64-single-char-read-end.js | 2 +- test/parallel/test-util-inspect.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/gc/test-http-client-timeout.js b/test/gc/test-http-client-timeout.js index 5bb2d2b05b4..c84581b5c8e 100644 --- a/test/gc/test-http-client-timeout.js +++ b/test/gc/test-http-client-timeout.js @@ -54,7 +54,7 @@ function getall() { setImmediate(getall); } -for(var i = 0; i < 10; i++) +for (var i = 0; i < 10; i++) getall(); function afterGC() { diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index 4cf5d7226f2..c1ca04aa574 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -18,7 +18,7 @@ var common = require('../common'), // take the first non-internal interface as the address for binding get_bindAddress: for (var name in networkInterfaces) { var interfaces = networkInterfaces[name]; - for(var i = 0; i < interfaces.length; i++) { + for (var i = 0; i < interfaces.length; i++) { var localInterface = interfaces[i]; if (!localInterface.internal && localInterface.family === 'IPv4') { var bindAddress = localInterface.address; diff --git a/test/internet/test-dns.js b/test/internet/test-dns.js index eb7bab85475..796fd26c0a2 100644 --- a/test/internet/test-dns.js +++ b/test/internet/test-dns.js @@ -663,7 +663,7 @@ TEST(function test_resolve_failure(done) { var req = dns.resolve4('nosuchhostimsure', function(err) { assert(err instanceof Error); - switch(err.code) { + switch (err.code) { case 'ENOTFOUND': case 'ESERVFAIL': break; diff --git a/test/parallel/test-net-listen-fd0.js b/test/parallel/test-net-listen-fd0.js index bf437268c92..e326ac2b60b 100644 --- a/test/parallel/test-net-listen-fd0.js +++ b/test/parallel/test-net-listen-fd0.js @@ -11,7 +11,7 @@ process.on('exit', function() { // this should fail with an async EINVAL error, not throw an exception net.createServer(assert.fail).listen({fd:0}).on('error', function(e) { - switch(e.code) { + switch (e.code) { case 'EINVAL': case 'ENOTSOCK': gotError = e; diff --git a/test/parallel/test-stream2-base64-single-char-read-end.js b/test/parallel/test-stream2-base64-single-char-read-end.js index 37a97cd817e..e50ea5a0cc1 100644 --- a/test/parallel/test-stream2-base64-single-char-read-end.js +++ b/test/parallel/test-stream2-base64-single-char-read-end.js @@ -11,7 +11,7 @@ var accum = []; var timeout; src._read = function(n) { - if(!hasRead) { + if (!hasRead) { hasRead = true; process.nextTick(function() { src.push(new Buffer('1')); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index fcde1c74c39..58a4c8a2f2b 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -106,7 +106,7 @@ assert.ok(util.inspect(y), '[ \'a\', \'b\', \'c\', \'\\\\\\\': \'d\' ]'); function test_color_style(style, input, implicit) { var color_name = util.inspect.styles[style]; var color = ['', '']; - if(util.inspect.colors[color_name]) + if (util.inspect.colors[color_name]) color = util.inspect.colors[color_name]; var without_color = util.inspect(input, false, 0, false); From b76b9197f965bbde705a54f891a9c78b78a9c976 Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Tue, 18 Aug 2015 16:33:11 -0700 Subject: [PATCH 067/214] tools: enable space-after-keywords in eslint Requires that you do: if (x) { ... } Rather than: if(x) { ... } --- .eslintrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc b/.eslintrc index 532ac8b50cf..0bf34c83908 100644 --- a/.eslintrc +++ b/.eslintrc @@ -66,6 +66,8 @@ rules: eol-last: 2 ## no trailing spaces no-trailing-spaces: 2 + # require space after keywords, eg 'for (..)' + space-after-keywords: 2 # Strict Mode # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode From 7f23a83c429562b7cd477930706cdbf22c86c21c Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sun, 23 Aug 2015 17:45:43 +1000 Subject: [PATCH 068/214] doc: update AUTHORS list Update AUTHORS list using tools/update-authors.sh Fix @muddletoes' .mailmap entry PR-URL: https://github.com/nodejs/node/pull/2505 Reviewed-By: Ben Noordhuis --- .mailmap | 3 ++- AUTHORS | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.mailmap b/.mailmap index e92c1dd7066..0906e65c39f 100644 --- a/.mailmap +++ b/.mailmap @@ -77,7 +77,7 @@ Maciej Małecki Malte-Thorben Bruns Malte-Thorben Bruns Mathias Pettersson -Matthew Lyes +Matthew Lye Michael Bernstein Michael Wilber Micheil Smith @@ -114,6 +114,7 @@ Simon Willison Stanislav Opichal Stefan Bühler Steven R. Loomis +Todd Kennedy TJ Holowaychuk TJ Holowaychuk Tadashi SAWADA diff --git a/AUTHORS b/AUTHORS index c9a855b178d..cfcf86132de 100644 --- a/AUTHORS +++ b/AUTHORS @@ -689,7 +689,7 @@ Roman Reiss Glen Keane Xiaowei Li <446240525@qq.com> toastynerd -Todd Kennedy +Todd Kennedy Icer Liang Stephen Belanger Jeremiah Senkpiel @@ -781,8 +781,10 @@ Gireesh Punathil Lucien Greathouse Chad Johnston Sam Stites -Matthew Lyes +Matthew Lye Matt Loring P.S.V.R +Jacob Edelman +Mike Atkins # Generated by tools/update-authors.sh From c9867fed29b5e50c85a72ac46eafb1eb9a87f75c Mon Sep 17 00:00:00 2001 From: hackerjs <4141095@qq.com> Date: Tue, 10 Dec 2013 18:56:04 +0800 Subject: [PATCH 069/214] doc: document response.finished in http.markdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds mention of response.finished to http.markdown Originally submitted by @hackerjs. The original commit needed a bit of cleanup on grammar. Reviewed By: James M Snell Reviewed By: Michaël Zasso PR-URL: https://github.com/nodejs/node/pull/2414 --- doc/api/http.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 966b304b56d..ad2473c9801 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -452,6 +452,11 @@ If `data` is specified, it is equivalent to calling If `callback` is specified, it will be called when the response stream is finished. +### response.finished + +Boolean value that indicates whether the response has completed. Starts +as `false`. After `response.end()` executes, the value will be `true`. + ## http.request(options[, callback]) io.js maintains several connections per server to make HTTP requests. From 5fef5c6562d107a194c1847cbc52afe0f5de8625 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 17 Aug 2015 15:51:51 -0700 Subject: [PATCH 070/214] tls: add --tls-cipher-list command line switch This adds a new `--tls-cipher-list` command line switch that can be used to override the built-in default cipher list. The intent of this is to make it possible to enforce an alternative default cipher list at the process level. Overriding the default cipher list is still permitted at the application level by changing the value of `require('tls').DEFAULT_CIPHERS`. As part of the change, the built in default list is moved out of tls.js and into node_constants.h and node_constants.cc. Two new constants are added to require('constants'): * defaultCipherList (the active default cipher list) * defaultCoreCipherList (the built-in default cipher list) A test case and doc changes are included. A new NODE_DEFINE_STRING_CONSTANT macro is also created in node_internals.h When node_constants is initialized, it will pick up either the passed in command line switch or fallback to the default built-in suite. Within joyent/node, this change had originaly been wrapped up with a number of other related commits involving the removal of the RC4 cipher. This breaks out this isolated change. /cc @mhdawson, @misterdjules, @trevnorris, @indutny, @rvagg Reviewed By: Ben Noordhuis PR-URL: https://github.com/nodejs/node/pull/2412 --- doc/api/tls.markdown | 40 ++++++++++++++++++++++++++- doc/iojs.1 | 3 ++ lib/tls.js | 25 ++--------------- src/node.cc | 7 +++++ src/node_constants.cc | 16 +++++++++++ src/node_constants.h | 29 +++++++++++++++++++ src/node_internals.h | 16 +++++++++++ test/parallel/test-tls-cipher-list.js | 32 +++++++++++++++++++++ 8 files changed, 144 insertions(+), 24 deletions(-) create mode 100644 test/parallel/test-tls-cipher-list.js diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index 16af6fe74f7..422251f1041 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -77,6 +77,44 @@ handshake extensions allowing you: * SNI - to use one TLS server for multiple hostnames with different SSL certificates. +## Modifying the Default TLS Cipher suite + +Node.js is built with a default suite of enabled and disabled TLS ciphers. +Currently, the default cipher suite is: + + ECDHE-RSA-AES128-GCM-SHA256: + ECDHE-ECDSA-AES128-GCM-SHA256: + ECDHE-RSA-AES256-GCM-SHA384: + ECDHE-ECDSA-AES256-GCM-SHA384: + DHE-RSA-AES128-GCM-SHA256: + ECDHE-RSA-AES128-SHA256: + DHE-RSA-AES128-SHA256: + ECDHE-RSA-AES256-SHA384: + DHE-RSA-AES256-SHA384: + ECDHE-RSA-AES256-SHA256: + DHE-RSA-AES256-SHA256: + HIGH: + !aNULL: + !eNULL: + !EXPORT: + !DES: + !RC4: + !MD5: + !PSK: + !SRP: + !CAMELLIA + +This default can be overriden entirely using the `--tls-cipher-list` command +line switch. For instance, the following makes +`ECDHE-RSA-AES128-GCM-SHA256:!RC4` the default TLS cipher suite: + + node --tls-cipher-list="ECDHE-RSA-AES128-GCM-SHA256:!RC4" + +Note that the default cipher suite included within Node.js has been carefully +selected to reflect current security best practices and risk mitigation. +Changing the default cipher suite can have a significant impact on the security +of an application. The `--tls-cipher-list` switch should by used only if +absolutely necessary. ## Perfect Forward Secrecy @@ -138,7 +176,7 @@ automatically set as a listener for the [secureConnection][] event. The - `crl` : Either a string or list of strings of PEM encoded CRLs (Certificate Revocation List) - - `ciphers`: A string describing the ciphers to use or exclude, seperated by + - `ciphers`: A string describing the ciphers to use or exclude, separated by `:`. The default cipher suite is: ECDHE-RSA-AES128-GCM-SHA256: diff --git a/doc/iojs.1 b/doc/iojs.1 index 0512d5e75cd..c8dc08cb6f4 100644 --- a/doc/iojs.1 +++ b/doc/iojs.1 @@ -64,6 +64,9 @@ and servers. --v8-options print v8 command line options + --tls-cipher-list=list use an alternative default TLS cipher list + (available only when Node.js is built with + OpenSSL and crypto support enabled) .SH ENVIRONMENT VARIABLES diff --git a/lib/tls.js b/lib/tls.js index 0e22242bc47..0d85a948dcc 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -5,6 +5,7 @@ const url = require('url'); const util = require('util'); const binding = process.binding('crypto'); const Buffer = require('buffer').Buffer; +const constants = require('constants'); // Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations // every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more @@ -15,29 +16,7 @@ exports.CLIENT_RENEG_WINDOW = 600; exports.SLAB_BUFFER_SIZE = 10 * 1024 * 1024; -exports.DEFAULT_CIPHERS = [ - 'ECDHE-RSA-AES128-GCM-SHA256', - 'ECDHE-ECDSA-AES128-GCM-SHA256', - 'ECDHE-RSA-AES256-GCM-SHA384', - 'ECDHE-ECDSA-AES256-GCM-SHA384', - 'DHE-RSA-AES128-GCM-SHA256', - 'ECDHE-RSA-AES128-SHA256', - 'DHE-RSA-AES128-SHA256', - 'ECDHE-RSA-AES256-SHA384', - 'DHE-RSA-AES256-SHA384', - 'ECDHE-RSA-AES256-SHA256', - 'DHE-RSA-AES256-SHA256', - 'HIGH', - '!aNULL', - '!eNULL', - '!EXPORT', - '!DES', - '!RC4', - '!MD5', - '!PSK', - '!SRP', - '!CAMELLIA' -].join(':'); +exports.DEFAULT_CIPHERS = constants.defaultCipherList; exports.DEFAULT_ECDH_CURVE = 'prime256v1'; diff --git a/src/node.cc b/src/node.cc index ad9184e53c8..a8723dc095f 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3111,6 +3111,9 @@ static void PrintHelp() { " --track-heap-objects track heap object allocations for heap " "snapshots\n" " --v8-options print v8 command line options\n" +#if HAVE_OPENSSL + " --tls-cipher-list=val use an alternative default TLS cipher list\n" +#endif #if defined(NODE_HAVE_I18N_SUPPORT) " --icu-data-dir=dir set ICU data load path to dir\n" " (overrides NODE_ICU_DATA)\n" @@ -3242,6 +3245,10 @@ static void ParseArgs(int* argc, } else if (strcmp(arg, "--v8-options") == 0) { new_v8_argv[new_v8_argc] = "--help"; new_v8_argc += 1; +#if HAVE_OPENSSL + } else if (strncmp(arg, "--tls-cipher-list=", 18) == 0) { + default_cipher_list = arg + 18; +#endif #if defined(NODE_HAVE_I18N_SUPPORT) } else if (strncmp(arg, "--icu-data-dir=", 15) == 0) { icu_data_dir = arg + 15; diff --git a/src/node_constants.cc b/src/node_constants.cc index ce715a32462..59dd11113eb 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -24,6 +24,10 @@ namespace node { using v8::Handle; using v8::Object; +#if HAVE_OPENSSL +const char* default_cipher_list = DEFAULT_CIPHER_LIST_CORE; +#endif + void DefineErrnoConstants(Handle target) { #ifdef E2BIG NODE_DEFINE_CONSTANT(target, E2BIG); @@ -1108,6 +1112,17 @@ void DefineUVConstants(Handle target) { NODE_DEFINE_CONSTANT(target, UV_UDP_REUSEADDR); } +void DefineCryptoConstants(Handle target) { +#if HAVE_OPENSSL + NODE_DEFINE_STRING_CONSTANT(target, + "defaultCoreCipherList", + DEFAULT_CIPHER_LIST_CORE); + NODE_DEFINE_STRING_CONSTANT(target, + "defaultCipherList", + default_cipher_list); +#endif +} + void DefineConstants(Handle target) { DefineErrnoConstants(target); DefineWindowsErrorConstants(target); @@ -1115,6 +1130,7 @@ void DefineConstants(Handle target) { DefineOpenSSLConstants(target); DefineSystemConstants(target); DefineUVConstants(target); + DefineCryptoConstants(target); } } // namespace node diff --git a/src/node_constants.h b/src/node_constants.h index 8493d4d13b3..45c991022e6 100644 --- a/src/node_constants.h +++ b/src/node_constants.h @@ -4,7 +4,36 @@ #include "node.h" #include "v8.h" +#if HAVE_OPENSSL +#define DEFAULT_CIPHER_LIST_CORE "ECDHE-RSA-AES128-GCM-SHA256:" \ + "ECDHE-ECDSA-AES128-GCM-SHA256:" \ + "ECDHE-RSA-AES256-GCM-SHA384:" \ + "ECDHE-ECDSA-AES256-GCM-SHA384:" \ + "DHE-RSA-AES128-GCM-SHA256:" \ + "ECDHE-RSA-AES128-SHA256:" \ + "DHE-RSA-AES128-SHA256:" \ + "ECDHE-RSA-AES256-SHA384:" \ + "DHE-RSA-AES256-SHA384:" \ + "ECDHE-RSA-AES256-SHA256:" \ + "DHE-RSA-AES256-SHA256:" \ + "HIGH:" \ + "!aNULL:" \ + "!eNULL:" \ + "!EXPORT:" \ + "!DES:" \ + "!RC4:" \ + "!MD5:" \ + "!PSK:" \ + "!SRP:" \ + "!CAMELLIA" +#endif + namespace node { + +#if HAVE_OPENSSL +extern const char* default_cipher_list; +#endif + void DefineConstants(v8::Handle target); } // namespace node diff --git a/src/node_internals.h b/src/node_internals.h index c68b7155b0c..8f35433b2f8 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -12,6 +12,22 @@ struct sockaddr; +// Variation on NODE_DEFINE_CONSTANT that sets a String value. +#define NODE_DEFINE_STRING_CONSTANT(target, name, constant) \ + do { \ + v8::Isolate* isolate = target->GetIsolate(); \ + v8::Local constant_name = \ + v8::String::NewFromUtf8(isolate, name); \ + v8::Local constant_value = \ + v8::String::NewFromUtf8(isolate, constant); \ + v8::PropertyAttribute constant_attributes = \ + static_cast(v8::ReadOnly | v8::DontDelete); \ + target->ForceSet(isolate->GetCurrentContext(), \ + constant_name, \ + constant_value, \ + constant_attributes); \ + } while (0) + namespace node { // Forward declaration diff --git a/test/parallel/test-tls-cipher-list.js b/test/parallel/test-tls-cipher-list.js new file mode 100644 index 00000000000..9ae8fefa0f4 --- /dev/null +++ b/test/parallel/test-tls-cipher-list.js @@ -0,0 +1,32 @@ +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) { + console.log('1..0 # Skipped: missing crypto'); + return; +} + +const assert = require('assert'); +const spawn = require('child_process').spawn; +const defaultCoreList = require('constants').defaultCoreCipherList; + +function doCheck(arg, check) { + var out = ''; + var arg = arg.concat([ + '-pe', + 'require("constants").defaultCipherList' + ]); + spawn(process.execPath, arg, {}). + on('error', assert.fail). + stdout.on('data', function(chunk) { + out += chunk; + }).on('end', function() { + assert.equal(out.trim(), check); + }).on('error', assert.fail); +} + +// test the default unmodified version +doCheck([], defaultCoreList); + +// test the command line switch by itself +doCheck(['--tls-cipher-list=ABC'], 'ABC'); From 4f8e34c202c353263085fee6489050b7f8358253 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 15 Aug 2015 09:40:32 -0700 Subject: [PATCH 071/214] tools: add license boilerplate to check-imports.sh Per: https://github.com/joyent/node/pull/6962 This applies only the first commit from https://github.com/joyent/node/pull/6962. /cc @bnoorduis Reviewed By: Ben Noordhuis PR-URL: https://github.com/nodejs/node/pull/2386 --- tools/check-imports.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/check-imports.sh b/tools/check-imports.sh index caeb382ff73..2fb263f2115 100755 --- a/tools/check-imports.sh +++ b/tools/check-imports.sh @@ -1,5 +1,19 @@ #!/bin/sh +# Copyright (c) 2013, 2014, Ben Noordhuis +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + SED=sed UNAME=`uname` From 09437e01469e833433772aaabca1a60cd8f791b1 Mon Sep 17 00:00:00 2001 From: Minwoo Jung Date: Fri, 21 Aug 2015 23:07:09 -0700 Subject: [PATCH 072/214] doc: fix comments in tls_wrap.cc and _http_client.js fixed grammatically wrong expressions to make it clear Reviewed By: James M Snell PR-URL: https://github.com/nodejs/node/pull/2490 PR-URL: https://github.com/nodejs/node/pull/2489 --- lib/_http_client.js | 2 +- src/tls_wrap.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/_http_client.js b/lib/_http_client.js index e705117ab63..e490dce5d82 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -216,7 +216,7 @@ function socketCloseListener() { // is a no-op if no final chunk remains. socket.read(); - // NOTE: Its important to get parser here, because it could be freed by + // NOTE: It's important to get parser here, because it could be freed by // the `socketOnData`. var parser = socket.parser; req.emit('close'); diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index e4b0dc49c69..381690c79d7 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -561,8 +561,8 @@ int TLSWrap::DoWrite(WriteWrap* w, } if (empty) { ClearOut(); - // However if there any data that should be written to socket, - // callback should not be invoked immediately + // However, if there is any data that should be written to the socket, + // the callback should not be invoked immediately if (BIO_pending(enc_out_) == 0) return stream_->DoWrite(w, bufs, count, send_handle); } From 536c3d0537ccfe15bea144cdab79e32f9b17324a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 27 Jul 2015 17:10:47 -0700 Subject: [PATCH 073/214] test: use reserved IP in test-net-connect-timeout Use reserved IP in test-net-connect-timeout.js rather than arbitrary IP. PR-URL: https://github.com/nodejs/node/pull/2257 Fixes: https://github.com/nodejs/node/issues/2469 Reviewed By: Ben Noordhuis --- test/internet/test-net-connect-timeout.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/internet/test-net-connect-timeout.js b/test/internet/test-net-connect-timeout.js index 436d7731827..b92d2348529 100644 --- a/test/internet/test-net-connect-timeout.js +++ b/test/internet/test-net-connect-timeout.js @@ -15,9 +15,11 @@ var gotConnect = false; var T = 100; - -// 240.*.*.*.* is "reserved for future use" -var socket = net.createConnection(9999, '240.0.0.0'); +// 192.0.2.1 is part of subnet assigned as "TEST-NET" in RFC 5737. +// For use solely in documentation and example source code. +// In short, it should be unreachable. +// In practice, it's a network black hole. +var socket = net.createConnection(9999, '192.0.2.1'); socket.setTimeout(T); From 9330f5ef45368dacb682d567671c98b57903f6ff Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Thu, 20 Aug 2015 04:07:52 +0530 Subject: [PATCH 074/214] doc: make the deprecations consistent The deprecation messages in the documentations should be in the format Stability: 0 - Deprecated: Use [alternate] instead. so that they will be consistent. PR-URL: https://github.com/nodejs/node/pull/2450 Reviewed-By: Roman Reiss Reviewed-By: James M Snell --- doc/api/crypto.markdown | 2 +- doc/api/events.markdown | 7 +++++-- doc/api/fs.markdown | 14 ++++++++------ doc/api/http.markdown | 6 +++--- doc/api/net.markdown | 5 +++-- doc/api/repl.markdown | 4 ++++ doc/api/tls.markdown | 2 +- doc/api/tty.markdown | 6 ++++-- 8 files changed, 29 insertions(+), 17 deletions(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index d31629e848d..267e0359f26 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -67,7 +67,7 @@ Example: ## crypto.createCredentials(details) - Stability: 0 - Deprecated. Use [tls.createSecureContext][] instead. + Stability: 0 - Deprecated: Use [tls.createSecureContext][] instead. Creates a credentials object, with the optional details being a dictionary with keys: diff --git a/doc/api/events.markdown b/doc/api/events.markdown index de547a5b8b5..2d3fdb0a809 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -145,9 +145,9 @@ Returns the number of listeners listening to the `type` of event. ### Class Method: EventEmitter.listenerCount(emitter, event) -Return the number of listeners for a given event. + Stability: 0 - Deprecated: Use [emitter.listenerCount][] instead. -_Note: This is deprecated. Use `emitter.listenerCount` instead._ +Returns the number of listeners for a given event. ### Event: 'newListener' @@ -186,3 +186,6 @@ constructor function. For example: // Inherit functions from `EventEmitter`'s prototype util.inherits(MyEventEmitter, EventEmitter); + + +[emitter.listenerCount]: #events_emitter_listenercount_type diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index c9fd8466811..99c3daf7a36 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -671,9 +671,7 @@ callback, and have some fallback logic if it is null. ## fs.exists(path, callback) -`fs.exists()` is **deprecated**. For supported alternatives please check out -[`fs.stat`](fs.html#fs_fs_stat_path_callback) or -[`fs.access`](fs.html#fs_fs_access_path_mode_callback). + Stability: 0 - Deprecated: Use [fs.stat][] or [fs.access][] instead. Test whether or not the given path exists by checking with the file system. Then call the `callback` argument with either true or false. Example: @@ -697,9 +695,7 @@ and handle the error when it's not there. Synchronous version of [`fs.exists`](fs.html#fs_fs_exists_path_callback). Returns `true` if the file exists, `false` otherwise. -`fs.existsSync()` is **deprecated**. For supported alternatives please check -out [`fs.statSync`](fs.html#fs_fs_statsync_path) or -[`fs.accessSync`](fs.html#fs_fs_accesssync_path_mode). + Stability: 0 - Deprecated: Use [fs.statSync][] or [fs.accessSync][] instead. ## fs.access(path[, mode], callback) @@ -907,3 +903,9 @@ See more details in [fs.watch](#fs_fs_watch_filename_options_listener). * `error` {Error object} Emitted when an error occurs. + + +[fs.stat]: #fs_fs_stat_path_callback +[fs.access]: #fs_fs_access_path_mode_callback +[fs.statSync]: #fs_fs_statsync_path +[fs.accessSync]: #fs_fs_accesssync_path_mode diff --git a/doc/api/http.markdown b/doc/api/http.markdown index ad2473c9801..875e78a1151 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -66,7 +66,8 @@ added to the `'request'` event. ## http.createClient([port][, host]) -This function is **deprecated**; please use [http.request()][] instead. + Stability: 0 - Deprecated: Use [http.request][] instead. + Constructs a new HTTP client. `port` and `host` refer to the server to be connected to. @@ -1092,8 +1093,7 @@ client's authentication details. [http.IncomingMessage]: #http_http_incomingmessage [http.ServerResponse]: #http_class_http_serverresponse [http.Server]: #http_class_http_server -[http.request()]: #http_http_request_options_callback -[http.request()]: #http_http_request_options_callback +[http.request]: #http_http_request_options_callback [net.Server.close()]: net.html#net_server_close_callback [net.Server.listen(path)]: net.html#net_server_listen_path_callback [net.Server.listen(port)]: net.html#net_server_listen_port_hostname_backlog_callback diff --git a/doc/api/net.markdown b/doc/api/net.markdown index adc1d970535..2fad87e41b8 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -281,7 +281,8 @@ with `child_process.fork()`. ### server.connections -This function is **deprecated**; please use [server.getConnections()][] instead. + Stability: 0 - Deprecated: Use [server.getConnections][] instead. + The number of concurrent connections on the server. This becomes `null` when sending a socket to a child with @@ -623,7 +624,7 @@ Returns true if input is a version 6 IP address, otherwise returns false. ['end']: #net_event_end [EventEmitter]: events.html#events_class_events_eventemitter ['listening']: #net_event_listening -[server.getConnections()]: #net_server_getconnections_callback +[server.getConnections]: #net_server_getconnections_callback [Readable Stream]: stream.html#stream_class_stream_readable [stream.setEncoding()]: stream.html#stream_readable_setencoding_encoding [dns.lookup()]: dns.html#dns_dns_lookup_hostname_options_callback diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index bf29593adaf..2546bbe876c 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -35,6 +35,10 @@ By default, the REPL will persist history between `iojs` REPL sessions by saving to a `.node_repl_history` file in the user's home directory. This can be disabled by setting the environment variable `NODE_REPL_HISTORY=""`. +### NODE_REPL_HISTORY_FILE + + Stability: 0 - Deprecated: Use `NODE_REPL_HISTORY` instead. + Previously in io.js v2.x, REPL history was controlled by using a `NODE_REPL_HISTORY_FILE` environment variable, and the history was saved in JSON format. This variable has now been deprecated, and your REPL history will diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index 422251f1041..61c868ef0a8 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -702,7 +702,7 @@ The number of concurrent connections on the server. ## Class: CryptoStream - Stability: 0 - Deprecated. Use tls.TLSSocket instead. + Stability: 0 - Deprecated: Use [tls.TLSSocket][] instead. This is an encrypted stream. diff --git a/doc/api/tty.markdown b/doc/api/tty.markdown index 60012f3063c..3334765d7de 100644 --- a/doc/api/tty.markdown +++ b/doc/api/tty.markdown @@ -24,8 +24,7 @@ terminal. ## tty.setRawMode(mode) -Deprecated. Use `tty.ReadStream#setRawMode()` -(i.e. `process.stdin.setRawMode()`) instead. + Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead. ## Class: ReadStream @@ -73,3 +72,6 @@ has changed. console.log('screen size has changed!'); console.log(process.stdout.columns + 'x' + process.stdout.rows); }); + + +[tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode From b5bd3ebfc849419079fbc30e5841f0d4886bd6ff Mon Sep 17 00:00:00 2001 From: Julien Gilli Date: Fri, 19 Jun 2015 10:24:14 -0700 Subject: [PATCH 075/214] win: fix custom actions on Visual Studio != 2013 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a port of joyent/node@16bcd68dc5f449c331499ced22aa626dbb2cdefc . Original commit message: The original change that added support for running custom actions during the install process (joyent/node@e7c84f82c730bddb7450dc56065aab11b93ffd30) assumed that Visual Studio 2013 is used to generate the installer file. However, that is not always the case, and older versions of Visual Studio should allow users to generate Windows installer files. This change makes the custom actions visual studio project use the visual studio version that is found by vcbuild.bat. Reviewed-By: João Reis PR-URL: https://github.com/joyent/node/pull/25569 PR-URL: https://github.com/nodejs/node/pull/2365 Reviewed-By: Alexis Campailla --- tools/msvs/msi/custom_actions.vcxproj | 28 +++++++++++++-------------- vcbuild.bat | 28 ++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/tools/msvs/msi/custom_actions.vcxproj b/tools/msvs/msi/custom_actions.vcxproj index e014a6981f5..ae82905cd4b 100644 --- a/tools/msvs/msi/custom_actions.vcxproj +++ b/tools/msvs/msi/custom_actions.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -27,24 +27,24 @@ DynamicLibrary - v120 + $(PlatformToolset) Unicode true DynamicLibrary - v120 + $(PlatformToolset) Unicode true DynamicLibrary - v120 + $(PlatformToolset) Unicode DynamicLibrary - v120 + $(PlatformToolset) Unicode @@ -81,7 +81,7 @@ Disabled - $(WIX)sdk\VS2013\inc;%(AdditionalIncludeDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\inc;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -91,7 +91,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WIX)sdk\VS2013\lib\x86;%(AdditionalLibraryDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\lib\x86;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -100,7 +100,7 @@ Disabled - $(WIX)sdk\VS2013\inc;%(AdditionalIncludeDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\inc;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -110,7 +110,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WIX)sdk\VS2013\lib\x64;%(AdditionalLibraryDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\lib\x64;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -120,7 +120,7 @@ MaxSpeed true - $(WIX)sdk\VS2013\inc;%(AdditionalIncludeDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\inc;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true @@ -134,7 +134,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WIX)sdk\VS2013\lib\x86;%(AdditionalLibraryDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\lib\x86;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -146,7 +146,7 @@ MaxSpeed true - $(WIX)sdk\VS2013\inc;%(AdditionalIncludeDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\inc;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true @@ -160,7 +160,7 @@ msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies) - $(WIX)sdk\VS2013\lib\x64;%(AdditionalLibraryDirectories) + $(WIX)sdk\VS$(GypMsvsVersion)\lib\x64;%(AdditionalLibraryDirectories) custom_actions.def true Windows @@ -178,4 +178,4 @@ - \ No newline at end of file + diff --git a/vcbuild.bat b/vcbuild.bat index 23dc4282a3a..088473e1e46 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -103,32 +103,58 @@ call :getnodeversion || exit /b 1 @rem Set environment for msbuild @rem Look for Visual Studio 2015 +echo Looking for Visual Studio 2015 if not defined VS140COMNTOOLS goto vc-set-2013 if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2013 +echo Found Visual Studio 2015 +if defined msi ( + echo Looking for WiX installation for Visual Studio 2015... + if not exist "%WIX%\SDK\VS2015" ( + echo Failed to find WiX install for Visual Studio 2015 + echo VS2015 support for WiX is only present starting at version 3.10 + goto vc-set-2013 + ) +) if "%VCVARS_VER%" NEQ "140" ( call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" SET VCVARS_VER=140 ) if not defined VCINSTALLDIR goto vc-set-2013 set GYP_MSVS_VERSION=2015 +set PLATFORM_TOOLSET=v140 goto msbuild-found :vc-set-2013 @rem Look for Visual Studio 2013 +echo Looking for Visual Studio 2013 if not defined VS120COMNTOOLS goto msbuild-not-found if not exist "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-not-found +echo Found Visual Studio 2013 +if defined msi ( + echo Looking for WiX installation for Visual Studio 2013... + if not exist "%WIX%\SDK\VS2013" ( + echo Failed to find WiX install for Visual Studio 2013 + echo VS2013 support for WiX is only present starting at version 3.8 + goto vc-set-2012 + ) +) if "%VCVARS_VER%" NEQ "120" ( call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" SET VCVARS_VER=120 ) if not defined VCINSTALLDIR goto msbuild-not-found set GYP_MSVS_VERSION=2013 +set PLATFORM_TOOLSET=v120 goto msbuild-found :msbuild-not-found echo Failed to find Visual Studio installation. goto exit +:wix-not-found +echo Build skipped. To generate installer, you need to install Wix. +goto run + :msbuild-found :project-gen @@ -170,7 +196,7 @@ if not defined msi goto run :msibuild echo Building iojs-v%FULLVERSION%-%target_arch%.msi -msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo +msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:PlatformToolset=%PLATFORM_TOOLSET% /p:GypMsvsVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit if defined nosign goto upload From 22e344ea1039913a757b995ab426c663ce3e6a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Tue, 21 Jul 2015 21:39:15 +0100 Subject: [PATCH 076/214] win: fix custom actions for WiX older than 3.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a port of joyent/node@e192f61514cd1500de895cb10128d412f842d7d0 . Original commit message: Older WiX versions included a header with extern "C" declaration, hence the custom action source must be C++. Reviewed-By: João Reis PR-URL: https://github.com/joyent/node/pull/25569 PR-URL: https://github.com/nodejs/node/pull/2365 Reviewed-By: Alexis Campailla --- tools/msvs/msi/{custom_actions.c => custom_actions.cc} | 4 ++-- tools/msvs/msi/custom_actions.vcxproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename tools/msvs/msi/{custom_actions.c => custom_actions.cc} (83%) diff --git a/tools/msvs/msi/custom_actions.c b/tools/msvs/msi/custom_actions.cc similarity index 83% rename from tools/msvs/msi/custom_actions.c rename to tools/msvs/msi/custom_actions.cc index 5e7d617f387..9a23d557476 100644 --- a/tools/msvs/msi/custom_actions.c +++ b/tools/msvs/msi/custom_actions.cc @@ -6,7 +6,7 @@ #include -UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) { +extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) { HRESULT hr = S_OK; UINT er = ERROR_SUCCESS; @@ -27,7 +27,7 @@ LExit: } -BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) { +extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) { switch (ulReason) { case DLL_PROCESS_ATTACH: WcaGlobalInitialize(hInst); diff --git a/tools/msvs/msi/custom_actions.vcxproj b/tools/msvs/msi/custom_actions.vcxproj index ae82905cd4b..3716f07ff6d 100644 --- a/tools/msvs/msi/custom_actions.vcxproj +++ b/tools/msvs/msi/custom_actions.vcxproj @@ -169,7 +169,7 @@ - + From 0ea5c8d737546efa2643eb56fd528d485965dfa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Thu, 20 Aug 2015 11:04:10 +0100 Subject: [PATCH 077/214] test: remove test-timers-first-fire According to the documentation, "io.js makes no guarantees about the exact timing of when the callback will fire" (https://iojs.org/api/timers.html#timers_settimeout_callback_delay_arg), hence this test is not necessary. PR-URL: https://github.com/nodejs/node/pull/2458 Reviewed-By: Ben Noordhuis Reviewed-By: Alexis Campailla --- test/parallel/test-timers-first-fire.js | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 test/parallel/test-timers-first-fire.js diff --git a/test/parallel/test-timers-first-fire.js b/test/parallel/test-timers-first-fire.js deleted file mode 100644 index 88460e1e3ac..00000000000 --- a/test/parallel/test-timers-first-fire.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -var common = require('../common'); -var assert = require('assert'); - -var TIMEOUT = 50; -var last = process.hrtime(); -setTimeout(function() { - var hr = process.hrtime(last); - var ms = (hr[0] * 1e3) + (hr[1] / 1e6); - var delta = ms - TIMEOUT; - console.log('timer fired in', delta); - assert.ok(delta > -0.5, 'Timer fired early'); -}, TIMEOUT); From d1c27b2e29e74a148dfc026015384b776901d2e0 Mon Sep 17 00:00:00 2001 From: Bradley Meck Date: Tue, 11 Aug 2015 20:25:49 -0400 Subject: [PATCH 078/214] module: fix module preloading when cwd is ENOENT Fixes a regression from 5759722cfacf17cc79651c81801a5e03521db053 that prevented modules from being preloaded if the cwd does not exist. Absolute and builtin modules now preload correctly again. Refs: https://github.com/nodejs/node/issues/1803 PR-URL: https://github.com/nodejs/node/pull/2353 Reviewed-By: Jeremiah Senkpiel --- lib/module.js | 11 ++++++++-- test/parallel/test-cwd-enoent-preload.js | 28 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-cwd-enoent-preload.js diff --git a/lib/module.js b/lib/module.js index fa7d5ebcda7..aaa6220e40a 100644 --- a/lib/module.js +++ b/lib/module.js @@ -515,9 +515,16 @@ Module._preloadModules = function(requests) { // in the current working directory. This seeds the search path for // preloaded modules. var parent = new Module('internal/preload', null); - parent.paths = Module._nodeModulePaths(process.cwd()); + try { + parent.paths = Module._nodeModulePaths(process.cwd()); + } + catch (e) { + if (e.code !== 'ENOENT') { + throw e; + } + } requests.forEach(function(request) { - Module._load(request, parent, false); + parent.require(request); }); }; diff --git a/test/parallel/test-cwd-enoent-preload.js b/test/parallel/test-cwd-enoent-preload.js new file mode 100644 index 00000000000..2dde3f0764b --- /dev/null +++ b/test/parallel/test-cwd-enoent-preload.js @@ -0,0 +1,28 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const spawn = require('child_process').spawn; + +// Fails with EINVAL on SmartOS, EBUSY on Windows. +if (process.platform === 'sunos' || common.isWindows) { + console.log('1..0 # Skipped: cannot rmdir current working directory'); + return; +} + +const dirname = common.tmpDir + '/cwd-does-not-exist-' + process.pid; +const abspathFile = require('path').join(common.fixturesDir, 'a.js'); +common.refreshTmpDir(); +fs.mkdirSync(dirname); +process.chdir(dirname); +fs.rmdirSync(dirname); + + +const proc = spawn(process.execPath, ['-r', abspathFile, '-e', '0']); +proc.stdout.pipe(process.stdout); +proc.stderr.pipe(process.stderr); + +proc.once('exit', common.mustCall(function(exitCode, signalCode) { + assert.strictEqual(exitCode, 0); + assert.strictEqual(signalCode, null); +})); From cb30414d9e582cb6389006858660aa9f6ff69e65 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Mon, 24 Aug 2015 17:41:29 +0200 Subject: [PATCH 079/214] doc: sync CHANGELOG.md from master Removes the known issue about known memory leaks. This was originally changed in the commit that synced the changelog to master: https://github.com/nodejs/node/commit/cded6e7993284c734d2ae9244dfc1e5c4cd4d976 PR-URL: https://github.com/nodejs/node/pull/2524 Reviewed-By: Jeremiah Senkpiel --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f89e1c63525..3e8b53565a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,6 @@ See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and current list of known issues. -* Possible remaining post-3.0.0 buffer memory leak(s), details at [#2308](https://github.com/nodejs/node/issues/2308). Mostly fixed in [2781333...8841947](https://github.com/nodejs/node/compare/27813339cf713275fa7bbf2ae497d13b66aa78ce...88419479ccb6384473339f09e5c55f234f4ee194) - [#2352](https://github.com/nodejs/node/pull/2352), and also [6fff0f7...a40ae51](https://github.com/nodejs/node/compare/6fff0f73dc371153507d96ecd5f88c1ddc7780c9...a40ae513bb99ec3f85ea5b864a366bc7552d61f0) - [#2375](https://github.com/nodejs/node/pull/2375). * Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/io.js/issues/1264). * Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/io.js/issues/690) * `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/nodejs/io.js/issues/760). From f1f4b4c46d30be8c1686b2351327ef3c5be22f37 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 20 Aug 2015 22:19:46 +0200 Subject: [PATCH 080/214] stream: fix off-by-factor-16 error in comment The high watermark is capped at 8 MB, not 128 MB like the comment in lib/_stream_readable.js said. PR-URL: https://github.com/nodejs/node/pull/2479 Reviewed-By: Chris Dickinson Reviewed-By: Sakthipriyan Vairamani --- lib/_stream_readable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 11069985a4d..644c4ffa67b 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -190,7 +190,7 @@ Readable.prototype.setEncoding = function(enc) { return this; }; -// Don't raise the hwm > 128MB +// Don't raise the hwm > 8MB const MAX_HWM = 0x800000; function roundUpToNextPowerOf2(n) { if (n >= MAX_HWM) { From 1c6e014bfa98cc1f3ac413f234e1949db278dbf3 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 20 Aug 2015 22:29:57 +0200 Subject: [PATCH 081/214] stream: micro-optimize high water mark calculation Don't iterate over all 32 bits, use some hacker's delight bit twiddling to compute the next power of two. The logic can be reduced to `n = 1 << 32 - Math.clz32(n)` but then it can't easily be backported to v2.x; Math.clz32() was added in V8 4.3. PR-URL: https://github.com/nodejs/node/pull/2479 Reviewed-By: Chris Dickinson Reviewed-By: Sakthipriyan Vairamani --- lib/_stream_readable.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 644c4ffa67b..766577af580 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -198,7 +198,11 @@ function roundUpToNextPowerOf2(n) { } else { // Get the next highest power of 2 n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; n++; } return n; From 14653c7429f3c5feefedc0f0516e3b17ec08609e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 20 Aug 2015 22:33:12 +0200 Subject: [PATCH 082/214] stream: rename poorly named function roundUpToNextPowerOf2() does more than just rounding up to the next power of two. Rename it to computeNewHighWaterMark(). PR-URL: https://github.com/nodejs/node/pull/2479 Reviewed-By: Chris Dickinson Reviewed-By: Sakthipriyan Vairamani --- lib/_stream_readable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 766577af580..681c3eaec24 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -192,7 +192,7 @@ Readable.prototype.setEncoding = function(enc) { // Don't raise the hwm > 8MB const MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { +function computeNewHighWaterMark(n) { if (n >= MAX_HWM) { n = MAX_HWM; } else { @@ -231,7 +231,7 @@ function howMuchToRead(n, state) { // power of 2, to prevent increasing it excessively in tiny // amounts. if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); + state.highWaterMark = computeNewHighWaterMark(n); // don't have that much. return null, unless we've ended. if (n > state.length) { From 156781dedd62896e23692207ea5737cbf30e9600 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Sat, 22 Aug 2015 22:40:41 -0500 Subject: [PATCH 083/214] build: use required platform in android-configure The introduction of libuv 1.6.0 broke the android-configure script by not specifying the correct platform. uv_os_homedir uses getpwuid_r which was not made public until API level 21 on android. The regression was introduced in a804026...b5cd2f0 PR-URL: https://github.com/nodejs/node/pull/2501 Reviewed-By: Ben Noordhuis --- android-configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-configure b/android-configure index af47aa3a7db..5cdfa70bbaf 100755 --- a/android-configure +++ b/android-configure @@ -6,7 +6,7 @@ $1/build/tools/make-standalone-toolchain.sh \ --toolchain=arm-linux-androideabi-4.9 \ --arch=arm \ --install-dir=$TOOLCHAIN \ - --platform=android-9 + --platform=android-21 export PATH=$TOOLCHAIN/bin:$PATH export AR=$TOOLCHAIN/bin/arm-linux-androideabi-ar export CC=$TOOLCHAIN/bin/arm-linux-androideabi-gcc From e4d0e86165e0f5e267997b01818adaa4a832deed Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 18 Aug 2015 23:15:25 -0700 Subject: [PATCH 084/214] test: refactor test-https-simple.js This refactoring: * eliminates the need for the external `curl` command * speeds the test by running the two test requests simultaneously * checks the type of error in the test that expects a failure (previously, any error type would cause the test to pass) PR-URL: https://github.com/nodejs/node/pull/2433 Reviewed-By: Brendan Ashworth Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-https-simple.js | 91 ++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 25 deletions(-) diff --git a/test/parallel/test-https-simple.js b/test/parallel/test-https-simple.js index 2401ad2586b..92f9bde2ef8 100644 --- a/test/parallel/test-https-simple.js +++ b/test/parallel/test-https-simple.js @@ -1,51 +1,92 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); +const common = require('../common'); if (!common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); return; } -var https = require('https'); -var fs = require('fs'); -var exec = require('child_process').exec; +const assert = require('assert'); +const https = require('https'); +const fs = require('fs'); -var options = { +const options = { key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') }; -var reqCount = 0; -var body = 'hello world\n'; +const tests = 2; +let successful = 0; -var server = https.createServer(options, function(req, res) { - reqCount++; - console.log('got request'); +const testSucceeded = function() { + successful = successful + 1; + if (successful === tests) { + server.close(); + } +}; + +const body = 'hello world\n'; + +const serverCallback = common.mustCall(function(req, res) { res.writeHead(200, { 'content-type': 'text/plain' }); res.end(body); }); +const server = https.createServer(options, serverCallback); server.listen(common.PORT, function() { - var cmd = 'curl --insecure https://127.0.0.1:' + common.PORT + '/'; - console.error('executing %j', cmd); - exec(cmd, function(err, stdout, stderr) { - if (err) throw err; - common.error(common.inspect(stdout)); - assert.equal(body, stdout); + // Do a request ignoring the unauthorized server certs + const noCertCheckOptions = { + hostname: '127.0.0.1', + port: common.PORT, + path: '/', + method: 'GET', + rejectUnauthorized: false + }; + noCertCheckOptions.Agent = new https.Agent(noCertCheckOptions); - // Do the same thing now without --insecure - // The connection should not be accepted. - var cmd = 'curl https://127.0.0.1:' + common.PORT + '/'; - console.error('executing %j', cmd); - exec(cmd, function(err, stdout, stderr) { - assert.ok(err); - server.close(); + const req = https.request(noCertCheckOptions, function(res) { + let responseBody = ''; + res.on('data', function(d) { + responseBody = responseBody + d; }); + + res.on('end', function() { + assert.equal(responseBody, body); + testSucceeded(); + }); + }); + req.end(); + + req.on('error', function(e) { + throw e; + }); + + // Do a request that throws error due to the invalid server certs + const checkCertOptions = { + hostname: '127.0.0.1', + port: common.PORT, + path: '/', + method: 'GET' + }; + + const checkCertReq = https.request(checkCertOptions, function(res) { + res.on('data', function() { + throw new Error('data should not be received'); + }); + + res.on('end', function() { + throw new Error('connection should not be established'); + }); + }); + checkCertReq.end(); + + checkCertReq.on('error', function(e) { + assert.equal(e.code, 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'); + testSucceeded(); }); }); process.on('exit', function() { - assert.equal(1, reqCount); + assert.equal(successful, tests); }); From 236455303fee234478381431bf112ddc966bb537 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sun, 23 Aug 2015 22:08:06 +1000 Subject: [PATCH 085/214] 2015-08-25 io.js v3.2.0 Release Notable changes: * events: Added EventEmitter#listenerCount(event) as a replacement for EventEmitter.listenerCount(emitter, event), which has now been marked as deprecated in the docs. (Sakthipriyan Vairamani) #2349 * module: Fixed an error with preloaded modules when the current working directory doesn't exist. (Bradley Meck) #2353 * node: Startup time is now about 5% faster when not passing V8 flags. (Evan Lucas) #2483 * repl: Tab-completion now works better with arrays. (James M Snell) #2409 * string_bytes: Fixed an unaligned write in the handling of UCS2 encoding. (Fedor Indutny) #2480 * tls: Added a new --tls-cipher-list flag that can be used to override the built-in default cipher list. (James M Snell) #2412 --- CHANGELOG.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++ src/node_version.h | 6 ++-- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e8b53565a7..dbb10c835de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,74 @@ # io.js ChangeLog +## 2015-08-25, Version 3.2.0, @rvagg + +### Notable changes + +* **events**: Added `EventEmitter#listenerCount(event)` as a replacement for `EventEmitter.listenerCount(emitter, event)`, which has now been marked as deprecated in the docs. (Sakthipriyan Vairamani) [#2349](https://github.com/nodejs/node/pull/2349) +* **module**: Fixed an error with preloaded modules when the current working directory doesn't exist. (Bradley Meck) [#2353](https://github.com/nodejs/node/pull/2353) +* **node**: Startup time is now about 5% faster when not passing V8 flags. (Evan Lucas) [#2483](https://github.com/nodejs/node/pull/2483) +* **repl**: Tab-completion now works better with arrays. (James M Snell) [#2409](https://github.com/nodejs/node/pull/2409) +* **string_bytes**: Fixed an unaligned write in the handling of UCS2 encoding. (Fedor Indutny) [#2480](https://github.com/nodejs/node/pull/2480) +* **tls**: Added a new `--tls-cipher-list` flag that can be used to override the built-in default cipher list. (James M Snell) [#2412](https://github.com/nodejs/node/pull/2412) _Note: it is suggested you use the built-in cipher list as it has been carefully selected to reflect current security best practices and risk mitigation._ + +### Known issues + +See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and current list of known issues. + +* Some uses of computed object shorthand properties are not handled correctly by the current version of V8. e.g. `[{ [prop]: val }]` evaluates to `[{}]`. [#2507](https://github.com/nodejs/node/issues/2507) +* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/io.js/issues/1264). +* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/io.js/issues/690) +* `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/nodejs/io.js/issues/760). +* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/io.js/issues/894) +* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/io.js/issues/1435). + +### Commits + +* [[`1cd794f129`](https://github.com/nodejs/node/commit/1cd794f129)] - **buffer**: reapply 07c0667 (Fedor Indutny) [#2487](https://github.com/nodejs/node/pull/2487) +* [[`156781dedd`](https://github.com/nodejs/node/commit/156781dedd)] - **build**: use required platform in android-configure (Evan Lucas) [#2501](https://github.com/nodejs/node/pull/2501) +* [[`77075ec906`](https://github.com/nodejs/node/commit/77075ec906)] - **crypto**: fix mem {de}allocation in ExportChallenge (Karl Skomski) [#2359](https://github.com/nodejs/node/pull/2359) +* [[`cb30414d9e`](https://github.com/nodejs/node/commit/cb30414d9e)] - **doc**: sync CHANGELOG.md from master (Roman Reiss) [#2524](https://github.com/nodejs/node/pull/2524) +* [[`9330f5ef45`](https://github.com/nodejs/node/commit/9330f5ef45)] - **doc**: make the deprecations consistent (Sakthipriyan Vairamani) [#2450](https://github.com/nodejs/node/pull/2450) +* [[`09437e0146`](https://github.com/nodejs/node/commit/09437e0146)] - **doc**: fix comments in tls_wrap.cc and _http_client.js (Minwoo Jung) [#2489](https://github.com/nodejs/node/pull/2489) +* [[`c9867fed29`](https://github.com/nodejs/node/commit/c9867fed29)] - **doc**: document response.finished in http.markdown (hackerjs) [#2414](https://github.com/nodejs/node/pull/2414) +* [[`7f23a83c42`](https://github.com/nodejs/node/commit/7f23a83c42)] - **doc**: update AUTHORS list (Rod Vagg) [#2505](https://github.com/nodejs/node/pull/2505) +* [[`cd0c362f67`](https://github.com/nodejs/node/commit/cd0c362f67)] - **doc**: update AUTHORS list (Rod Vagg) [#2318](https://github.com/nodejs/node/pull/2318) +* [[`2c7b9257ea`](https://github.com/nodejs/node/commit/2c7b9257ea)] - **doc**: add TSC meeting minutes 2015-07-29 (Rod Vagg) [#2437](https://github.com/nodejs/node/pull/2437) +* [[`aaefde793e`](https://github.com/nodejs/node/commit/aaefde793e)] - **doc**: add TSC meeting minutes 2015-08-19 (Rod Vagg) [#2460](https://github.com/nodejs/node/pull/2460) +* [[`51ef9106f5`](https://github.com/nodejs/node/commit/51ef9106f5)] - **doc**: add TSC meeting minutes 2015-06-03 (Rod Vagg) [#2453](https://github.com/nodejs/node/pull/2453) +* [[`7130b4cf1d`](https://github.com/nodejs/node/commit/7130b4cf1d)] - **doc**: fix links to original converged repo (Rod Vagg) [#2454](https://github.com/nodejs/node/pull/2454) +* [[`14f2aee1df`](https://github.com/nodejs/node/commit/14f2aee1df)] - **doc**: fix links to original gh issues for TSC meetings (Rod Vagg) [#2454](https://github.com/nodejs/node/pull/2454) +* [[`87a9ef0a40`](https://github.com/nodejs/node/commit/87a9ef0a40)] - **doc**: add audio recording links to TSC meeting minutes (Rod Vagg) [#2454](https://github.com/nodejs/node/pull/2454) +* [[`f5cf24afbc`](https://github.com/nodejs/node/commit/f5cf24afbc)] - **doc**: add TSC meeting minutes 2015-07-22 (Rod Vagg) [#2436](https://github.com/nodejs/node/pull/2436) +* [[`3f821b96eb`](https://github.com/nodejs/node/commit/3f821b96eb)] - **doc**: fix spelling mistake in node.js comment (Jacob Edelman) [#2391](https://github.com/nodejs/node/pull/2391) +* [[`3e6a6fcdd6`](https://github.com/nodejs/node/commit/3e6a6fcdd6)] - **(SEMVER-MINOR)** **events**: deprecate static listenerCount function (Sakthipriyan Vairamani) [#2349](https://github.com/nodejs/node/pull/2349) +* [[`023386c852`](https://github.com/nodejs/node/commit/023386c852)] - **fs**: replace bad_args macro with concrete error msg (Roman Klauke) [#2495](https://github.com/nodejs/node/pull/2495) +* [[`d1c27b2e29`](https://github.com/nodejs/node/commit/d1c27b2e29)] - **module**: fix module preloading when cwd is ENOENT (Bradley Meck) [#2353](https://github.com/nodejs/node/pull/2353) +* [[`5d7486941b`](https://github.com/nodejs/node/commit/5d7486941b)] - **repl**: filter integer keys from repl tab complete list (James M Snell) [#2409](https://github.com/nodejs/node/pull/2409) +* [[`7f02443a9a`](https://github.com/nodejs/node/commit/7f02443a9a)] - **repl**: dont throw ENOENT on NODE_REPL_HISTORY_FILE (Todd Kennedy) [#2451](https://github.com/nodejs/node/pull/2451) +* [[`56a2ae9cef`](https://github.com/nodejs/node/commit/56a2ae9cef)] - **src**: improve startup time (Evan Lucas) [#2483](https://github.com/nodejs/node/pull/2483) +* [[`14653c7429`](https://github.com/nodejs/node/commit/14653c7429)] - **stream**: rename poorly named function (Ben Noordhuis) [#2479](https://github.com/nodejs/node/pull/2479) +* [[`1c6e014bfa`](https://github.com/nodejs/node/commit/1c6e014bfa)] - **stream**: micro-optimize high water mark calculation (Ben Noordhuis) [#2479](https://github.com/nodejs/node/pull/2479) +* [[`f1f4b4c46d`](https://github.com/nodejs/node/commit/f1f4b4c46d)] - **stream**: fix off-by-factor-16 error in comment (Ben Noordhuis) [#2479](https://github.com/nodejs/node/pull/2479) +* [[`2d3f09bd76`](https://github.com/nodejs/node/commit/2d3f09bd76)] - **stream_base**: various improvements (Fedor Indutny) [#2351](https://github.com/nodejs/node/pull/2351) +* [[`c1ce423b35`](https://github.com/nodejs/node/commit/c1ce423b35)] - **string_bytes**: fix unaligned write in UCS2 (Fedor Indutny) [#2480](https://github.com/nodejs/node/pull/2480) +* [[`e4d0e86165`](https://github.com/nodejs/node/commit/e4d0e86165)] - **test**: refactor test-https-simple.js (Rich Trott) [#2433](https://github.com/nodejs/node/pull/2433) +* [[`0ea5c8d737`](https://github.com/nodejs/node/commit/0ea5c8d737)] - **test**: remove test-timers-first-fire (João Reis) [#2458](https://github.com/nodejs/node/pull/2458) +* [[`536c3d0537`](https://github.com/nodejs/node/commit/536c3d0537)] - **test**: use reserved IP in test-net-connect-timeout (Rich Trott) [#2257](https://github.com/nodejs/node/pull/2257) +* [[`5df06fd8df`](https://github.com/nodejs/node/commit/5df06fd8df)] - **test**: add spaces after keywords (Brendan Ashworth) +* [[`e714b5620e`](https://github.com/nodejs/node/commit/e714b5620e)] - **test**: remove unreachable code (Michaël Zasso) [#2289](https://github.com/nodejs/node/pull/2289) +* [[`3579f3a2a4`](https://github.com/nodejs/node/commit/3579f3a2a4)] - **test**: disallow unreachable code (Michaël Zasso) [#2289](https://github.com/nodejs/node/pull/2289) +* [[`3545e236fc`](https://github.com/nodejs/node/commit/3545e236fc)] - **test**: reduce timeouts in test-net-keepalive (Brendan Ashworth) [#2429](https://github.com/nodejs/node/pull/2429) +* [[`b60e690023`](https://github.com/nodejs/node/commit/b60e690023)] - **test**: improve test-net-server-pause-on-connect (Brendan Ashworth) [#2429](https://github.com/nodejs/node/pull/2429) +* [[`11d1b8fcaf`](https://github.com/nodejs/node/commit/11d1b8fcaf)] - **test**: improve test-net-pingpong (Brendan Ashworth) [#2429](https://github.com/nodejs/node/pull/2429) +* [[`5fef5c6562`](https://github.com/nodejs/node/commit/5fef5c6562)] - **(SEMVER-MINOR)** **tls**: add --tls-cipher-list command line switch (James M Snell) [#2412](https://github.com/nodejs/node/pull/2412) +* [[`d9b70f9cbf`](https://github.com/nodejs/node/commit/d9b70f9cbf)] - **tls**: handle empty cert in checkServerIndentity (Mike Atkins) [#2343](https://github.com/nodejs/node/pull/2343) +* [[`4f8e34c202`](https://github.com/nodejs/node/commit/4f8e34c202)] - **tools**: add license boilerplate to check-imports.sh (James M Snell) [#2386](https://github.com/nodejs/node/pull/2386) +* [[`b76b9197f9`](https://github.com/nodejs/node/commit/b76b9197f9)] - **tools**: enable space-after-keywords in eslint (Brendan Ashworth) +* [[`64a8f30a70`](https://github.com/nodejs/node/commit/64a8f30a70)] - **tools**: fix anchors in generated documents (Sakthipriyan Vairamani) [#2491](https://github.com/nodejs/node/pull/2491) +* [[`22e344ea10`](https://github.com/nodejs/node/commit/22e344ea10)] - **win**: fix custom actions for WiX older than 3.9 (João Reis) [#2365](https://github.com/nodejs/node/pull/2365) +* [[`b5bd3ebfc8`](https://github.com/nodejs/node/commit/b5bd3ebfc8)] - **win**: fix custom actions on Visual Studio != 2013 (Julien Gilli) [#2365](https://github.com/nodejs/node/pull/2365) + ## 2015-08-18, Version 3.1.0, @Fishrock123 ### Notable changes diff --git a/src/node_version.h b/src/node_version.h index 08ca81fa904..9314ff6514c 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -2,10 +2,10 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 3 -#define NODE_MINOR_VERSION 1 -#define NODE_PATCH_VERSION 1 +#define NODE_MINOR_VERSION 2 +#define NODE_PATCH_VERSION 0 -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) From 3f453b2ba5e9ca5282cc6b5ac72b21966e400edd Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 25 Aug 2015 15:21:01 +1000 Subject: [PATCH 086/214] Working on v3.2.1 --- src/node_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_version.h b/src/node_version.h index 9314ff6514c..d8564f15d72 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -3,9 +3,9 @@ #define NODE_MAJOR_VERSION 3 #define NODE_MINOR_VERSION 2 -#define NODE_PATCH_VERSION 0 +#define NODE_PATCH_VERSION 1 -#define NODE_VERSION_IS_RELEASE 1 +#define NODE_VERSION_IS_RELEASE 0 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) From 944174b189e757381f26f35590c343245a3a75d2 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 18 Aug 2015 21:29:59 +0200 Subject: [PATCH 087/214] build: make ci test addons in test/addons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make `make test-addons` part of the `make test-ci` target. Use order-only prerequisites to make generating and building the add-ons concurrency-safe when $JOBS > 1 and fudge the dependency on $(NODE_EXE) so that add-ons are only rebuilt when needed instead of all the time. PR-URL: https://github.com/nodejs/node/pull/2428 Reviewed-By: Johan Bergström Reviewed-By: Rod Vagg --- Makefile | 41 +++++++++++++++++++++++++++++++---------- test/addons/.gitignore | 2 ++ 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 7027ba973f9..1101977916d 100644 --- a/Makefile +++ b/Makefile @@ -99,19 +99,39 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE) --directory="$(shell pwd)/test/gc/node_modules/weak" \ --nodedir="$(shell pwd)" -build-addons: $(NODE_EXE) - rm -rf test/addons/doc-*/ +# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. +test/addons/.docbuildstamp: doc/api/addons.markdown + $(RM) -r test/addons/doc-*/ $(NODE) tools/doc/addon-verify.js - $(foreach dir, \ - $(sort $(dir $(wildcard test/addons/*/*.gyp))), \ - $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ - --directory="$(shell pwd)/$(dir)" \ - --nodedir="$(shell pwd)" && ) echo "build done" + touch $@ + +ADDONS_BINDING_GYPS := \ + $(filter-out test/addons/doc-*/binding.gyp, \ + $(wildcard test/addons/*/binding.gyp)) + +# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. +test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) | test/addons/.docbuildstamp + # Cannot use $(wildcard test/addons/*/) here, it's evaluated before + # embedded addons have been generated from the documentation. + for dirname in test/addons/*/; do \ + $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ + --directory="$$PWD/$$dirname" \ + --nodedir="$$PWD"; \ + done + touch $@ + +# .buildstamp and .docbuildstamp need $(NODE_EXE) but cannot depend on it +# directly because it calls make recursively. The parent make cannot know +# if the subprocess touched anything so it pessimistically assumes that +# .buildstamp and .docbuildstamp are out of date and need a rebuild. +# Just goes to show that recursive make really is harmful... +# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update. +build-addons: $(NODE_EXE) test/addons/.buildstamp test-gc: all test/gc/node_modules/weak/build/Release/weakref.node $(PYTHON) tools/test.py --mode=release gc -test-build: all build-addons +test-build: | all build-addons test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node $(PYTHON) tools/test.py --mode=debug,release @@ -119,8 +139,9 @@ test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node test-all-valgrind: test-build $(PYTHON) tools/test.py --mode=debug,release --valgrind -test-ci: - $(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release message parallel sequential +test-ci: | build-addons + $(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release \ + addons message parallel sequential test-release: test-build $(PYTHON) tools/test.py --mode=release diff --git a/test/addons/.gitignore b/test/addons/.gitignore index ff6b0079431..bde1cf3ab96 100644 --- a/test/addons/.gitignore +++ b/test/addons/.gitignore @@ -1,3 +1,5 @@ +.buildstamp +.docbuildstamp Makefile *.Makefile *.mk From f2f0fe45ffa9014fde582ef0d24963b673083bdd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 20 Aug 2015 16:57:03 +0200 Subject: [PATCH 088/214] tools: make add-on scraper print filenames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the tool that generates add-ons from doc/api/addons.markdown print the names of the files it writes out. Before this commit, it printed a rather unhelpful "Done." PR-URL: https://github.com/nodejs/node/pull/2428 Reviewed-By: Johan Bergström Reviewed-By: Rod Vagg --- tools/doc/addon-verify.js | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index f87cfecdf5f..4d1aaab3cc7 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -25,12 +25,9 @@ for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (token.type === 'heading') { if (files && Object.keys(files).length !== 0) { - verifyFiles(files, function(err) { - if (err) - console.log(err); - else - console.log('done'); - }); + verifyFiles(files, + console.log.bind(null, 'wrote'), + function(err) { if (err) throw err; }); } files = {}; } else if (token.type === 'code') { @@ -51,7 +48,7 @@ function once(fn) { }; } -function verifyFiles(files, callback) { +function verifyFiles(files, onprogress, ondone) { var dir = path.resolve(verifyDir, 'doc-' + id++); files = Object.keys(files).map(function(name) { @@ -78,17 +75,19 @@ function verifyFiles(files, callback) { fs.mkdir(dir, function() { // Ignore errors + var done = once(ondone); var waiting = files.length; - for (var i = 0; i < files.length; i++) - fs.writeFile(files[i].path, files[i].content, next); + files.forEach(function(file) { + fs.writeFile(file.path, file.content, function(err) { + if (err) + return done(err); - var done = once(callback); - function next(err) { - if (err) - return done(err); + if (onprogress) + onprogress(file.path); - if (--waiting === 0) - done(); - } + if (--waiting === 0) + done(); + }); + }); }); } From 856baf4c67015c612167aa016046667ab9d18677 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 24 Aug 2015 21:25:48 -0700 Subject: [PATCH 089/214] test: make spawnSync() test robust The test had checked that a timer fired within a period after spawnSync() returns. The result was a test that sometimes was flaky. Because there's no guarantee of how long a timer will take before running, remove the check. There is a check that the timer runs after spawnSync() so that is sufficient. PR-URL: https://github.com/nodejs/node/pull/2535 Fixes: https://github.com/nodejs/node/issues/2470 Reviewed-By: Ben Noordhuis --- test/parallel/test-child-process-spawnsync.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/parallel/test-child-process-spawnsync.js b/test/parallel/test-child-process-spawnsync.js index 619cfb7a9d5..d66c51c9c41 100644 --- a/test/parallel/test-child-process-spawnsync.js +++ b/test/parallel/test-child-process-spawnsync.js @@ -7,12 +7,8 @@ var spawnSync = require('child_process').spawnSync; var TIMER = 100; var SLEEP = 1000; -var timeout = 0; - setTimeout(function() { - timeout = process.hrtime(start); assert.ok(stop, 'timer should not fire before process exits'); - assert.strictEqual(timeout[0], 1, 'timer should take as long as sleep'); }, TIMER); console.log('sleep started'); From d2ffecba2db7917b7411eca17fb9f24bfeb0f8c9 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Mon, 24 Aug 2015 10:29:40 -0400 Subject: [PATCH 090/214] doc: add internal modules notice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly note that these modules should not be used outside of core. PR-URL: https://github.com/nodejs/node/pull/2523 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Michaël Zasso --- lib/internal/readme.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/internal/readme.md diff --git a/lib/internal/readme.md b/lib/internal/readme.md new file mode 100644 index 00000000000..38c7f6ad13b --- /dev/null +++ b/lib/internal/readme.md @@ -0,0 +1,4 @@ +# Internal Modules + +The modules in `lib/internal` are intended for internal use in Node.js core only, and are not accessible with `require()` from user modules. +These are subject to change at **any** time. Reliance on these modules outside of core is **not supported** in any way. From a96cc317107dd5ab70814fdb3a71e44b2bedad92 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 25 Aug 2015 09:45:42 -0700 Subject: [PATCH 091/214] test: speed up test-child-process-spawnsync.js There's a bunch of stuff in test-child-process-spawnsync.js that seems designed to test that it is in fact blocking/synchronous. However, that code really just tests the OS sleep command. Change `sleep 1` to `sleep 0` and shave about one second off the test run.` We check the return status to confirm the command is successful. The tests in this file in general would not work if spawnSync() were asynchronous. That includes this one, as a return status would not be available if the command where asynchronous. PR-URL: https://github.com/nodejs/node/pull/2542 Reviewed-By: Colin Ihrig --- test/parallel/test-child-process-spawnsync.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/test/parallel/test-child-process-spawnsync.js b/test/parallel/test-child-process-spawnsync.js index d66c51c9c41..5cb4ec20db3 100644 --- a/test/parallel/test-child-process-spawnsync.js +++ b/test/parallel/test-child-process-spawnsync.js @@ -4,21 +4,10 @@ var assert = require('assert'); var spawnSync = require('child_process').spawnSync; -var TIMER = 100; -var SLEEP = 1000; - -setTimeout(function() { - assert.ok(stop, 'timer should not fire before process exits'); -}, TIMER); - -console.log('sleep started'); -var start = process.hrtime(); -var ret = spawnSync('sleep', ['1']); -var stop = process.hrtime(start); +// Echo does different things on Windows and Unix, but in both cases, it does +// more-or-less nothing if there are no parameters +var ret = spawnSync('sleep', ['0']); assert.strictEqual(ret.status, 0, 'exit status should be zero'); -console.log('sleep exited', stop); -assert.strictEqual(stop[0], 1, - 'sleep should not take longer or less than 1 second'); // Error test when command does not exist var ret_err = spawnSync('command_does_not_exist', ['bar']).error; From 51b86ccac731f882773b54c2cc7824a2d862c84f Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 09:46:07 -0700 Subject: [PATCH 092/214] doc: Clarify the module.parent is set once Per: https://github.com/jorrit/node/commit/54a7f79a4a2ecb9c6f235a03287fe2992f19f0bb Fixes: https://github.com/joyent/node/issues/6149 Originally submitted by @jorrit Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/modules.markdown | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index ca8f02ce8db..d4684070a1e 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -357,8 +357,7 @@ loading. * {Module Object} -The module that required this one. - +The module that first required this one. ### module.children From 105b493595082b4167757d5aa5106e68a3fd9736 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 09:48:49 -0700 Subject: [PATCH 093/214] doc: correct grammar in cluster.markdown per: https://github.com/joyent/node/pull/14352 originally submitted by @AlexKVal Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/cluster.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index abf05bf9f40..f23bee214d8 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -24,7 +24,7 @@ all share server ports. }); } else { // Workers can share any TCP connection - // In this case its a HTTP server + // In this case it is an HTTP server http.createServer(function(req, res) { res.writeHead(200); res.end("hello world\n"); From c8889855910d52b655551311c9941ac5fda73c16 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:00:54 -0700 Subject: [PATCH 094/214] doc: code style cleanups in repl.markdown per: https://github.com/joyent/node/pull/8778 originally submitted by @reggi Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/repl.markdown | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index 2546bbe876c..c7fd0a35068 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -117,10 +117,9 @@ will share the same global object but will have unique I/O. Here is an example that starts a REPL on stdin, a Unix socket, and a TCP socket: - var net = require("net"), - repl = require("repl"); - - connections = 0; + var net = require('net'), + repl = require('repl'), + connections = 0; repl.start({ prompt: "io.js via stdin> ", @@ -191,7 +190,7 @@ be emitted. Example of listening for `reset`: // Extend the initial repl context. - r = repl.start({ options ... }); + var r = repl.start({ options ... }); someExtension.extend(r.context); // When a new context is created extend it as well. @@ -213,7 +212,7 @@ accessing `fs` will `require()` the `fs` module as `global.fs`. The special variable `_` (underscore) contains the result of the last expression. - > [ "a", "b", "c" ] + > [ 'a', 'b', 'c' ] [ 'a', 'b', 'c' ] > _.length 3 @@ -225,10 +224,10 @@ a variable to the REPL explicitly by assigning it to the `context` object associated with each `REPLServer`. For example: // repl_test.js - var repl = require("repl"), - msg = "message"; + var repl = require('repl'), + msg = 'message'; - repl.start("> ").context.m = msg; + repl.start('> ').context.m = msg; Things in the `context` object appear as local within the REPL: From 1d4ea609db2eeb8239e3c81bcda02ef7519e94c0 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:09:30 -0700 Subject: [PATCH 095/214] doc: small clarifications to modules.markdown per: https://github.com/joyent/node/pull/8708 A modified version of the original PR submitted by @builtbylane. Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/modules.markdown | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index d4684070a1e..ccb5a4ce74b 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -121,6 +121,8 @@ io.js has several modules compiled into the binary. These modules are described in greater detail elsewhere in this documentation. The core modules are defined in io.js's source in the `lib/` folder. +The core modules are defined within io.js's source and are located in the +`lib/` folder. Core modules are always preferentially loaded if their identifier is passed to `require()`. For instance, `require('http')` will always @@ -131,22 +133,23 @@ return the built in HTTP module, even if there is a file by that name. If the exact filename is not found, then io.js will attempt to load the -required filename with the added extension of `.js`, `.json`, and then `.node`. +required filename with the added extensions: `.js`, `.json`, and finally +`.node`. `.js` files are interpreted as JavaScript text files, and `.json` files are parsed as JSON text files. `.node` files are interpreted as compiled addon modules loaded with `dlopen`. -A module prefixed with `'/'` is an absolute path to the file. For +A required module prefixed with `'/'` is an absolute path to the file. For example, `require('/home/marco/foo.js')` will load the file at `/home/marco/foo.js`. -A module prefixed with `'./'` is relative to the file calling `require()`. -That is, `circle.js` must be in the same directory as `foo.js` for +A required module prefixed with `'./'` is relative to the file calling +`require()`. That is, `circle.js` must be in the same directory as `foo.js` for `require('./circle')` to find it. -Without a leading '/', './', or '../' to indicate a file, the module is either a -core module or is loaded from a `node_modules` folder. +Without a leading '/', './', or '../' to indicate a file, the module must +either be a core module or is loaded from a `node_modules` folder. If the given path does not exist, `require()` will throw an Error with its `code` property set to `'MODULE_NOT_FOUND'`. From b5da89431a7515ee2b31f0a153ebd47445cd0488 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:25:10 -0700 Subject: [PATCH 096/214] doc: update path.extname documentation per: https://github.com/joyent/node/pull/8509 originally submitted by @thauburger Adding an additional example to path.extname documentation to demonstrate the case where the first character of the last path component is '.'. This case is interesting, as something like path.extname('.txt') returns an empty string. In this case, .txt can be used as a valid file name (while arguably maintaining an extension). I agree with Node's behavior in this case, but I think the added example provides additional clarity for the developer. Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/path.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/path.markdown b/doc/api/path.markdown index 7177ab4d2d0..f879d462a29 100644 --- a/doc/api/path.markdown +++ b/doc/api/path.markdown @@ -183,6 +183,10 @@ an empty string. Examples: // returns '' + path.extname('.index') + // returns + '' + ## path.sep The platform-specific file separator. `'\\'` or `'/'`. From f6d3b87a25342af58a16de885bdd7d819cbb39b9 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:39:20 -0700 Subject: [PATCH 097/214] doc: improve working in stream.markdown per: https://github.com/joyent/node/pull/8430 originally submitted by @mscdex Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/stream.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index ffad1717f75..ef7f5a9b96a 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -1215,19 +1215,19 @@ as a result of this chunk. Call the callback function only when the current chunk is completely consumed. Note that there may or may not be output as a result of any -particular input chunk. If you supply output as the second argument to the -callback, it will be passed to push method, in other words the following are +particular input chunk. If you supply a second argument to the callback +it will be passed to the push method. In other words the following are equivalent: ```javascript transform.prototype._transform = function (data, encoding, callback) { this.push(data); callback(); -} +}; transform.prototype._transform = function (data, encoding, callback) { callback(null, data); -} +}; ``` This method is prefixed with an underscore because it is internal to From 52018e73d9a7ad10264effbc87b0bf651f06b1bc Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:46:43 -0700 Subject: [PATCH 098/214] doc: clarification on the 'close' event per: https://github.com/joyent/node/pull/8209 originally submitted by @jeromew Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/stream.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index ef7f5a9b96a..d6c047df050 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -230,8 +230,11 @@ readable.on('end', function() { #### Event: 'close' -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. +Emitted when the stream and any of its underlying resources (a file +descriptor, for example) have been closed, no more events will be +emitted, and no further computation will occur. + +Not all streams will emit the 'close' event. #### Event: 'error' From 27c07b3f8ef88c7b4b46c090c744121b00d3309b Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 10:59:07 -0700 Subject: [PATCH 099/214] doc: update description of fs.exists in fs.markdown per: https://github.com/joyent/node/pull/7944 originally submitted by @oconnore Minor update to the description in `fs.exists()` Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/fs.markdown | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 99c3daf7a36..213ecd7f621 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -680,15 +680,11 @@ Then call the `callback` argument with either true or false. Example: console.log(exists ? "it's there" : 'no passwd!'); }); -`fs.exists()` is an anachronism and exists only for historical reasons. -There should almost never be a reason to use it in your own code. - -In particular, checking if a file exists before opening it is an anti-pattern -that leaves you vulnerable to race conditions: another process may remove the -file between the calls to `fs.exists()` and `fs.open()`. Just open the file -and handle the error when it's not there. - - +`fs.exists()` should not be used to check if a file exists before calling +`fs.open()`. Doing so introduces a race condition since other processes may +change the file's state between the two calls. Instead, user code should +call `fs.open()` directly and handle the error raised if the file is +non-existent. ## fs.existsSync(path) From c9fdd1bbbf0b8e35620092658605f146c1dea5de Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 11:07:13 -0700 Subject: [PATCH 100/214] doc: fixed typo in net.markdown (missing comma) per: https://github.com/joyent/node/pull/7930 originally submitted by @pbrewczynski Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/net.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 2fad87e41b8..61a8fcfd2af 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -334,7 +334,7 @@ Construct a new socket object. `options` is an object with the following defaults: - { fd: null + { fd: null, allowHalfOpen: false, readable: false, writable: false From 04111ce40f59b922d1551e0aad5da0a52885de1c Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 11:36:39 -0700 Subject: [PATCH 101/214] doc: small typo in domain.markdown per: https://github.com/joyent/node/pull/7715 originally submitted by @tonylukasavage Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/domain.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/domain.markdown b/doc/api/domain.markdown index 56e8f0650ad..769a102c103 100644 --- a/doc/api/domain.markdown +++ b/doc/api/domain.markdown @@ -32,7 +32,7 @@ process. Of course, in a normal web server, you might have many connections open, and it is not reasonable to abruptly shut those down because an error was triggered by someone else. -The better approach is send an error response to the request that +The better approach is to send an error response to the request that triggered the error, while letting the others finish in their normal time, and stop listening for new requests in that worker. From 94d83c04f2eeebc77b9878eb28729bca50a877db Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 11:43:23 -0700 Subject: [PATCH 102/214] doc: update parameter name in net.markdown per: https://github.com/joyent/node/pull/7112 originally submitted by @Peekmo Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/net.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 61a8fcfd2af..3d147353cdb 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -57,8 +57,8 @@ Use `nc` to connect to a UNIX domain socket server: nc -U /tmp/echo.sock -## net.connect(options[, connectionListener]) -## net.createConnection(options[, connectionListener]) +## net.connect(options[, connectListener]) +## net.createConnection(options[, connectListener]) A factory function, which returns a new ['net.Socket'](#net_class_net_socket) and automatically connects with the supplied `options`. From 0ff6657a509a51ae2e8d003d71d77b368725facc Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 12:56:26 -0700 Subject: [PATCH 103/214] doc: fix minor types and grammar in fs docs per: https://github.com/joyent/node/pull/7431 originally submitted by @linclark Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/fs.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 213ecd7f621..9027d5f04fc 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -8,7 +8,7 @@ File I/O is provided by simple wrappers around standard POSIX functions. To use this module do `require('fs')`. All the methods have asynchronous and synchronous forms. -The asynchronous form always take a completion callback as its last argument. +The asynchronous form always takes a completion callback as its last argument. The arguments passed to the completion callback depend on the method, but the first argument is always reserved for an exception. If the operation was completed successfully, then the first argument will be `null` or `undefined`. @@ -59,8 +59,8 @@ In busy processes, the programmer is _strongly encouraged_ to use the asynchronous versions of these calls. The synchronous versions will block the entire process until they complete--halting all connections. -Relative path to filename can be used, remember however that this path will be -relative to `process.cwd()`. +The relative path to a filename can be used. Remember, however, that this path +will be relative to `process.cwd()`. Most fs functions let you omit the callback argument. If you do, a default callback is used that rethrows errors. To get a trace to the original call @@ -574,7 +574,7 @@ stat object: These stat objects are instances of `fs.Stat`. -If you want to be notified when the file was modified, not just accessed +If you want to be notified when the file was modified, not just accessed, you need to compare `curr.mtime` and `prev.mtime`. _Note: when an `fs.watchFile` operation results in an `ENOENT` error, it will From ea9ee15c21301392c6d50d8c3953f905b455667b Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:05:24 -0700 Subject: [PATCH 104/214] doc: port is optional for socket.bind() per: https://github.com/joyent/node/pull/25356 originally submitted by @dcousens Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/dgram.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/dgram.markdown b/doc/api/dgram.markdown index 757230492df..6e9f614ed53 100644 --- a/doc/api/dgram.markdown +++ b/doc/api/dgram.markdown @@ -158,15 +158,16 @@ a packet might travel, and that generally sending a datagram greater than the (receiver) `MTU` won't work (the packet gets silently dropped, without informing the source that the data did not reach its intended recipient). -### socket.bind(port[, address][, callback]) +### socket.bind([port][, address][, callback]) -* `port` Integer +* `port` Integer, Optional * `address` String, Optional * `callback` Function with no parameters, Optional. Callback when binding is done. For UDP sockets, listen for datagrams on a named `port` and optional -`address`. If `address` is not specified, the OS will try to listen on +`address`. If `port` is not specified, the OS will try to bind to a random +port. If `address` is not specified, the OS will try to listen on all addresses. After binding is done, a "listening" event is emitted and the `callback`(if specified) is called. Specifying both a "listening" event listener and `callback` is not harmful but not very From 242e3fe3ba76629e44d93189ea656b89ebdc7c97 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:12:47 -0700 Subject: [PATCH 105/214] doc: fixed worker.id type per: https://github.com/joyent/node/pull/25459 originally submitted by @sonnyp Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/cluster.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index f23bee214d8..7cd079c0405 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -384,7 +384,7 @@ it can be obtained using `cluster.worker`. ### worker.id -* {String} +* {Number} Each new worker is given its own unique id, this id is stored in the `id`. From b5d68f807674564c4167d0b2e497499a72ded35d Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:23:25 -0700 Subject: [PATCH 106/214] doc: update tense in child_process.markdown per: https://github.com/joyent/node/pull/25826 originally submitted by: @ClimbsRocks Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/child_process.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 4acd61bfa6a..2ef8f1b3b3e 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -88,7 +88,7 @@ and the `.connected` property is false. * `message` {Object} a parsed JSON object or primitive value * `sendHandle` {Handle object} a Socket or Server object -Messages send by `.send(message, [sendHandle])` are obtained using the +Messages sent by `.send(message, [sendHandle])` are obtained using the `message` event. ### child.stdin From 48e6ccf8c2ffa68973a9628ca3f8c04f8476b6e3 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:27:17 -0700 Subject: [PATCH 107/214] doc: remove 'dudes' from documentation per: https://github.com/joyent/node/pull/25572#discussion_r33197896 Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/child_process.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 2ef8f1b3b3e..690eb277202 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -314,7 +314,7 @@ socket to a "special" child process. Other sockets will go to a "normal" process special.send('socket', socket); return; } - // just the usual dudes + // just the usual... normal.send('socket', socket); }); server.listen(1337); From 6c98cf0266249212b047a760838c4c49d58d49e6 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 15:54:28 -0700 Subject: [PATCH 108/214] doc: remove repeated statement in globals.markdown Per: https://github.com/joyent/node/pull/25102 Originally reported by @kuldipem Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/globals.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/api/globals.markdown b/doc/api/globals.markdown index 5b0ed2d3f48..aae350052af 100644 --- a/doc/api/globals.markdown +++ b/doc/api/globals.markdown @@ -143,8 +143,6 @@ when to use `module.exports`. See the [module system documentation][] for more information. -See the [module section][] for more information. - ## setTimeout(cb, ms) Run callback `cb` after *at least* `ms` milliseconds. The actual delay depends From f707189370e48eb7267034095f8c6127fc8ca9b2 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 16:08:57 -0700 Subject: [PATCH 109/214] doc: minor grammatical update Per: https://github.com/joyent/node/pull/9009 Originally submitted by @peerwit Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/crypto.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 267e0359f26..0550b435449 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -135,7 +135,7 @@ Returned by `crypto.createHash`. Updates the hash content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or -`'binary'`. If no encoding is provided and the input is a string an +`'binary'`. If no encoding is provided, and the input is a string, an encoding of `'binary'` is enforced. If `data` is a `Buffer` then `input_encoding` is ignored. From 3bd08aac4bdaaf38de996ee065293f41921f22cd Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 14 Aug 2015 16:23:00 -0700 Subject: [PATCH 110/214] doc: minor grammatical update in crypto.markdown Per: https://github.com/joyent/node/pull/8878 Originally submitted by @jacksonhoose Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/crypto.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 0550b435449..37b54811673 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -323,7 +323,7 @@ called. You can disable auto padding if the data has been encrypted without standard block padding to prevent `decipher.final` from checking and -removing it. Can only work if the input data's length is a multiple of +removing it. This will only work if the input data's length is a multiple of the ciphers block size. You must call this before streaming data to `decipher.update`. From 2f6245588079e0199fa2f44ba808b30665a8cf81 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 21 Aug 2015 19:21:06 -0700 Subject: [PATCH 111/214] doc: minor additional corrections and improvements Per feedback from @thefourtheye: (a) improve word on the description of the `close` event in stream.markdown and (b) remove `[module section]: modules.html` from globals.markdown Reviewed By: Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2378 --- doc/api/globals.markdown | 1 - doc/api/stream.markdown | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/api/globals.markdown b/doc/api/globals.markdown index aae350052af..05c21f89abf 100644 --- a/doc/api/globals.markdown +++ b/doc/api/globals.markdown @@ -181,7 +181,6 @@ will not execute. The timer functions are global variables. See the [timers][] section. [buffer section]: buffer.html -[module section]: modules.html [module system documentation]: modules.html [Modules]: modules.html#modules_modules [process object]: process.html#process_process diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index d6c047df050..2ae4b4b2ce7 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -231,8 +231,8 @@ readable.on('end', function() { #### Event: 'close' Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed, no more events will be -emitted, and no further computation will occur. +descriptor, for example) have been closed. The event indicates that +no more events will be emitted, and no further computation will occur. Not all streams will emit the 'close' event. From e3e00143fdd7b027935452ca24b4cf80c9a80f61 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 25 Aug 2015 18:58:08 -0700 Subject: [PATCH 112/214] doc: fix bad merge on modules.markdown My previous commit landed a bad merge on modules.markdown. This fixes it. --- doc/api/modules.markdown | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/api/modules.markdown b/doc/api/modules.markdown index ccb5a4ce74b..38f5da53810 100644 --- a/doc/api/modules.markdown +++ b/doc/api/modules.markdown @@ -120,7 +120,6 @@ plan accordingly. io.js has several modules compiled into the binary. These modules are described in greater detail elsewhere in this documentation. -The core modules are defined in io.js's source in the `lib/` folder. The core modules are defined within io.js's source and are located in the `lib/` folder. From c16e100593724c598995fd79e82e5001f07a9b48 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 20 Aug 2015 14:51:00 +1000 Subject: [PATCH 113/214] doc: reorg release team to separate section included: * commands to run to import all active keys * list of previous Node.js releasers key details PR-URL: https://github.com/nodejs/node/pull/2455 Reviewed-By: Colin Ihrig --- README.md | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index dcf36e4dbce..7673fc35d3a 100644 --- a/README.md +++ b/README.md @@ -57,15 +57,16 @@ to verify that the file has not been tampered with. To verify a SHASUM256.txt.asc, you will first need to import all of the GPG keys of individuals authorized to create releases. They are -listed at the bottom of this README. Use a command such as this to -import the keys: +listed at the bottom of this README under [Release Team](#release-team). +Use a command such as this to import the keys: ``` $ gpg --keyserver pool.sks-keyservers.net \ --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D ``` -_(Include each of the key fingerprints at the end of this command.)_ +_(See the bottom of this README for a full script to import active +release keys)_ You can then use `gpg --verify SHASUMS256.txt.asc` to verify that the file has been signed by an authorized member of the io.js team. @@ -336,7 +337,6 @@ that forms the _Technical Steering Committee_ (TSC) which governs the project. F information about the governance of the io.js project, see [GOVERNANCE.md](./GOVERNANCE.md). -======= ### TSC (Technical Steering Committee) * **Ben Noordhuis** <info@bnoordhuis.nl> ([@bnoordhuis](https://github.com/bnoordhuis)) @@ -344,13 +344,9 @@ information about the governance of the io.js project, see * **Fedor Indutny** <fedor.indutny@gmail.com> ([@indutny](https://github.com/indutny)) * **Trevor Norris** <trev.norris@gmail.com> ([@trevnorris](https://github.com/trevnorris)) * **Chris Dickinson** <christopher.s.dickinson@gmail.com> ([@chrisdickinson](https://github.com/chrisdickinson)) - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B * **Rod Vagg** <rod@vagg.org> ([@rvagg](https://github.com/rvagg)) - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D * **Jeremiah Senkpiel** <fishrock123@rocketmail.com> ([@fishrock123](https://github.com/fishrock123)) - - Release GPG key: FD3A5288F042B6850C66B31F09FE44734EB7990E * **Colin Ihrig** <cjihrig@gmail.com> ([@cjihrig](https://github.com/cjihrig)) - - Release GPG key: 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 * **Alexis Campailla** <orangemocha@nodejs.org> ([@orangemocha](https://github.com/orangemocha)) * **Julien Gilli** <jgilli@nodejs.org> ([@misterdjules](https://github.com/misterdjules)) * **James M Snell** <jasnell@gmail.com> ([@jasnell](https://github.com/jasnell)) @@ -393,3 +389,32 @@ information about the governance of the io.js project, see Collaborators & TSC members follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in maintaining the io.js project. + +### Release Team + +Releases of Node.js and io.js will be signed with one of the following GPG keys: + +* **Chris Dickinson** <christopher.s.dickinson@gmail.com>: `9554F04D7259F04124DE6B476D5A82AC7E37093B` +* **Colin Ihrig** <cjihrig@gmail.com> `94AE36675C464D64BAFA68DD7434390BDBE9B9C5` +* **Jeremiah Senkpiel** <fishrock@keybase.io> `FD3A5288F042B6850C66B31F09FE44734EB7990E` +* **Rod Vagg** <rod@vagg.org> `DD8F2338BAE7501E3DD5AC78C273792F7D83545D` + +The full set of trusted release keys can be imported by running: + +``` +gpg --keyserver pool.sks-keyservers.net --recv-keys 9554F04D7259F04124DE6B476D5A82AC7E37093B +gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 +gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E +gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D +``` + +See the section above on [Verifying Binaries](#verifying-binaries) for +details on what to do with these keys to verify a downloaded file is official. + +Previous releases of Node.js have been signed with one of the following GPG +keys: + +* Julien Gilli <jgilli@fastmail.fm> `114F43EE0176B71C7BC219DD50A3051F888C628D` +* Timothy J Fontaine <tjfontaine@gmail.com> `7937DFD2AB06298B2293C3187D33FF9D0246406D` +* Isaac Z. Schlueter <i@izs.me> `93C7E9E91B49E432C2F75674B0A78B0A6C481CF6` +>>>>>>> b6a4c05... doc: reorg release team to separate section From 0db0e53753269cf805b6b39d8622aa38843bb0f7 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 20 Aug 2015 14:52:33 +1000 Subject: [PATCH 114/214] doc: add @jasnell and @sam-github to release team Fixes: https://github.com/nodejs/node/issues/2416 PR-URL: https://github.com/nodejs/node/pull/2455 Reviewed-By: Colin Ihrig --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7673fc35d3a..53d38f3f143 100644 --- a/README.md +++ b/README.md @@ -396,7 +396,9 @@ Releases of Node.js and io.js will be signed with one of the following GPG keys: * **Chris Dickinson** <christopher.s.dickinson@gmail.com>: `9554F04D7259F04124DE6B476D5A82AC7E37093B` * **Colin Ihrig** <cjihrig@gmail.com> `94AE36675C464D64BAFA68DD7434390BDBE9B9C5` +* **Sam Roberts** <octetcloud@keybase.io> `0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93` * **Jeremiah Senkpiel** <fishrock@keybase.io> `FD3A5288F042B6850C66B31F09FE44734EB7990E` +* **James M Snell** <jasnell@keybase.io> `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1` * **Rod Vagg** <rod@vagg.org> `DD8F2338BAE7501E3DD5AC78C273792F7D83545D` The full set of trusted release keys can be imported by running: @@ -404,7 +406,9 @@ The full set of trusted release keys can be imported by running: ``` gpg --keyserver pool.sks-keyservers.net --recv-keys 9554F04D7259F04124DE6B476D5A82AC7E37093B gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 +gpg --keyserver pool.sks-keyservers.net --recv-keys 0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E +gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D ``` From 34de90194bba5561663f3889809d0adea1e51e65 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Mon, 24 Aug 2015 19:13:22 -0500 Subject: [PATCH 115/214] build: only define NODE_V8_OPTIONS if not empty Previously, V8::SetFlagsFromString was called on every launch even if NODE_V8_OPTIONS was an empty string. This patch only defines NODE_V8_OPTIONS if node_v8_options is not an empty string. PR-URL: https://github.com/nodejs/node/pull/2532 Reviewed-By: Ben Noordhuis Reviewed-By: Rod Vagg --- node.gyp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node.gyp b/node.gyp index 7b2d0a54f7c..af5a4bb7501 100644 --- a/node.gyp +++ b/node.gyp @@ -179,7 +179,6 @@ 'defines': [ 'NODE_ARCH="<(target_arch)"', 'NODE_PLATFORM="<(OS)"', - 'NODE_V8_OPTIONS="<(node_v8_options)"', 'NODE_WANT_INTERNALS=1', ], @@ -188,6 +187,9 @@ [ 'node_tag!=""', { 'defines': [ 'NODE_TAG="<(node_tag)"' ], }], + [ 'node_v8_options!=""', { + 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'], + }], # No node_main.cc for anything except executable [ 'node_target_type!="executable"', { 'sources!': [ From 13fd96dda31a14dbea23dca7fd00cc0125f78384 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Tue, 25 Aug 2015 18:48:15 -0400 Subject: [PATCH 116/214] src: missing Exception::Error in node_http_parser Fixes: 75adde07f9a2de7f38a67bec72bd377d450bdb52 PR-URL: https://github.com/nodejs/node/pull/2550 Reviewed-By: Fedor Indutny --- src/node_http_parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 6c5d76ecf6c..ef87f26229f 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -443,7 +443,7 @@ class Parser : public BaseObject { if (rv != 0) { enum http_errno err = HTTP_PARSER_ERRNO(&parser->parser_); - Local e = env->parse_error_string(); + Local e = Exception::Error(env->parse_error_string()); Local obj = e->ToObject(env->isolate()); obj->Set(env->bytes_parsed_string(), Integer::New(env->isolate(), 0)); obj->Set(env->code_string(), From 3492d2d4c634c64871a3d45e6cf74ea8efdda3eb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 25 Aug 2015 09:18:25 -0700 Subject: [PATCH 117/214] test: make test-process-argv-0 robust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove use of STDERR to avoid test flakiness on CentOS 5. Use parent process exit event for assertion rather than child exit event. PR-URL: https://github.com/nodejs/node/pull/2541 Fixes: https://github.com/nodejs/node/issues/2477 Reviewed-By: Michaël Zasso --- test/parallel/test-process-argv-0.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/parallel/test-process-argv-0.js b/test/parallel/test-process-argv-0.js index b67601a2556..fb6df310e14 100644 --- a/test/parallel/test-process-argv-0.js +++ b/test/parallel/test-process-argv-0.js @@ -1,12 +1,7 @@ 'use strict'; -var util = require('util'); var path = require('path'); var assert = require('assert'); var spawn = require('child_process').spawn; -var common = require('../common'); - -console.error('argv=%j', process.argv); -console.error('exec=%j', process.execPath); if (process.argv[2] !== 'child') { var child = spawn(process.execPath, [__filename, 'child'], { @@ -14,15 +9,10 @@ if (process.argv[2] !== 'child') { }); var childArgv0 = ''; - var childErr = ''; child.stdout.on('data', function(chunk) { childArgv0 += chunk; }); - child.stderr.on('data', function(chunk) { - childErr += chunk; - }); - child.on('exit', function() { - console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: ')); + process.on('exit', function() { assert.equal(childArgv0, process.execPath); }); } From 395d736b9d34014e8612172a6517cbcdc2389489 Mon Sep 17 00:00:00 2001 From: Minwoo Jung Date: Wed, 26 Aug 2015 21:17:52 +0900 Subject: [PATCH 118/214] debugger: use strict equality comparison There is no type-conversion to be done. Therefore, use the === operator. PR-URL: https://github.com/nodejs/node/pull/2558 Reviewed-By: Rich Trott --- lib/_debugger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index ed71c668f31..518f8ee28a9 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -173,7 +173,7 @@ Client.prototype._addHandle = function(desc) { this.handles[desc.handle] = desc; - if (desc.type == 'script') { + if (desc.type === 'script') { this._addScript(desc); } }; From b36debd5cba62e7de7133cecc1cde557c4882b69 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 26 Aug 2015 04:37:50 -0700 Subject: [PATCH 119/214] env: introduce `KickNextTick` There might be a need to "kick off" the next tick queue and execute events on it. Normally it is done through the `MakeCallback` interface, but in case when it is not - we need a way to "kick them off" manually. PR-URL: https://github.com/nodejs/node/pull/2355 Reviewed-By: Trevor Norris --- src/env.cc | 35 +++++++++++++++++++++++++++++++++++ src/env.h | 2 ++ src/node.cc | 27 +-------------------------- src/node_internals.h | 2 ++ 4 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/env.cc b/src/env.cc index 3deb4db09e6..e28866efd06 100644 --- a/src/env.cc +++ b/src/env.cc @@ -10,6 +10,7 @@ using v8::Local; using v8::Message; using v8::StackFrame; using v8::StackTrace; +using v8::TryCatch; void Environment::PrintSyncTrace() const { if (!trace_sync_io_) @@ -55,4 +56,38 @@ void Environment::PrintSyncTrace() const { fflush(stderr); } + +bool Environment::KickNextTick() { + TickInfo* info = tick_info(); + + if (info->in_tick()) { + return true; + } + + if (info->length() == 0) { + isolate()->RunMicrotasks(); + } + + if (info->length() == 0) { + info->set_index(0); + return true; + } + + info->set_in_tick(true); + + // process nextTicks after call + TryCatch try_catch; + try_catch.SetVerbose(true); + tick_callback_function()->Call(process_object(), 0, nullptr); + + info->set_in_tick(false); + + if (try_catch.HasCaught()) { + info->set_last_threw(true); + return false; + } + + return true; +} + } // namespace node diff --git a/src/env.h b/src/env.h index 1801ffecd3c..5830b02b58e 100644 --- a/src/env.h +++ b/src/env.h @@ -424,6 +424,8 @@ class Environment { void PrintSyncTrace() const; inline void set_trace_sync_io(bool value); + bool KickNextTick(); + inline uint32_t* heap_statistics_buffer() const; inline void set_heap_statistics_buffer(uint32_t* pointer); diff --git a/src/node.cc b/src/node.cc index a8723dc095f..7ddae5205ee 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1026,7 +1026,6 @@ Handle MakeCallback(Environment* env, // If you hit this assertion, you forgot to enter the v8::Context first. CHECK_EQ(env->context(), env->isolate()->GetCurrentContext()); - Local process = env->process_object(); Local object, domain; bool has_async_queue = false; bool has_domain = false; @@ -1092,32 +1091,8 @@ Handle MakeCallback(Environment* env, return Undefined(env->isolate()); } - Environment::TickInfo* tick_info = env->tick_info(); - - if (tick_info->in_tick()) { - return ret; - } - - if (tick_info->length() == 0) { - env->isolate()->RunMicrotasks(); - } - - if (tick_info->length() == 0) { - tick_info->set_index(0); - return ret; - } - - tick_info->set_in_tick(true); - - // process nextTicks after call - env->tick_callback_function()->Call(process, 0, nullptr); - - tick_info->set_in_tick(false); - - if (try_catch.HasCaught()) { - tick_info->set_last_threw(true); + if (!env->KickNextTick()) return Undefined(env->isolate()); - } return ret; } diff --git a/src/node_internals.h b/src/node_internals.h index 8f35433b2f8..ffb5ec7ad96 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -69,6 +69,8 @@ v8::Handle MakeCallback(Environment* env, int argc = 0, v8::Handle* argv = nullptr); +bool KickNextTick(); + // Convert a struct sockaddr to a { address: '1.2.3.4', port: 1234 } JS object. // Sets address and port properties on the info object and returns it. // If |info| is omitted, a new object is returned. From 1bc446863f9b44dfd40e8c49f489180d53cce80c Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 11 Aug 2015 20:02:22 -0700 Subject: [PATCH 120/214] http_parser: consume StreamBase instance Consume StreamBase instance and operate on incoming data directly without allocating Buffer instances. Improves performance. PR-URL: https://github.com/nodejs/node/pull/2355 Reviewed-By: Trevor Norris --- lib/_http_server.js | 53 ++++- src/env-inl.h | 11 ++ src/env.h | 5 + src/node_http_parser.cc | 204 ++++++++++++++++---- test/parallel/test-http-server-unconsume.js | 30 +++ 5 files changed, 266 insertions(+), 37 deletions(-) create mode 100644 test/parallel/test-http-server-unconsume.js diff --git a/lib/_http_server.js b/lib/_http_server.js index 6769f4a1521..dd787fa2f7a 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -79,6 +79,8 @@ const STATUS_CODES = exports.STATUS_CODES = { 511 : 'Network Authentication Required' // RFC 6585 }; +const kOnExecute = HTTPParser.kOnExecute | 0; + function ServerResponse(req) { OutgoingMessage.call(this); @@ -317,6 +319,21 @@ function connectionListener(socket) { socket.on('end', socketOnEnd); socket.on('data', socketOnData); + // We are consuming socket, so it won't get any actual data + socket.on('resume', onSocketResume); + socket.on('pause', onSocketPause); + + socket.on('drain', socketOnDrain); + + // Override on to unconsume on `data`, `readable` listeners + socket.on = socketOnWrap; + + var external = socket._handle._externalStream; + if (external) + parser.consume(external); + external = null; + parser[kOnExecute] = onParserExecute; + // TODO(isaacs): Move all these functions out of here function socketOnError(e) { self.emit('clientError', e, this); @@ -326,6 +343,16 @@ function connectionListener(socket) { assert(!socket._paused); debug('SERVER socketOnData %d', d.length); var ret = parser.execute(d); + + onParserExecuteCommon(ret, d); + } + + function onParserExecute(ret, d) { + debug('SERVER socketOnParserExecute %d', ret); + onParserExecuteCommon(ret, undefined); + } + + function onParserExecuteCommon(ret, d) { if (ret instanceof Error) { debug('parse error'); socket.destroy(ret); @@ -335,9 +362,13 @@ function connectionListener(socket) { var req = parser.incoming; debug('SERVER upgrade or connect', req.method); + if (!d) + d = parser.getCurrentBuffer(); + socket.removeListener('data', socketOnData); socket.removeListener('end', socketOnEnd); socket.removeListener('close', serverSocketCloseListener); + parser.unconsume(socket._handle._externalStream); parser.finish(); freeParser(parser, req, null); parser = null; @@ -400,7 +431,6 @@ function connectionListener(socket) { socket.resume(); } } - socket.on('drain', socketOnDrain); function parserOnIncoming(req, shouldKeepAlive) { incoming.push(req); @@ -480,3 +510,24 @@ function connectionListener(socket) { } } exports._connectionListener = connectionListener; + +function onSocketResume() { + this._handle.readStart(); +} + +function onSocketPause() { + this._handle.readStop(); +} + +function socketOnWrap(ev, fn) { + var res = net.Socket.prototype.on.call(this, ev, fn); + if (!this.parser) { + this.on = net.Socket.prototype.on; + return res; + } + + if (ev === 'data' || ev === 'readable') + this.parser.unconsume(this._handle._externalStream); + + return res; +} diff --git a/src/env-inl.h b/src/env-inl.h index 369bc2f780e..cbc8c4ff1f5 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -178,6 +178,7 @@ inline Environment::Environment(v8::Local context, printed_error_(false), trace_sync_io_(false), debugger_agent_(this), + http_parser_buffer_(nullptr), context_(context->GetIsolate(), context) { // We'll be creating new objects so make sure we've entered the context. v8::HandleScope handle_scope(isolate()); @@ -200,6 +201,7 @@ inline Environment::~Environment() { isolate_data()->Put(); delete[] heap_statistics_buffer_; + delete[] http_parser_buffer_; } inline void Environment::CleanupHandles() { @@ -338,6 +340,15 @@ inline void Environment::set_heap_statistics_buffer(uint32_t* pointer) { heap_statistics_buffer_ = pointer; } +inline char* Environment::http_parser_buffer() const { + return http_parser_buffer_; +} + +inline void Environment::set_http_parser_buffer(char* buffer) { + CHECK_EQ(http_parser_buffer_, nullptr); // Should be set only once. + http_parser_buffer_ = buffer; +} + inline Environment* Environment::from_cares_timer_handle(uv_timer_t* handle) { return ContainerOf(&Environment::cares_timer_handle_, handle); } diff --git a/src/env.h b/src/env.h index 5830b02b58e..ce972d598ed 100644 --- a/src/env.h +++ b/src/env.h @@ -429,6 +429,9 @@ class Environment { inline uint32_t* heap_statistics_buffer() const; inline void set_heap_statistics_buffer(uint32_t* pointer); + inline char* http_parser_buffer() const; + inline void set_http_parser_buffer(char* buffer); + inline void ThrowError(const char* errmsg); inline void ThrowTypeError(const char* errmsg); inline void ThrowRangeError(const char* errmsg); @@ -526,6 +529,8 @@ class Environment { uint32_t* heap_statistics_buffer_ = nullptr; + char* http_parser_buffer_; + #define V(PropertyName, TypeName) \ v8::Persistent PropertyName ## _; ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES(V) diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index ef87f26229f..665ce285be5 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -6,6 +6,8 @@ #include "base-object-inl.h" #include "env.h" #include "env-inl.h" +#include "stream_base.h" +#include "stream_base-inl.h" #include "util.h" #include "util-inl.h" #include "v8.h" @@ -36,6 +38,7 @@ namespace node { using v8::Array; using v8::Boolean; using v8::Context; +using v8::EscapableHandleScope; using v8::Exception; using v8::Function; using v8::FunctionCallbackInfo; @@ -54,6 +57,7 @@ const uint32_t kOnHeaders = 0; const uint32_t kOnHeadersComplete = 1; const uint32_t kOnBody = 2; const uint32_t kOnMessageComplete = 3; +const uint32_t kOnExecute = 4; #define HTTP_CB(name) \ @@ -295,7 +299,7 @@ class Parser : public BaseObject { HTTP_DATA_CB(on_body) { - HandleScope scope(env()->isolate()); + EscapableHandleScope scope(env()->isolate()); Local obj = object(); Local cb = obj->Get(kOnBody); @@ -303,6 +307,15 @@ class Parser : public BaseObject { if (!cb->IsFunction()) return 0; + // We came from consumed stream + if (current_buffer_.IsEmpty()) { + // Make sure Buffer will be in parent HandleScope + current_buffer_ = scope.Escape(Buffer::Copy( + env()->isolate(), + current_buffer_data_, + current_buffer_len_).ToLocalChecked()); + } + Local argv[3] = { current_buffer_, Integer::NewFromUnsigned(env()->isolate(), at - current_buffer_data_), @@ -374,8 +387,6 @@ class Parser : public BaseObject { // var bytesParsed = parser->execute(buffer); static void Execute(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - Parser* parser = Unwrap(args.Holder()); CHECK(parser->current_buffer_.IsEmpty()); CHECK_EQ(parser->current_buffer_len_, 0); @@ -390,40 +401,11 @@ class Parser : public BaseObject { // amount of overhead. Nothing else will run while http_parser_execute() // runs, therefore this pointer can be set and used for the execution. parser->current_buffer_ = buffer_obj; - parser->current_buffer_len_ = buffer_len; - parser->current_buffer_data_ = buffer_data; - parser->got_exception_ = false; - size_t nparsed = - http_parser_execute(&parser->parser_, &settings, buffer_data, buffer_len); + Local ret = parser->Execute(buffer_data, buffer_len); - parser->Save(); - - // Unassign the 'buffer_' variable - parser->current_buffer_.Clear(); - parser->current_buffer_len_ = 0; - parser->current_buffer_data_ = nullptr; - - // If there was an exception in one of the callbacks - if (parser->got_exception_) - return; - - Local nparsed_obj = Integer::New(env->isolate(), nparsed); - // If there was a parse error in one of the callbacks - // TODO(bnoordhuis) What if there is an error on EOF? - if (!parser->parser_.upgrade && nparsed != buffer_len) { - enum http_errno err = HTTP_PARSER_ERRNO(&parser->parser_); - - Local e = Exception::Error(env->parse_error_string()); - Local obj = e->ToObject(env->isolate()); - obj->Set(env->bytes_parsed_string(), nparsed_obj); - obj->Set(env->code_string(), - OneByteString(env->isolate(), http_errno_name(err))); - - args.GetReturnValue().Set(e); - } else { - args.GetReturnValue().Set(nparsed_obj); - } + if (!ret.IsEmpty()) + args.GetReturnValue().Set(ret); } @@ -478,7 +460,150 @@ class Parser : public BaseObject { } - private: + static void Consume(const FunctionCallbackInfo& args) { + Parser* parser = Unwrap(args.Holder()); + Local stream_obj = args[0].As(); + StreamBase* stream = static_cast(stream_obj->Value()); + CHECK_NE(stream, nullptr); + + stream->Consume(); + + parser->prev_alloc_cb_ = stream->alloc_cb(); + parser->prev_read_cb_ = stream->read_cb(); + + stream->set_alloc_cb({ OnAllocImpl, parser }); + stream->set_read_cb({ OnReadImpl, parser }); + } + + + static void Unconsume(const FunctionCallbackInfo& args) { + Parser* parser = Unwrap(args.Holder()); + + // Already unconsumed + if (parser->prev_alloc_cb_.is_empty()) + return; + + CHECK(args[0]->IsExternal()); + Local stream_obj = args[0].As(); + StreamBase* stream = static_cast(stream_obj->Value()); + CHECK_NE(stream, nullptr); + + stream->set_alloc_cb(parser->prev_alloc_cb_); + stream->set_read_cb(parser->prev_read_cb_); + } + + + static void GetCurrentBuffer(const FunctionCallbackInfo& args) { + Parser* parser = Unwrap(args.Holder()); + + Local ret = Buffer::Copy( + parser->env(), + parser->current_buffer_data_, + parser->current_buffer_len_).ToLocalChecked(); + + args.GetReturnValue().Set(ret); + } + + protected: + static const size_t kAllocBufferSize = 64 * 1024; + + static void OnAllocImpl(size_t suggested_size, uv_buf_t* buf, void* ctx) { + Parser* parser = static_cast(ctx); + Environment* env = parser->env(); + + if (env->http_parser_buffer() == nullptr) + env->set_http_parser_buffer(new char[kAllocBufferSize]); + + buf->base = env->http_parser_buffer(); + buf->len = kAllocBufferSize; + } + + + static void OnReadImpl(ssize_t nread, + const uv_buf_t* buf, + uv_handle_type pending, + void* ctx) { + Parser* parser = static_cast(ctx); + HandleScope scope(parser->env()->isolate()); + + if (nread < 0) { + uv_buf_t tmp_buf; + tmp_buf.base = nullptr; + tmp_buf.len = 0; + parser->prev_read_cb_.fn(nread, + &tmp_buf, + pending, + parser->prev_read_cb_.ctx); + return; + } + + // Ignore, empty reads have special meaning in http parser + if (nread == 0) + return; + + parser->current_buffer_.Clear(); + Local ret = parser->Execute(buf->base, nread); + + // Exception + if (ret.IsEmpty()) + return; + + Local obj = parser->object(); + Local cb = obj->Get(kOnExecute); + + if (!cb->IsFunction()) + return; + + // Hooks for GetCurrentBuffer + parser->current_buffer_len_ = nread; + parser->current_buffer_data_ = buf->base; + + cb.As()->Call(obj, 1, &ret); + + parser->current_buffer_len_ = 0; + parser->current_buffer_data_ = nullptr; + + parser->env()->KickNextTick(); + } + + + Local Execute(char* data, size_t len) { + EscapableHandleScope scope(env()->isolate()); + + current_buffer_len_ = len; + current_buffer_data_ = data; + got_exception_ = false; + + size_t nparsed = + http_parser_execute(&parser_, &settings, data, len); + + Save(); + + // Unassign the 'buffer_' variable + current_buffer_.Clear(); + current_buffer_len_ = 0; + current_buffer_data_ = nullptr; + + // If there was an exception in one of the callbacks + if (got_exception_) + return scope.Escape(Local()); + + Local nparsed_obj = Integer::New(env()->isolate(), nparsed); + // If there was a parse error in one of the callbacks + // TODO(bnoordhuis) What if there is an error on EOF? + if (!parser_.upgrade && nparsed != len) { + enum http_errno err = HTTP_PARSER_ERRNO(&parser_); + + Local e = Exception::Error(env()->parse_error_string()); + Local obj = e->ToObject(env()->isolate()); + obj->Set(env()->bytes_parsed_string(), nparsed_obj); + obj->Set(env()->code_string(), + OneByteString(env()->isolate(), http_errno_name(err))); + + return scope.Escape(e); + } + return scope.Escape(nparsed_obj); + } Local CreateHeaders() { // num_values_ is either -1 or the entry # of the last header @@ -542,6 +667,8 @@ class Parser : public BaseObject { Local current_buffer_; size_t current_buffer_len_; char* current_buffer_data_; + StreamResource::Callback prev_alloc_cb_; + StreamResource::Callback prev_read_cb_; static const struct http_parser_settings settings; }; @@ -581,6 +708,8 @@ void InitHttpParser(Handle target, Integer::NewFromUnsigned(env->isolate(), kOnBody)); t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kOnMessageComplete"), Integer::NewFromUnsigned(env->isolate(), kOnMessageComplete)); + t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kOnExecute"), + Integer::NewFromUnsigned(env->isolate(), kOnExecute)); Local methods = Array::New(env->isolate()); #define V(num, name, string) \ @@ -595,6 +724,9 @@ void InitHttpParser(Handle target, env->SetProtoMethod(t, "reinitialize", Parser::Reinitialize); env->SetProtoMethod(t, "pause", Parser::Pause); env->SetProtoMethod(t, "resume", Parser::Pause); + env->SetProtoMethod(t, "consume", Parser::Consume); + env->SetProtoMethod(t, "unconsume", Parser::Unconsume); + env->SetProtoMethod(t, "getCurrentBuffer", Parser::GetCurrentBuffer); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "HTTPParser"), t->GetFunction()); diff --git a/test/parallel/test-http-server-unconsume.js b/test/parallel/test-http-server-unconsume.js new file mode 100644 index 00000000000..0d33263ad6f --- /dev/null +++ b/test/parallel/test-http-server-unconsume.js @@ -0,0 +1,30 @@ +'use strict'; +var common = require('../common'); +var assert = require('assert'); +var http = require('http'); +var net = require('net'); + +var received = ''; + +var server = http.createServer(function(req, res) { + res.writeHead(200); + res.end(); + + req.socket.on('data', function(data) { + received += data; + }); + + server.close(); +}).listen(common.PORT, function() { + var socket = net.connect(common.PORT, function() { + socket.write('PUT / HTTP/1.1\r\n\r\n'); + + socket.once('data', function() { + socket.end('hello world'); + }); + }); +}); + +process.on('exit', function() { + assert.equal(received, 'hello world'); +}); From 0cfd3be9c603e21bdde0c1ed56a8d7725c19de5e Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Fri, 7 Nov 2014 14:15:24 +0100 Subject: [PATCH 121/214] test: runner support for flaky tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding --flaky-tests option, to allow regarding flaky tests failures as non-fatal. Currently only observed by the TapProgressIndicator, which will add a # TODO directive to tests classified as flaky. According to the TAP specification, the test harness is supposed to treat failures that have a # TODO directive as non-fatal. Ported from https://github.com/joyent/node/commit/df3a2b2cf21274fe7afc19d14ec0259b964e13f7 PR-URL: https://github.com/nodejs/node/pull/2424 Reviewed-By: Ben Noordhuis Reviewed-By: João Reis Reviewed-By: Sakthipriyan Vairamani --- tools/test.py | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/tools/test.py b/tools/test.py index 43d349d49a8..747bd499160 100755 --- a/tools/test.py +++ b/tools/test.py @@ -61,8 +61,9 @@ VERBOSE = False class ProgressIndicator(object): - def __init__(self, cases): + def __init__(self, cases, flaky_tests_mode): self.cases = cases + self.flaky_tests_mode = flaky_tests_mode self.parallel_queue = Queue(len(cases)) self.sequential_queue = Queue(len(cases)) for case in cases: @@ -251,7 +252,10 @@ class TapProgressIndicator(SimpleProgressIndicator): self._done += 1 command = basename(output.command[-1]) if output.UnexpectedOutput(): - logger.info('not ok %i - %s' % (self._done, command)) + status_line = 'not ok %i - %s' % (self._done, command) + if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE: + status_line = status_line + ' # TODO : Fix flaky test' + logger.info(status_line) for l in output.output.stderr.splitlines(): logger.info('#' + l) for l in output.output.stdout.splitlines(): @@ -262,7 +266,10 @@ class TapProgressIndicator(SimpleProgressIndicator): logger.info( 'ok %i - %s # skip %s' % (self._done, command, skip.group(1))) else: - logger.info('ok %i - %s' % (self._done, command)) + status_line = 'ok %i - %s' % (self._done, command) + if FLAKY in output.test.outcomes: + status_line = status_line + ' # TODO : Fix flaky test' + logger.info(status_line) duration = output.test.duration @@ -280,8 +287,8 @@ class TapProgressIndicator(SimpleProgressIndicator): class CompactProgressIndicator(ProgressIndicator): - def __init__(self, cases, templates): - super(CompactProgressIndicator, self).__init__(cases) + def __init__(self, cases, flaky_tests_mode, templates): + super(CompactProgressIndicator, self).__init__(cases, flaky_tests_mode) self.templates = templates self.last_status_length = 0 self.start_time = time.time() @@ -336,13 +343,13 @@ class CompactProgressIndicator(ProgressIndicator): class ColorProgressIndicator(CompactProgressIndicator): - def __init__(self, cases): + def __init__(self, cases, flaky_tests_mode): templates = { 'status_line': "[%(mins)02i:%(secs)02i|\033[34m%%%(remaining) 4d\033[0m|\033[32m+%(passed) 4d\033[0m|\033[31m-%(failed) 4d\033[0m]: %(test)s", 'stdout': "\033[1m%s\033[0m", 'stderr': "\033[31m%s\033[0m", } - super(ColorProgressIndicator, self).__init__(cases, templates) + super(ColorProgressIndicator, self).__init__(cases, flaky_tests_mode, templates) def ClearLine(self, last_line_length): print "\033[1K\r", @@ -350,7 +357,7 @@ class ColorProgressIndicator(CompactProgressIndicator): class MonochromeProgressIndicator(CompactProgressIndicator): - def __init__(self, cases): + def __init__(self, cases, flaky_tests_mode): templates = { 'status_line': "[%(mins)02i:%(secs)02i|%%%(remaining) 4d|+%(passed) 4d|-%(failed) 4d]: %(test)s", 'stdout': '%s', @@ -358,7 +365,7 @@ class MonochromeProgressIndicator(CompactProgressIndicator): 'clear': lambda last_line_length: ("\r" + (" " * last_line_length) + "\r"), 'max_length': 78 } - super(MonochromeProgressIndicator, self).__init__(cases, templates) + super(MonochromeProgressIndicator, self).__init__(cases, flaky_tests_mode, templates) def ClearLine(self, last_line_length): print ("\r" + (" " * last_line_length) + "\r"), @@ -780,8 +787,8 @@ class Context(object): def GetTimeout(self, mode): return self.timeout * TIMEOUT_SCALEFACTOR[ARCH_GUESS or 'ia32'][mode] -def RunTestCases(cases_to_run, progress, tasks): - progress = PROGRESS_INDICATORS[progress](cases_to_run) +def RunTestCases(cases_to_run, progress, tasks, flaky_tests_mode): + progress = PROGRESS_INDICATORS[progress](cases_to_run, flaky_tests_mode) return progress.Run(tasks) @@ -805,7 +812,8 @@ OKAY = 'okay' TIMEOUT = 'timeout' CRASH = 'crash' SLOW = 'slow' - +FLAKY = 'flaky' +DONTCARE = 'dontcare' class Expression(object): pass @@ -1253,6 +1261,9 @@ def BuildOptions(): default=False, action="store_true") result.add_option("--cat", help="Print the source of the tests", default=False, action="store_true") + result.add_option("--flaky-tests", + help="Regard tests marked as flaky (run|skip|dontcare)", + default="run") result.add_option("--warn-unused", help="Report unused rules", default=False, action="store_true") result.add_option("-j", help="The number of parallel tasks to run", @@ -1303,6 +1314,9 @@ def ProcessOptions(options): return False if options.J: options.j = multiprocessing.cpu_count() + if options.flaky_tests not in ["run", "skip", "dontcare"]: + print "Unknown flaky-tests mode %s" % options.flaky_tests + return False return True @@ -1505,7 +1519,9 @@ def Main(): result = None def DoSkip(case): - return SKIP in case.outcomes or SLOW in case.outcomes + if SKIP in case.outcomes or SLOW in case.outcomes: + return True + return FLAKY in case.outcomes and options.flaky_tests == SKIP cases_to_run = [ c for c in all_cases if not DoSkip(c) ] if options.run is not None: # Must ensure the list of tests is sorted before selecting, to avoid @@ -1522,7 +1538,7 @@ def Main(): else: try: start = time.time() - if RunTestCases(cases_to_run, options.progress, options.j): + if RunTestCases(cases_to_run, options.progress, options.j, options.flaky_tests): result = 0 else: result = 1 From 8f8ab6fa57461df3b3d8a914ddd9e39bc6ab9ad9 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Tue, 7 Jul 2015 22:48:26 +0200 Subject: [PATCH 122/214] test: runner should return 0 on flaky tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the test runner return a 0 exit code when only flaky tests fail and --flaky-tests=dontcare is specified. Ported from https://github.com/joyent/node/commit/a9b642cf5b539e1b86698465d3d0b941d84c5352 PR-URL: https://github.com/nodejs/node/pull/2424 Reviewed-By: Ben Noordhuis Reviewed-By: João Reis Reviewed-By: Sakthipriyan Vairamani --- tools/test.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/test.py b/tools/test.py index 747bd499160..27a06761a1c 100755 --- a/tools/test.py +++ b/tools/test.py @@ -75,7 +75,9 @@ class ProgressIndicator(object): self.remaining = len(cases) self.total = len(cases) self.failed = [ ] + self.flaky_failed = [ ] self.crashed = 0 + self.flaky_crashed = 0 self.lock = threading.Lock() self.shutdown_event = threading.Event() @@ -143,9 +145,14 @@ class ProgressIndicator(object): return self.lock.acquire() if output.UnexpectedOutput(): - self.failed.append(output) - if output.HasCrashed(): - self.crashed += 1 + if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE: + self.flaky_failed.append(output) + if output.HasCrashed(): + self.flaky_crashed += 1 + else: + self.failed.append(output) + if output.HasCrashed(): + self.crashed += 1 else: self.succeeded += 1 self.remaining -= 1 From 08b83c8b45ed29e26ae420ebd38daf2f2de845c0 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Tue, 18 Aug 2015 14:04:14 +0200 Subject: [PATCH 123/214] test: add test configuration templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Template configuration files for marking tests as flaky. PR-URL: https://github.com/nodejs/node/pull/2424 Reviewed-By: Ben Noordhuis Reviewed-By: João Reis Reviewed-By: Sakthipriyan Vairamani --- test/message/message.status | 18 ++++++++++++++++++ test/parallel/parallel.status | 18 ++++++++++++++++++ test/sequential/sequential.status | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 test/message/message.status create mode 100644 test/parallel/parallel.status create mode 100644 test/sequential/sequential.status diff --git a/test/message/message.status b/test/message/message.status new file mode 100644 index 00000000000..1a4a0e3adc2 --- /dev/null +++ b/test/message/message.status @@ -0,0 +1,18 @@ +prefix message + +# To mark a test as flaky, list the test name in the appropriate section +# below, without ".js", followed by ": PASS,FLAKY". Example: +# sample-test : PASS,FLAKY + +[true] # This section applies to all platforms + +[$system==win32] + +[$system==linux] + +[$system==macos] + +[$system==solaris] # Also applies to SmartOS + +[$system==freebsd] + diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status new file mode 100644 index 00000000000..e19754834ef --- /dev/null +++ b/test/parallel/parallel.status @@ -0,0 +1,18 @@ +prefix parallel + +# To mark a test as flaky, list the test name in the appropriate section +# below, without ".js", followed by ": PASS,FLAKY". Example: +# sample-test : PASS,FLAKY + +[true] # This section applies to all platforms + +[$system==win32] + +[$system==linux] + +[$system==macos] + +[$system==solaris] # Also applies to SmartOS + +[$system==freebsd] + diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status new file mode 100644 index 00000000000..3ff77992f15 --- /dev/null +++ b/test/sequential/sequential.status @@ -0,0 +1,18 @@ +prefix sequential + +# To mark a test as flaky, list the test name in the appropriate section +# below, without ".js", followed by ": PASS,FLAKY". Example: +# sample-test : PASS,FLAKY + +[true] # This section applies to all platforms + +[$system==win32] + +[$system==linux] + +[$system==macos] + +[$system==solaris] # Also applies to SmartOS + +[$system==freebsd] + From 09987c7a1cc53f63d8ea936d4765e887e03747ba Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Wed, 26 Aug 2015 12:38:48 +0200 Subject: [PATCH 124/214] test: support flaky tests in test-ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding support for specifying flaky test mode to the test runner: - via an environment variable FLAKY_TESTS for Makefile - via an argument ignore-flaky for vcbuild.bat Ported from https://github.com/joyent/node/commit/2d2494cf140c38327218a087593ff2177a9d0ec9 PR-URL: https://github.com/nodejs/node/pull/2424 Reviewed-By: Ben Noordhuis Reviewed-By: João Reis Reviewed-By: Sakthipriyan Vairamani --- Makefile | 3 ++- vcbuild.bat | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1101977916d..9a0578d5260 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ PYTHON ?= python DESTDIR ?= SIGN ?= PREFIX ?= /usr/local +FLAKY_TESTS ?= run STAGINGSERVER ?= iojs-www OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]') @@ -140,7 +141,7 @@ test-all-valgrind: test-build $(PYTHON) tools/test.py --mode=debug,release --valgrind test-ci: | build-addons - $(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release \ + $(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \ addons message parallel sequential test-release: test-build diff --git a/vcbuild.bat b/vcbuild.bat index 088473e1e46..15609079dbe 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -70,6 +70,7 @@ if /i "%1"=="small-icu" set i18n_arg=%1&goto arg-ok if /i "%1"=="full-icu" set i18n_arg=%1&goto arg-ok if /i "%1"=="intl-none" set i18n_arg=%1&goto arg-ok if /i "%1"=="download-all" set download_arg="--download=all"&goto arg-ok +if /i "%1"=="ignore-flaky" set test_args=%test_args% --flaky-tests=dontcare&goto arg-ok echo Warning: ignoring invalid command line option `%1`. From 94e88498babfaa6c359263b1234434db5d782922 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Wed, 26 Aug 2015 12:41:16 +0200 Subject: [PATCH 125/214] test: pass args to test-ci via env variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/2424 Reviewed-By: Ben Noordhuis Reviewed-By: João Reis Reviewed-By: Sakthipriyan Vairamani --- Makefile | 3 ++- vcbuild.bat | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9a0578d5260..23857eaeb73 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ DESTDIR ?= SIGN ?= PREFIX ?= /usr/local FLAKY_TESTS ?= run +TEST_CI_ARGS ?= STAGINGSERVER ?= iojs-www OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]') @@ -142,7 +143,7 @@ test-all-valgrind: test-build test-ci: | build-addons $(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \ - addons message parallel sequential + $(TEST_CI_ARGS) addons message parallel sequential test-release: test-build $(PYTHON) tools/test.py --mode=release diff --git a/vcbuild.bat b/vcbuild.bat index 15609079dbe..7261b1cd417 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -54,7 +54,7 @@ if /i "%1"=="noetw" set noetw=1&goto arg-ok if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok if /i "%1"=="licensertf" set licensertf=1&goto arg-ok if /i "%1"=="test" set test_args=%test_args% sequential parallel message -J&set jslint=1&goto arg-ok -if /i "%1"=="test-ci" set test_args=%test_args% -p tap --logfile test.tap message sequential parallel&goto arg-ok +if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap message sequential parallel&goto arg-ok if /i "%1"=="test-simple" set test_args=%test_args% sequential parallel -J&goto arg-ok if /i "%1"=="test-message" set test_args=%test_args% message&goto arg-ok if /i "%1"=="test-gc" set test_args=%test_args% gc&set buildnodeweak=1&goto arg-ok From c48b95e847d6e37bb416efcd14d24ed52c40767e Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Wed, 26 Aug 2015 12:42:45 +0200 Subject: [PATCH 126/214] test: initial list of flaky tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This poplulates the lists of flaky tests with tests that failed recently in Jenkins. PR-URL: https://github.com/nodejs/node/pull/2424 Reviewed-By: Ben Noordhuis Reviewed-By: João Reis Reviewed-By: Sakthipriyan Vairamani --- test/parallel/parallel.status | 11 ++++++++++- test/sequential/sequential.status | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index e19754834ef..86c271956d9 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -7,12 +7,21 @@ prefix parallel [true] # This section applies to all platforms [$system==win32] +test-tls-ticket-cluster : PASS,FLAKY [$system==linux] +test-cluster-worker-forced-exit : PASS,FLAKY +test-http-client-timeout-event : PASS,FLAKY +test-process-argv-0 : PASS,FLAKY +test-tick-processor : PASS,FLAKY +test-tls-no-sslv3 : PASS,FLAKY +test-child-process-buffering : PASS,FLAKY +test-child-process-exit-code : PASS,FLAKY [$system==macos] [$system==solaris] # Also applies to SmartOS +test-debug-signal-cluster : PASS,FLAKY [$system==freebsd] - +test-net-socket-local-address : PASS,FLAKY diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index 3ff77992f15..2d733c87783 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -5,6 +5,7 @@ prefix sequential # sample-test : PASS,FLAKY [true] # This section applies to all platforms +test-child-process-fork-getconnections : PASS,FLAKY [$system==win32] From 5e65181ea4b6fee3efc0cd642fed6d36f05370f7 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Sun, 19 Jul 2015 19:20:21 +0000 Subject: [PATCH 127/214] test: handling failure cases properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refer: https://github.com/nodejs/io.js/issues/1543 When this test fails, it leaves dead processes in the system. This patch makes sure that the child processes exit first, in case of errors. PR-URL: https://github.com/nodejs/node/pull/2206 Reviewed-By: Johan Bergström Reviewed-By: Ben Noordhuis --- test/parallel/test-cluster-eaccess.js | 53 ++++++++++++++++----------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/test/parallel/test-cluster-eaccess.js b/test/parallel/test-cluster-eaccess.js index ad4de97e389..b8c05a2c8a0 100644 --- a/test/parallel/test-cluster-eaccess.js +++ b/test/parallel/test-cluster-eaccess.js @@ -1,41 +1,51 @@ 'use strict'; -// test that errors propagated from cluster children are properly -// received in their master creates an EADDRINUSE condition by also -// forking a child process to listen on a socket - -var common = require('../common'); -var assert = require('assert'); -var cluster = require('cluster'); -var fork = require('child_process').fork; -var fs = require('fs'); -var net = require('net'); +// Test that errors propagated from cluster workers are properly +// received in their master. Creates an EADDRINUSE condition by forking +// a process in child cluster and propagates the error to the master. +const common = require('../common'); +const assert = require('assert'); +const cluster = require('cluster'); +const fork = require('child_process').fork; +const fs = require('fs'); +const net = require('net'); if (cluster.isMaster) { - var worker = cluster.fork(); - var gotError = 0; - worker.on('message', function(err) { - gotError++; + const worker = cluster.fork(); + + // makes sure master is able to fork the worker + cluster.on('fork', common.mustCall(function() {})); + + // makes sure the worker is ready + worker.on('online', common.mustCall(function() {})); + + worker.on('message', common.mustCall(function(err) { + // disconnect first, so that we will not leave zombies + worker.disconnect(); + console.log(err); assert.strictEqual('EADDRINUSE', err.code); - worker.disconnect(); - }); + })); + process.on('exit', function() { console.log('master exited'); try { fs.unlinkSync(common.PIPE); } catch (e) { } - assert.equal(gotError, 1); }); + } else { var cp = fork(common.fixturesDir + '/listen-on-socket-and-exit.js', { stdio: 'inherit' }); // message from the child indicates it's ready and listening - cp.on('message', function() { - var server = net.createServer().listen(common.PIPE, function() { - console.log('parent listening, should not be!'); + cp.on('message', common.mustCall(function() { + const server = net.createServer().listen(common.PIPE, function() { + // message child process so that it can exit + cp.send('end'); + // inform master about the unexpected situation + process.send('PIPE should have been in use.'); }); server.on('error', function(err) { @@ -45,5 +55,6 @@ if (cluster.isMaster) { // propagate error to parent process.send(err); }); - }); + + })); } From e955f9a1b0c4e155b78b8a442bb4dc4818cc9ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 27 Aug 2015 12:24:45 +0300 Subject: [PATCH 128/214] crypto: Use OPENSSL_cleanse to shred the data. memset() is not useful here, it's efficiently a noop. PR-URL: https://github.com/nodejs/node/pull/2575 Reviewed-By: Fedor Indutny --- src/node_crypto.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index c647d327edc..45d8cf3c07e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4721,8 +4721,8 @@ void EIO_PBKDF2(PBKDF2Request* req) { req->digest(), req->keylen(), reinterpret_cast(req->key()))); - memset(req->pass(), 0, req->passlen()); - memset(req->salt(), 0, req->saltlen()); + OPENSSL_cleanse(req->pass(), req->passlen()); + OPENSSL_cleanse(req->salt(), req->saltlen()); } @@ -4736,7 +4736,7 @@ void EIO_PBKDF2After(PBKDF2Request* req, Local argv[2]) { if (req->error()) { argv[0] = Undefined(req->env()->isolate()); argv[1] = Encode(req->env()->isolate(), req->key(), req->keylen(), BUFFER); - memset(req->key(), 0, req->keylen()); + OPENSSL_cleanse(req->key(), req->keylen()); } else { argv[0] = Exception::Error(req->env()->pbkdf2_error_string()); argv[1] = Undefined(req->env()->isolate()); From 89363021216de3278f0a1a1b8f9f527ddbbe3e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 27 Aug 2015 11:52:03 +0300 Subject: [PATCH 129/214] doc: minor clarification in buffer.markdown Replaced "contents is" with "contents are". Added a note that initial Buffer contents could contain sensitive data. PR-URL: https://github.com/nodejs/node/pull/2574 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Trevor Norris --- doc/api/buffer.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index 94f3e3d8e16..1b0c917f31f 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -68,8 +68,8 @@ Allocates a new buffer of `size` bytes. `size` must be less than otherwise a `RangeError` is thrown. Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So -the contents of a newly created `Buffer` is unknown. Use `buf.fill(0)`to -initialize a buffer to zeroes. +the contents of a newly created `Buffer` are unknown and could contain +sensitive data. Use `buf.fill(0)` to initialize a buffer to zeroes. ### new Buffer(array) From c56aa829f06c2d126425be21eda22428fe27e98b Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Fri, 28 Aug 2015 01:38:10 +0530 Subject: [PATCH 130/214] test: use tmpDir instead of fixturesDir This test was using fixturesDir to create temp files to test. This patch replaces that with tmpDir and uses `assert` module to test. Also, this test has been moved to `parallel`, from `sequential` mode. PR-URL: https://github.com/nodejs/node/pull/2583 Reviewed-By: Ben Noordhuis Reviewed-By: Rich Trott --- test/parallel/test-regress-GH-3739.js | 31 +++++++++++++++++ test/sequential/test-regress-GH-3739.js | 46 ------------------------- 2 files changed, 31 insertions(+), 46 deletions(-) create mode 100644 test/parallel/test-regress-GH-3739.js delete mode 100644 test/sequential/test-regress-GH-3739.js diff --git a/test/parallel/test-regress-GH-3739.js b/test/parallel/test-regress-GH-3739.js new file mode 100644 index 00000000000..aef54c3ea6c --- /dev/null +++ b/test/parallel/test-regress-GH-3739.js @@ -0,0 +1,31 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); + +var dir = path.resolve(common.tmpDir); + +// Make sure that the tmp directory is clean +common.refreshTmpDir(); + +// Make a long path. +for (var i = 0; i < 50; i++) { + dir = dir + '/1234567890'; + try { + fs.mkdirSync(dir, '0777'); + } catch (e) { + if (e.code !== 'EEXIST') { + throw e; + } + } +} + +// Test if file exists synchronously +assert(common.fileExists(dir), 'Directory is not accessible'); + +// Test if file exists asynchronously +fs.access(dir, function(err) { + assert(!err, 'Directory is not accessible'); +}); diff --git a/test/sequential/test-regress-GH-3739.js b/test/sequential/test-regress-GH-3739.js deleted file mode 100644 index cc16b22dc44..00000000000 --- a/test/sequential/test-regress-GH-3739.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; -var common = require('../common'), - assert = require('assert'), - fs = require('fs'), - path = require('path'); - -var dir = path.resolve(common.fixturesDir), - dirs = []; - -// Make a long path. -for (var i = 0; i < 50; i++) { - dir = dir + '/123456790'; - try { - fs.mkdirSync(dir, '0777'); - } catch (e) { - if (e.code == 'EEXIST') { - // Ignore; - } else { - cleanup(); - throw e; - } - } - dirs.push(dir); -} - -// Test existsSync -var r = common.fileExists(dir); -if (r !== true) { - cleanup(); - throw new Error('fs.accessSync returned false'); -} - -// Text exists -fs.access(dir, function(err) { - cleanup(); - if (err) { - throw new Error('fs.access reported false'); - } -}); - -// Remove all created directories -function cleanup() { - for (var i = dirs.length - 1; i >= 0; i--) { - fs.rmdirSync(dirs[i]); - } -} From 34ef53364fc7242a4ef099c65f0efc4f1fce52e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 27 Aug 2015 09:10:22 +0200 Subject: [PATCH 131/214] deps: update V8 to 4.4.63.30 PR-URL: https://github.com/nodejs/node/pull/2482 Reviewed-By: Ben Noordhuis --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/heap/gc-idle-time-handler.cc | 20 +++++++++++-- deps/v8/src/heap/gc-idle-time-handler.h | 6 +++- deps/v8/src/heap/heap.cc | 6 ++++ deps/v8/src/hydrogen.cc | 21 +++++++------- deps/v8/src/objects.cc | 28 +++++++++++++------ deps/v8/test/cctest/test-api.cc | 3 ++ .../mjsunit/regress/regress-crbug-513602.js | 26 +++++++++++++++++ 8 files changed, 88 insertions(+), 24 deletions(-) create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-513602.js diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index c52267e024c..180969f1161 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 4 #define V8_MINOR_VERSION 4 #define V8_BUILD_NUMBER 63 -#define V8_PATCH_LEVEL 26 +#define V8_PATCH_LEVEL 30 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/heap/gc-idle-time-handler.cc b/deps/v8/src/heap/gc-idle-time-handler.cc index e20a1e45cb0..5baf024efef 100644 --- a/deps/v8/src/heap/gc-idle-time-handler.cc +++ b/deps/v8/src/heap/gc-idle-time-handler.cc @@ -113,6 +113,10 @@ bool GCIdleTimeHandler::ShouldDoScavenge( size_t idle_time_in_ms, size_t new_space_size, size_t used_new_space_size, size_t scavenge_speed_in_bytes_per_ms, size_t new_space_allocation_throughput_in_bytes_per_ms) { + if (idle_time_in_ms >= kMinBackgroundIdleTime) { + // It is better to do full GC for the background tab. + return false; + } size_t new_space_allocation_limit = kMaxScheduledIdleTime * scavenge_speed_in_bytes_per_ms; @@ -185,7 +189,10 @@ bool GCIdleTimeHandler::ShouldDoOverApproximateWeakClosure( } -GCIdleTimeAction GCIdleTimeHandler::NothingOrDone() { +GCIdleTimeAction GCIdleTimeHandler::NothingOrDone(double idle_time_in_ms) { + if (idle_time_in_ms >= kMinBackgroundIdleTime) { + return GCIdleTimeAction::Nothing(); + } if (idle_times_which_made_no_progress_per_mode_ >= kMaxNoProgressIdleTimesPerMode) { return GCIdleTimeAction::Done(); @@ -235,6 +242,13 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(double idle_time_in_ms, HeapState heap_state) { Mode next_mode = NextMode(heap_state); + // Immediately go from reduce latency to reduce memory mode in + // background tab. + if (next_mode == kReduceLatency && + idle_time_in_ms >= kMinBackgroundIdleTime) { + next_mode = kReduceMemory; + } + if (next_mode != mode_) { mode_ = next_mode; ResetCounters(); @@ -298,13 +312,13 @@ GCIdleTimeAction GCIdleTimeHandler::Action(double idle_time_in_ms, if (heap_state.sweeping_completed) { return GCIdleTimeAction::FinalizeSweeping(); } else { - return NothingOrDone(); + return NothingOrDone(idle_time_in_ms); } } if (heap_state.incremental_marking_stopped && !heap_state.can_start_incremental_marking && !reduce_memory) { - return NothingOrDone(); + return NothingOrDone(idle_time_in_ms); } size_t step_size = EstimateMarkingStepSize( diff --git a/deps/v8/src/heap/gc-idle-time-handler.h b/deps/v8/src/heap/gc-idle-time-handler.h index 1ffa3efdfcf..1ab506d8174 100644 --- a/deps/v8/src/heap/gc-idle-time-handler.h +++ b/deps/v8/src/heap/gc-idle-time-handler.h @@ -231,6 +231,10 @@ class GCIdleTimeHandler { size_t scavenger_speed_in_bytes_per_ms, size_t new_space_allocation_throughput_in_bytes_per_ms); + bool ShouldGrowHeapSlowly() { + return mode() == kDone; + } + enum Mode { kReduceLatency, kReduceMemory, kDone }; Mode mode() { return mode_; } @@ -244,7 +248,7 @@ class GCIdleTimeHandler { Mode NextMode(const HeapState& heap_state); GCIdleTimeAction Action(double idle_time_in_ms, const HeapState& heap_state, bool reduce_memory); - GCIdleTimeAction NothingOrDone(); + GCIdleTimeAction NothingOrDone(double idle_time_in_ms); int idle_mark_compacts_; int mark_compacts_; diff --git a/deps/v8/src/heap/heap.cc b/deps/v8/src/heap/heap.cc index 6bfa4ae4662..f971359198e 100644 --- a/deps/v8/src/heap/heap.cc +++ b/deps/v8/src/heap/heap.cc @@ -5407,6 +5407,12 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size, factor = min_factor; } + const double kConservativeHeapGrowingFactor = 1.3; + if (gc_idle_time_handler_.ShouldGrowHeapSlowly()) { + factor = Min(factor, kConservativeHeapGrowingFactor); + } + + idle_factor = Min(factor, idle_max_factor); old_generation_allocation_limit_ = diff --git a/deps/v8/src/hydrogen.cc b/deps/v8/src/hydrogen.cc index 6a86c736ee5..455af79bb69 100644 --- a/deps/v8/src/hydrogen.cc +++ b/deps/v8/src/hydrogen.cc @@ -11300,16 +11300,20 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral( HValue* object_size_constant = Add(initial_map->instance_size()); PretenureFlag pretenure_flag = NOT_TENURED; - Handle current_site(*site_context->current(), isolate()); + Handle top_site(*site_context->top(), isolate()); if (FLAG_allocation_site_pretenuring) { - pretenure_flag = current_site->GetPretenureMode(); - top_info()->dependencies()->AssumeTenuringDecision(current_site); + pretenure_flag = top_site->GetPretenureMode(); } + Handle current_site(*site_context->current(), isolate()); + if (*top_site == *current_site) { + // We install a dependency for pretenuring only on the outermost literal. + top_info()->dependencies()->AssumeTenuringDecision(top_site); + } top_info()->dependencies()->AssumeTransitionStable(current_site); HInstruction* object = Add( - object_size_constant, type, pretenure_flag, instance_type, current_site); + object_size_constant, type, pretenure_flag, instance_type, top_site); // If allocation folding reaches Page::kMaxRegularHeapObjectSize the // elements array may not get folded into the object. Hence, we set the @@ -11349,9 +11353,8 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral( HValue* object_elements_size = Add(elements_size); InstanceType instance_type = boilerplate_object->HasFastDoubleElements() ? FIXED_DOUBLE_ARRAY_TYPE : FIXED_ARRAY_TYPE; - object_elements = - Add(object_elements_size, HType::HeapObject(), - pretenure_flag, instance_type, current_site); + object_elements = Add(object_elements_size, HType::HeapObject(), + pretenure_flag, instance_type, top_site); BuildEmitElements(boilerplate_object, elements, object_elements, site_context); Add(object, HObjectAccess::ForElementsPointer(), @@ -11452,10 +11455,6 @@ void HOptimizedGraphBuilder::BuildEmitInObjectProperties( if (representation.IsDouble()) { // Allocate a HeapNumber box and store the value into it. HValue* heap_number_constant = Add(HeapNumber::kSize); - // This heap number alloc does not have a corresponding - // AllocationSite. That is okay because - // 1) it's a child object of another object with a valid allocation site - // 2) we can just use the mode of the parent object for pretenuring HInstruction* double_box = Add(heap_number_constant, HType::HeapObject(), pretenure_flag, MUTABLE_HEAP_NUMBER_TYPE); diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index 82a27f4d215..f0dcaab937d 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/src/objects.cc @@ -4765,20 +4765,32 @@ void JSObject::MigrateSlowToFast(Handle object, } } - int inobject_props = object->map()->inobject_properties(); + Handle old_map(object->map(), isolate); + + int inobject_props = old_map->inobject_properties(); // Allocate new map. - Handle new_map = Map::CopyDropDescriptors(handle(object->map())); + Handle new_map = Map::CopyDropDescriptors(old_map); new_map->set_dictionary_map(false); - if (object->map()->is_prototype_map()) { + if (old_map->is_prototype_map() && FLAG_track_prototype_users) { DCHECK(new_map->is_prototype_map()); - new_map->set_prototype_info(object->map()->prototype_info()); - object->map()->set_prototype_info(Smi::FromInt(0)); + + Object* maybe_old_prototype = old_map->prototype(); + if (maybe_old_prototype->IsJSObject()) { + Handle old_prototype(JSObject::cast(maybe_old_prototype)); + bool was_registered = + JSObject::UnregisterPrototypeUser(old_prototype, old_map); + if (was_registered) { + JSObject::LazyRegisterPrototypeUser(new_map, isolate); + } + } + new_map->set_prototype_info(old_map->prototype_info()); + old_map->set_prototype_info(Smi::FromInt(0)); if (FLAG_trace_prototype_users) { PrintF("Moving prototype_info %p from map %p to map %p.\n", reinterpret_cast(new_map->prototype_info()), - reinterpret_cast(object->map()), + reinterpret_cast(*old_map), reinterpret_cast(*new_map)); } } @@ -4786,8 +4798,8 @@ void JSObject::MigrateSlowToFast(Handle object, #if TRACE_MAPS if (FLAG_trace_maps) { PrintF("[TraceMaps: SlowToFast from= %p to= %p reason= %s ]\n", - reinterpret_cast(object->map()), - reinterpret_cast(*new_map), reason); + reinterpret_cast(*old_map), reinterpret_cast(*new_map), + reason); } #endif diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc index 35e27c3118f..145d9bc64d9 100644 --- a/deps/v8/test/cctest/test-api.cc +++ b/deps/v8/test/cctest/test-api.cc @@ -15010,6 +15010,9 @@ TEST(TestIdleNotification) { (v8::base::TimeTicks::HighResolutionNow().ToInternalValue() / static_cast(v8::base::Time::kMicrosecondsPerSecond)) + IdlePauseInSeconds); + if (CcTest::heap()->mark_compact_collector()->sweeping_in_progress()) { + CcTest::heap()->mark_compact_collector()->EnsureSweepingCompleted(); + } } intptr_t final_size = CcTest::heap()->SizeOfObjects(); CHECK(finished); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-513602.js b/deps/v8/test/mjsunit/regress/regress-crbug-513602.js new file mode 100644 index 00000000000..ae0441cbc70 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-513602.js @@ -0,0 +1,26 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +function Parent() {} + +function Child() {} +Child.prototype = new Parent(); +var child = new Child(); + +function crash() { + return child.__proto__; +} + +crash(); +crash(); + +// Trigger a fast->slow->fast dance of Parent.prototype's map... +Parent.prototype.__defineSetter__("foo", function() { print("A"); }); +Parent.prototype.__defineSetter__("foo", function() { print("B"); }); +// ...and collect more type feedback. +crash(); + +// Now modify the prototype chain. The right cell fails to get invalidated. +delete Object.prototype.__proto__; +crash(); From 31823e37c7d2e4cdd5365490c5f3787b175c69b5 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 25 Feb 2015 16:40:40 +0100 Subject: [PATCH 132/214] src: DRY getsockname/getpeername code Extract the common logic into a template function. No functional changes, just code cleanup. PR-URL: https://github.com/nodejs/node/pull/956 Reviewed-By: Sam Roberts Reviewed-By: Trevor Norris --- src/node_internals.h | 13 ++++++++++++ src/tcp_wrap.cc | 50 ++++---------------------------------------- src/tcp_wrap.h | 8 +++++-- src/udp_wrap.cc | 26 ++--------------------- src/udp_wrap.h | 6 ++++++ 5 files changed, 31 insertions(+), 72 deletions(-) diff --git a/src/node_internals.h b/src/node_internals.h index ffb5ec7ad96..aa198666b62 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -79,6 +79,19 @@ v8::Local AddressToJS( const sockaddr* addr, v8::Local info = v8::Handle()); +template +void GetSockOrPeerName(const v8::FunctionCallbackInfo& args) { + T* const wrap = Unwrap(args.Holder()); + CHECK(args[0]->IsObject()); + sockaddr_storage storage; + int addrlen = sizeof(storage); + sockaddr* const addr = reinterpret_cast(&storage); + const int err = F(&wrap->handle_, addr, &addrlen); + if (err == 0) + AddressToJS(wrap->env(), addr, args[0].As()); + args.GetReturnValue().Set(err); +} + #ifdef _WIN32 // emulate snprintf() on windows, _snprintf() doesn't zero-terminate the buffer // on overflow... diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 6980f8b28ce..d9a35886cbb 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -98,8 +98,10 @@ void TCPWrap::Initialize(Handle target, env->SetProtoMethod(t, "connect", Connect); env->SetProtoMethod(t, "bind6", Bind6); env->SetProtoMethod(t, "connect6", Connect6); - env->SetProtoMethod(t, "getsockname", GetSockName); - env->SetProtoMethod(t, "getpeername", GetPeerName); + env->SetProtoMethod(t, "getsockname", + GetSockOrPeerName); + env->SetProtoMethod(t, "getpeername", + GetSockOrPeerName); env->SetProtoMethod(t, "setNoDelay", SetNoDelay); env->SetProtoMethod(t, "setKeepAlive", SetKeepAlive); @@ -162,50 +164,6 @@ TCPWrap::~TCPWrap() { } -void TCPWrap::GetSockName(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - struct sockaddr_storage address; - - TCPWrap* wrap = Unwrap(args.Holder()); - - CHECK(args[0]->IsObject()); - Local out = args[0].As(); - - int addrlen = sizeof(address); - int err = uv_tcp_getsockname(&wrap->handle_, - reinterpret_cast(&address), - &addrlen); - if (err == 0) { - const sockaddr* addr = reinterpret_cast(&address); - AddressToJS(env, addr, out); - } - - args.GetReturnValue().Set(err); -} - - -void TCPWrap::GetPeerName(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - struct sockaddr_storage address; - - TCPWrap* wrap = Unwrap(args.Holder()); - - CHECK(args[0]->IsObject()); - Local out = args[0].As(); - - int addrlen = sizeof(address); - int err = uv_tcp_getpeername(&wrap->handle_, - reinterpret_cast(&address), - &addrlen); - if (err == 0) { - const sockaddr* addr = reinterpret_cast(&address); - AddressToJS(env, addr, out); - } - - args.GetReturnValue().Set(err); -} - - void TCPWrap::SetNoDelay(const FunctionCallbackInfo& args) { TCPWrap* wrap = Unwrap(args.Holder()); int enable = static_cast(args[0]->BooleanValue()); diff --git a/src/tcp_wrap.h b/src/tcp_wrap.h index ee1e9817b23..79404a7e421 100644 --- a/src/tcp_wrap.h +++ b/src/tcp_wrap.h @@ -19,12 +19,16 @@ class TCPWrap : public StreamWrap { size_t self_size() const override { return sizeof(*this); } private: + typedef uv_tcp_t HandleType; + + template + friend void GetSockOrPeerName(const v8::FunctionCallbackInfo&); + TCPWrap(Environment* env, v8::Handle object, AsyncWrap* parent); ~TCPWrap(); static void New(const v8::FunctionCallbackInfo& args); - static void GetSockName(const v8::FunctionCallbackInfo& args); - static void GetPeerName(const v8::FunctionCallbackInfo& args); static void SetNoDelay(const v8::FunctionCallbackInfo& args); static void SetKeepAlive(const v8::FunctionCallbackInfo& args); static void Bind(const v8::FunctionCallbackInfo& args); diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index dd3958ec0e3..71cc547675f 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -96,7 +96,8 @@ void UDPWrap::Initialize(Handle target, env->SetProtoMethod(t, "close", Close); env->SetProtoMethod(t, "recvStart", RecvStart); env->SetProtoMethod(t, "recvStop", RecvStop); - env->SetProtoMethod(t, "getsockname", GetSockName); + env->SetProtoMethod(t, "getsockname", + GetSockOrPeerName); env->SetProtoMethod(t, "addMembership", AddMembership); env->SetProtoMethod(t, "dropMembership", DropMembership); env->SetProtoMethod(t, "setMulticastTTL", SetMulticastTTL); @@ -325,29 +326,6 @@ void UDPWrap::RecvStop(const FunctionCallbackInfo& args) { } -void UDPWrap::GetSockName(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - - struct sockaddr_storage address; - UDPWrap* wrap = Unwrap(args.Holder()); - - CHECK(args[0]->IsObject()); - Local obj = args[0].As(); - - int addrlen = sizeof(address); - int err = uv_udp_getsockname(&wrap->handle_, - reinterpret_cast(&address), - &addrlen); - - if (err == 0) { - const sockaddr* addr = reinterpret_cast(&address); - AddressToJS(env, addr, obj); - } - - args.GetReturnValue().Set(err); -} - - // TODO(bnoordhuis) share with StreamWrap::AfterWrite() in stream_wrap.cc void UDPWrap::OnSend(uv_udp_send_t* req, int status) { SendWrap* req_wrap = static_cast(req->data); diff --git a/src/udp_wrap.h b/src/udp_wrap.h index 3373cb9a2df..1582fb46cec 100644 --- a/src/udp_wrap.h +++ b/src/udp_wrap.h @@ -40,6 +40,12 @@ class UDPWrap: public HandleWrap { size_t self_size() const override { return sizeof(*this); } private: + typedef uv_udp_t HandleType; + + template + friend void GetSockOrPeerName(const v8::FunctionCallbackInfo&); + UDPWrap(Environment* env, v8::Handle object, AsyncWrap* parent); static void DoBind(const v8::FunctionCallbackInfo& args, From 1a531b4e4447b9296efacdd9e4c4fa18ec6436e0 Mon Sep 17 00:00:00 2001 From: Bradley Meck Date: Sat, 22 Aug 2015 13:36:03 -0500 Subject: [PATCH 133/214] Introduce --link-module to ./configure - Allows specifying a _third_party_main outside of the node repository - Allows embedders to create custom builtin modules outside of node's repository PR-URL: https://github.com/nodejs/node/pull/2497 Reviewed-By: fishrock123 - Jeremiah Senkpiel Reviewed-By: jasnell - James M Snell Reviewed-By: evanlucas - Evan Lucas Reviewed-By: cjihrig - Colin Ihrig --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure b/configure index cd594d62788..f33821cd3a8 100755 --- a/configure +++ b/configure @@ -84,6 +84,13 @@ parser.add_option("--fully-static", help="Generate an executable without external dynamic libraries. This " "will not work on OSX when using default compilation environment") +parser.add_option("--link-module", + action="append", + dest="linked_module", + help="Path to a JS file to be bundled in the binary as a builtin." + "This module will be referenced by basename without extension." + "Can be used multiple times") + parser.add_option("--openssl-no-asm", action="store_true", dest="openssl_no_asm", @@ -697,6 +704,9 @@ def configure_node(o): if options.enable_static: o['variables']['node_target_type'] = 'static_library' + if options.linked_module: + o['variables']['library_files'] = options.linked_module + def configure_library(lib, output): shared_lib = 'shared_' + lib From 752977b8880be27403bf7a960b3839a57640ef02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 26 Aug 2015 20:07:33 +0100 Subject: [PATCH 134/214] win,msi: change InstallScope to perMachine This is an adaptation of 8e80528453aca0354422162e09c7c9f4700ddb1e. Original commit message: The MSI install scope was set to the WiX default, which is per-user. However, with UAC, it could not be installed by a standard user because InstallPrivileges is elevated by default, hence the install scope should be set to per-machine. Furthermore, the default install path is a per-machine location and setting the system path requires administrator privileges. By changing the InstallScope to perMachine, Start Menu shortcuts are placed in ProgramData and not the installing user's AppData folder, making the shortcuts available to other users. This also fixes the installation when AppData is a network folder. The custom action is necessary to allow upgrades. Since a per-machine MSI cannot upgrade an application installed per-user, the custom action checks if there is going to be an upgrade to a previous version installed per-user and sets the installation as per-user to allow upgrading. Hence, the advantages of installing per-machine will only apply in fresh installations. Fixes joyent/node#5849 Fixes joyent/node#7629 PR-URL: https://github.com/joyent/node/pull/25640 Reviewed-By: Alexis Campailla Reviewed-By: Bert Belder The original commit was adapted to search all upgrade codes listed in the upgrade table, as the current installer tries to upgrade from two different upgrade codes. PR-URL: https://github.com/nodejs/node/pull/2565 Reviewed-By: Alexis Campailla --- tools/msvs/msi/custom_actions.cc | 72 ++++++++++++++++++++++++++++++- tools/msvs/msi/custom_actions.def | 3 +- tools/msvs/msi/product.wxs | 20 +++++++-- 3 files changed, 90 insertions(+), 5 deletions(-) diff --git a/tools/msvs/msi/custom_actions.cc b/tools/msvs/msi/custom_actions.cc index 9a23d557476..8a8417ea0b2 100644 --- a/tools/msvs/msi/custom_actions.cc +++ b/tools/msvs/msi/custom_actions.cc @@ -1,10 +1,80 @@ - #define WIN32_LEAN_AND_MEAN #include #include #include +#define GUID_BUFFER_SIZE 39 // {8-4-4-4-12}\0 + + +extern "C" UINT WINAPI SetInstallScope(MSIHANDLE hInstall) { + HRESULT hr = S_OK; + UINT er = ERROR_SUCCESS; + PMSIHANDLE hDB; + PMSIHANDLE hView; + PMSIHANDLE hRecord; + + hr = WcaInitialize(hInstall, "SetInstallScope"); + ExitOnFailure(hr, "Failed to initialize"); + + hDB = MsiGetActiveDatabase(hInstall); + ExitOnNull(hDB, hr, S_FALSE, "Failed to get active database"); + + LPCTSTR query = TEXT("SELECT DISTINCT UpgradeCode FROM Upgrade"); + er = MsiDatabaseOpenView(hDB, query, &hView); + ExitOnWin32Error(er, hr, "Failed MsiDatabaseOpenView"); + + er = MsiViewExecute(hView, 0); + ExitOnWin32Error(er, hr, "Failed MsiViewExecute"); + + for (;;) { + er = MsiViewFetch(hView, &hRecord); + if (er == ERROR_NO_MORE_ITEMS) break; + ExitOnWin32Error(er, hr, "Failed MsiViewFetch"); + + TCHAR upgrade_code[GUID_BUFFER_SIZE]; + DWORD upgrade_code_len = GUID_BUFFER_SIZE; + er = MsiRecordGetString(hRecord, 1, upgrade_code, &upgrade_code_len); + ExitOnWin32Error(er, hr, "Failed to read UpgradeCode"); + + DWORD iProductIndex; + for (iProductIndex = 0;; iProductIndex++) { + TCHAR product_code[GUID_BUFFER_SIZE]; + er = MsiEnumRelatedProducts(upgrade_code, 0, iProductIndex, + product_code); + if (er == ERROR_NO_MORE_ITEMS) break; + ExitOnWin32Error(er, hr, "Failed to get related product code"); + + TCHAR assignment_type[2]; + DWORD assignment_type_len = 2; + er = MsiGetProductInfo(product_code, INSTALLPROPERTY_ASSIGNMENTTYPE, + assignment_type, &assignment_type_len); + ExitOnWin32Error(er, hr, "Failed to get the assignment type property " + "from related product"); + + // '0' = per-user; '1' = per-machine + if (assignment_type[0] == '0') { + /* When old versions which were installed as per-user are detected, + * the installation scope has to be set to per-user to be able to do + * an upgrade. If not, two versions will be installed side-by-side: + * one as per-user and the other as per-machine. + * + * If we wanted to disable backward compatibility, the installer + * should abort here, and request the previous version to be manually + * uninstalled before installing this one. + */ + er = MsiSetProperty(hInstall, TEXT("ALLUSERS"), TEXT("")); + ExitOnWin32Error(er, hr, "Failed to set the install scope to per-user"); + goto LExit; + } + } + } + +LExit: + // Always succeed. This should not block the installation. + return WcaFinalize(ERROR_SUCCESS); +} + extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) { HRESULT hr = S_OK; diff --git a/tools/msvs/msi/custom_actions.def b/tools/msvs/msi/custom_actions.def index 29e0933e379..5f6b25fc423 100644 --- a/tools/msvs/msi/custom_actions.def +++ b/tools/msvs/msi/custom_actions.def @@ -1,4 +1,5 @@ LIBRARY "custom_actions" EXPORTS -BroadcastEnvironmentUpdate \ No newline at end of file +SetInstallScope +BroadcastEnvironmentUpdate diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index 30de47dad94..bf40b8d420a 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -18,7 +18,10 @@ Manufacturer="$(var.ProductAuthor)" UpgradeCode="47c07a3a-42ef-4213-a85d-8f5a59077c28"> - + @@ -269,19 +272,30 @@ Execute="deferred" Return="check" /> - + + + + + + $NodeAlias = 3 + From bb24c4a418d08c0db5b1250953099bab5da41259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 26 Aug 2015 20:11:27 +0100 Subject: [PATCH 135/214] win,msi: correct installation path registry keys This is a port of 14db629497d0eb97a5f0fbb70cf3e534e460deec. Original commit message: Since install is per machine only, installation path should be stored in local machine instead of current user. The registry stores HKLM in different places for 32 and 64 bit applications, so the installer will not suggest the old path when upgrading from 32 to 64 bit version. Fixes joyent/node#5592 Fixes joyent/node#25087 PR-URL: https://github.com/joyent/node/pull/25640 Reviewed-By: Alexis Campailla Reviewed-By: Bert Belder PR-URL: https://github.com/nodejs/node/pull/2565 Reviewed-By: Alexis Campailla Cherry picked to v3.x by @rvagg, PR: https://github.com/nodejs/node/pull/2608 --- tools/msvs/msi/product.wxs | 44 +++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index bf40b8d420a..9e7eadc845f 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -35,6 +35,14 @@ + + + - + @@ -133,6 +142,20 @@ + + + + + @@ -155,18 +178,15 @@ - + + - + $NodeAlias = 3 - From f75d54607b29f991cfeed270c449335438c43ef6 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Fri, 28 Aug 2015 17:26:07 -0400 Subject: [PATCH 136/214] doc: clarify cluster behaviour with no workers Fixes: https://github.com/nodejs/node/issues/1239 Ref: 41b75ca9263f368db790fbdcc3963bb1a8c5cb7e PR-URL: https://github.com/nodejs/node/pull/2606 Reviewed-By: bnoordhuis - Ben Noordhuis --- doc/api/cluster.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index 7cd079c0405..ea3d5ec2309 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -99,9 +99,10 @@ for things like sessions and login. Because workers are all separate processes, they can be killed or re-spawned depending on your program's needs, without affecting other workers. As long as there are some workers still alive, the server will -continue to accept connections. io.js does not automatically manage the -number of workers for you, however. It is your responsibility to manage -the worker pool for your application's needs. +continue to accept connections. If no workers are alive, existing connections +will be dropped and new connections will be refused. io.js does not +automatically manage the number of workers for you, however. It is your +responsibility to manage the worker pool for your application's needs. ## cluster.schedulingPolicy From 7727ba139407876817b90056cb859d6d267f8427 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Sat, 29 Aug 2015 09:41:27 +0200 Subject: [PATCH 137/214] test: lint and refactor to avoid autocrlf issue The test was failing after adding 'use strict' because the windows CI uses the autocrlf option of git which converts \r into \r\n on checkout. Refactored the test to not read itself anymore and create a temp file on the fly instead to avoid this line-ending issue. PR-URL: https://github.com/nodejs/node/pull/2494 Reviewed-By: Joao Reis --- .eslintignore | 1 - .../test-fs-non-number-arguments-throw.js | 33 +++++++++++-------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.eslintignore b/.eslintignore index ef029bad5ee..6f1caaa873f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,6 +2,5 @@ lib/punycode.js test/addons/doc-*/ test/fixtures test/**/node_modules -test/parallel/test-fs-non-number-arguments-throw.js test/disabled test/tmp*/ diff --git a/test/parallel/test-fs-non-number-arguments-throw.js b/test/parallel/test-fs-non-number-arguments-throw.js index 7a1e7bdb528..8f34a1fcbb9 100644 --- a/test/parallel/test-fs-non-number-arguments-throw.js +++ b/test/parallel/test-fs-non-number-arguments-throw.js @@ -1,24 +1,31 @@ -var assert = require('assert'), - fs = require('fs'), - saneEmitter, - sanity = 'ire(\'assert\')'; +'use strict'; -saneEmitter = fs.createReadStream(__filename, { start: 17, end: 29 }); +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const tempFile = path.join(common.tmpDir, 'fs-non-number-arguments-throw'); -assert.throws(function () { - fs.createReadStream(__filename, { start: "17", end: 29 }); +common.refreshTmpDir(); +fs.writeFileSync(tempFile, 'abc\ndef'); + +// a sanity check when using numbers instead of strings +const sanity = 'def'; +const saneEmitter = fs.createReadStream(tempFile, { start: 4, end: 6 }); + +assert.throws(function() { + fs.createReadStream(tempFile, { start: '4', end: 6 }); }, "start as string didn't throw an error for createReadStream"); -assert.throws(function () { - fs.createReadStream(__filename, { start: 17, end: "29" }); +assert.throws(function() { + fs.createReadStream(tempFile, { start: 4, end: '6' }); }, "end as string didn't throw an error"); -assert.throws(function () { - fs.createWriteStream(__filename, { start: "17" }); +assert.throws(function() { + fs.createWriteStream(tempFile, { start: '4' }); }, "start as string didn't throw an error for createWriteStream"); -saneEmitter.on('data', function (data) { - // a sanity check when using numbers instead of strings +saneEmitter.on('data', function(data) { assert.strictEqual(sanity, data.toString('utf8'), 'read ' + data.toString('utf8') + ' instead of ' + sanity); }); From 6efa96e33a2370883f83065ee47a328331725b6d Mon Sep 17 00:00:00 2001 From: "P.S.V.R" Date: Tue, 25 Aug 2015 17:37:03 +0800 Subject: [PATCH 138/214] doc: merge CHANGELOG.md with joyent/node ChangeLog PR-URL: https://github.com/nodejs/node/pull/2536 Reviewed-By: Rod Vagg --- CHANGELOG.md | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbb10c835de..a5d46e43b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -390,6 +390,23 @@ See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and curren * [[`ee3ce2ed88`](https://github.com/nodejs/io.js/commit/ee3ce2ed88)] - **tools**: install gdbinit from v8 to $PREFIX/share (Ali Ijaz Sheikh) [#2123](https://github.com/nodejs/io.js/pull/2123) * [[`dd523c75da`](https://github.com/nodejs/io.js/commit/dd523c75da)] - **win,node-gyp**: enable delay-load hook by default (Bert Belder) [iojs/io.js#1433](https://github.com/iojs/io.js/pull/1433) +## 2015-07-09, Version 0.12.7 (Stable) + +### Commits + +* [[`0cf9f27703`](https://github.com/nodejs/node/commit/0cf9f27703)] - **deps**: upgrade openssl sources to 1.0.1p [#25654](https://github.com/joyent/node/pull/25654) +* [[`8917e430b8`](https://github.com/nodejs/node/commit/8917e430b8)] - **deps**: upgrade to npm 2.11.3 [#25545](https://github.com/joyent/node/pull/25545) +* [[`88a27a9621`](https://github.com/nodejs/node/commit/88a27a9621)] - **V8**: cherry-pick JitCodeEvent patch from upstream (Ben Noordhuis) [#25589](https://github.com/joyent/node/pull/25589) +* [[`18d413d299`](https://github.com/nodejs/node/commit/18d413d299)] - **win,msi**: create npm folder in AppData directory (Steven Rockarts) [#8838](https://github.com/joyent/node/pull/8838) + +## 2015-07-09, Version 0.10.40 (Maintenance) + +### Commits + +* [[`0cf9f27703`](https://github.com/nodejs/node/commit/0cf9f27703)] - **openssl**: upgrade to 1.0.1p [#25654](https://github.com/joyent/node/pull/25654) +* [[`5a60e0d904`](https://github.com/nodejs/node/commit/5a60e0d904)] - **V8**: back-port JitCodeEvent patch from upstream (Ben Noordhuis) [#25588](https://github.com/joyent/node/pull/25588) +* [[`18d413d299`](https://github.com/nodejs/node/commit/18d413d299)] - **win,msi**: create npm folder in AppData directory (Steven Rockarts) [#8838](https://github.com/joyent/node/pull/8838) + ## 2015-07-04, Version 2.3.3, @Fishrock123 ### Notable changes @@ -412,6 +429,16 @@ See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and curren * [[`0f09b8db28`](https://github.com/nodejs/io.js/commit/0f09b8db28)] - **doc**: don't recommend domains for error handling (Benjamin Gruenbaum) [#2056](https://github.com/nodejs/io.js/pull/2056) * [[`9cd44bb2b6`](https://github.com/nodejs/io.js/commit/9cd44bb2b6)] - **util**: prepend '(node) ' to deprecation messages (Sakthipriyan Vairamani) [#1892](https://github.com/nodejs/io.js/pull/1892) +## 2015-07-03, Version 0.12.6 (Stable) + +### Notable changes + +* **deps**: Fixed an out-of-band write in utf8 decoder. **This is an important security update** as it can be used to cause a denial of service attack. + +### Commits + +* [[`78b0e30954`](https://github.com/nodejs/node/commit/78b0e30954)] - **deps**: fix out-of-band write in utf8 decoder (Fedor Indutny) + ## 2015-07-01, Version 2.3.2, @rvagg ### Notable changes @@ -541,6 +568,29 @@ See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and curren * [[`953b3e75e8`](https://github.com/nodejs/io.js/commit/953b3e75e8)] - **win,node-gyp**: enable delay-load hook by default (Bert Belder) [iojs/io.js#1433](https://github.com/iojs/io.js/pull/1433) * [[`3806d875d3`](https://github.com/nodejs/io.js/commit/3806d875d3)] - **zlib**: prevent uncaught exception in zlibBuffer (Michaël Zasso) [#1811](https://github.com/nodejs/io.js/pull/1811) +## 2015-06-22, Version 0.12.5 (Stable) + +### Commits + +* [[`456c22f63f`](https://github.com/nodejs/node/commit/456c22f63f)] - **openssl**: upgrade to 1.0.1o (Addressing multiple CVEs) [#25523](https://github.com/joyent/node/pull/25523) +* [[`20d8db1a42`](https://github.com/nodejs/node/commit/20d8db1a42)] - **npm**: upgrade to 2.11.2 [#25517](https://github.com/joyent/node/pull/25517) +* [[`50f961596d`](https://github.com/nodejs/node/commit/50f961596d)] - **uv**: upgrade to 1.6.1 [#25475](https://github.com/joyent/node/pull/25475) +* [[`b81a643f9a`](https://github.com/nodejs/node/commit/b81a643f9a)] - **V8**: avoid deadlock when profiling is active (Dmitri Melikyan) [#25309](https://github.com/joyent/node/pull/25309) +* [[`9d19dfbfdb`](https://github.com/nodejs/node/commit/9d19dfbfdb)] - **install**: fix source path for openssl headers (Oguz Bastemur) [#14089](https://github.com/joyent/node/pull/14089) +* [[`4028669531`](https://github.com/nodejs/node/commit/4028669531)] - **install**: make sure opensslconf.h is overwritten (Oguz Bastemur) [#14089](https://github.com/joyent/node/pull/14089) +* [[`d38e865fce`](https://github.com/nodejs/node/commit/d38e865fce)] - **timers**: fix timeout when added in timer's callback (Julien Gilli) [#17203](https://github.com/joyent/node/pull/17203) +* [[`e7c84f82c7`](https://github.com/nodejs/node/commit/e7c84f82c7)] - **windows**: broadcast WM_SETTINGCHANGE after install (Mathias Küsel) [#25100](https://github.com/joyent/node/pull/25100) + +## 2015-06-18, Version 0.10.39 (Maintenance) + +### Commits + +* [[`456c22f63f`](https://github.com/nodejs/node/commit/456c22f63f)] - **openssl**: upgrade to 1.0.1o (Addressing multiple CVEs) [#25523](https://github.com/joyent/node/pull/25523) +* [[`9d19dfbfdb`](https://github.com/nodejs/node/commit/9d19dfbfdb)] - **install**: fix source path for openssl headers (Oguz Bastemur) [#14089](https://github.com/joyent/node/pull/14089) +* [[`4028669531`](https://github.com/nodejs/node/commit/4028669531)] - **install**: make sure opensslconf.h is overwritten (Oguz Bastemur) [#14089](https://github.com/joyent/node/pull/14089) +* [[`d38e865fce`](https://github.com/nodejs/node/commit/d38e865fce)] - **timers**: fix timeout when added in timer's callback (Julien Gilli) [#17203](https://github.com/joyent/node/pull/17203) +* [[`e7c84f82c7`](https://github.com/nodejs/node/commit/e7c84f82c7)] - **windows**: broadcast WM_SETTINGCHANGE after install (Mathias Küsel) [#25100](https://github.com/joyent/node/pull/25100) + ## 2015-06-13, Version 2.3.0, @rvagg ### Notable changes @@ -779,6 +829,14 @@ See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and curren * [[`d144e96fbf`](https://github.com/nodejs/io.js/commit/d144e96fbf)] - **win,node-gyp**: enable delay-load hook by default (Bert Belder) [#1763](https://github.com/nodejs/io.js/pull/1763) * [[`0d6d3dda95`](https://github.com/nodejs/io.js/commit/0d6d3dda95)] - **win,node-gyp**: make delay-load hook C89 compliant (Sharat M R) [TooTallNate/node-gyp#616](https://github.com/TooTallNate/node-gyp/pull/616) +## 2015-05-22, Version 0.12.4 (Stable) + +### Commits + +* [[`202c18bbc3`](https://github.com/nodejs/node/commit/202c18bbc3)] - **npm**: upgrade to 2.10.1 [#25364](https://github.com/joyent/node/pull/25364) +* [[`6157697bd5`](https://github.com/nodejs/node/commit/6157697bd5)] - **V8**: revert v8 Array.prototype.values() removal (cjihrig) [#25328](https://github.com/joyent/node/pull/25328) +* [[`3122052890`](https://github.com/nodejs/node/commit/3122052890)] - **win**: bring back xp/2k3 support (Bert Belder) [#25367](https://github.com/joyent/node/pull/25367) + ## 2015-05-15, Version 2.0.2, @Fishrock123 ### Notable changes @@ -828,6 +886,21 @@ See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and curren * [[`f9dd34d301`](https://github.com/nodejs/io.js/commit/f9dd34d301)] - **tools**: replace closure-linter with eslint (Yosuke Furukawa) [#1539](https://github.com/nodejs/io.js/pull/1539) * [[`64d3210c98`](https://github.com/nodejs/io.js/commit/64d3210c98)] - **win,node-gyp**: enable delay-load hook by default (Bert Belder) [#1667](https://github.com/nodejs/io.js/issues/1667) +## 2015-05-13, Version 0.12.3 (Stable) + +### Commits + +* [[`32166a90cf`](https://github.com/nodejs/node/commit/32166a90cf)] - **V8**: update to 3.28.71.19 [#18206](https://github.com/joyent/node/pull/18206) +* [[`84f1ab6114`](https://github.com/nodejs/node/commit/84f1ab6114)] - **uv**: upgrade to 1.5.0 [#25141](https://github.com/joyent/node/pull/25141) +* [[`03cfbd65fb`](https://github.com/nodejs/node/commit/03cfbd65fb)] - **npm**: upgrade to 2.9.1 [#25289](https://github.com/joyent/node/pull/25289) +* [[`80cdae855f`](https://github.com/nodejs/node/commit/80cdae855f)] - **V8**: don't busy loop in v8 cpu profiler thread (Mike Tunnicliffe) [#25268](https://github.com/joyent/node/pull/25268) +* [[`2a5f4bd7ce`](https://github.com/nodejs/node/commit/2a5f4bd7ce)] - **V8**: fix issue with let bindings in for loops (adamk) [#23948](https://github.com/joyent/node/pull/23948) +* [[`f0ef597e09`](https://github.com/nodejs/node/commit/f0ef597e09)] - **debugger**: don't spawn child process in remote mode (Jackson Tian) [#14172](https://github.com/joyent/node/pull/14172) +* [[`0e392f3b68`](https://github.com/nodejs/node/commit/0e392f3b68)] - **net**: do not set V4MAPPED on FreeBSD (Julien Gilli) [#18204](https://github.com/joyent/node/pull/18204) +* [[`101e103e3b`](https://github.com/nodejs/node/commit/101e103e3b)] - **repl**: make 'Unexpected token' errors recoverable (Julien Gilli) [#8875](https://github.com/joyent/node/pull/8875) +* [[`d5b32246fb`](https://github.com/nodejs/node/commit/d5b32246fb)] - **src**: backport ignore ENOTCONN on shutdown race (Ben Noordhuis) [#14480](https://github.com/joyent/node/pull/14480) +* [[`f99eaefe75`](https://github.com/nodejs/node/commit/f99eaefe75)] - **src**: fix backport of SIGINT crash fix on FreeBSD (Julien Gilli) [#14819](https://github.com/joyent/node/pull/14819) + ## 2015-05-07, Version 2.0.1, @rvagg ### Notable changes @@ -1315,6 +1388,33 @@ will be removed at a later point. (Roman Reiss) [#1363](https://github.com/nodej * [[`08acf1352c`](https://github.com/nodejs/io.js/commit/08acf1352c)] - **win,node-gyp**: make delay-load hook optional (Bert Belder) [#1266](https://github.com/nodejs/io.js/pull/1266) * [[`3d46fefe0c`](https://github.com/nodejs/io.js/commit/3d46fefe0c)] - **win,node-gyp**: allow node.exe/iojs.exe to be renamed (Bert Belder) [#1251](https://github.com/nodejs/io.js/pull/1251) +## 2015-03-31, Version 0.12.2 (Stable) + +### Commits + +* [[`7a37910f25`](https://github.com/nodejs/node/commit/7a37910f25)] - **uv**: Upgrade to 1.4.2 [#9179](https://github.com/joyent/node/pull/9179) +* [[`2704c62933`](https://github.com/nodejs/node/commit/2704c62933)] - **npm**: Upgrade to 2.7.4 [#14180](https://github.com/joyent/node/pull/14180) +* [[`a103712a62`](https://github.com/nodejs/node/commit/a103712a62)] - **V8**: do not add extra newline in log file (Julien Gilli) +* [[`2fc5eeb3da`](https://github.com/nodejs/node/commit/2fc5eeb3da)] - **V8**: Fix --max_old_space_size=4096 integer overflow (Andrei Sedoi) [#9200](https://github.com/joyent/node/pull/9200) +* [[`605329d7f7`](https://github.com/nodejs/node/commit/605329d7f7)] - **asyncwrap**: fix constructor condition for early ret (Trevor Norris) [#9146](https://github.com/joyent/node/pull/9146) +* [[`a33f23cbbc`](https://github.com/nodejs/node/commit/a33f23cbbc)] - **buffer**: align chunks on 8-byte boundary (Fedor Indutny) [#9375](https://github.com/joyent/node/pull/9375) +* [[`a35ba2f67d`](https://github.com/nodejs/node/commit/a35ba2f67d)] - **buffer**: fix pool offset adjustment (Trevor Norris) +* [[`c0766eb1a4`](https://github.com/nodejs/node/commit/c0766eb1a4)] - **build**: fix use of strict aliasing (Trevor Norris) [#9179](https://github.com/joyent/node/pull/9179) +* [[`6c3647c38d`](https://github.com/nodejs/node/commit/6c3647c38d)] - **console**: allow Object.prototype fields as labels (Colin Ihrig) [#9116](https://github.com/joyent/node/pull/9116) +* [[`4823afcbe2`](https://github.com/nodejs/node/commit/4823afcbe2)] - **fs**: make F_OK/R_OK/W_OK/X_OK not writable (Jackson Tian) [#9060](https://github.com/joyent/node/pull/9060) +* [[`b3aa876f08`](https://github.com/nodejs/node/commit/b3aa876f08)] - **fs**: properly handle fd passed to truncate() (Bruno Jouhier) [#9161](https://github.com/joyent/node/pull/9161) +* [[`d6484f3f7b`](https://github.com/nodejs/node/commit/d6484f3f7b)] - **http**: fix assert on data/end after socket error (Fedor Indutny) [#14087](https://github.com/joyent/node/pull/14087) +* [[`04b63e022a`](https://github.com/nodejs/node/commit/04b63e022a)] - **lib**: fix max size check in Buffer constructor (Ben Noordhuis) [#657](https://github.com/iojs/io.js/pull/657) +* [[`2411bea0df`](https://github.com/nodejs/node/commit/2411bea0df)] - **lib**: fix stdio/ipc sync i/o regression (Ben Noordhuis) [#9179](https://github.com/joyent/node/pull/9179) +* [[`b8604fa480`](https://github.com/nodejs/node/commit/b8604fa480)] - **module**: replace NativeModule.require (Herbert Vojčík) [#9201](https://github.com/joyent/node/pull/9201) +* [[`1a2a4dac23`](https://github.com/nodejs/node/commit/1a2a4dac23)] - **net**: allow port 0 in connect() (cjihrig) [#9268](https://github.com/joyent/node/pull/9268) +* [[`bada87bd66`](https://github.com/nodejs/node/commit/bada87bd66)] - **net**: unref timer in parent sockets (Fedor Indutny) [#891](https://github.com/iojs/io.js/pull/891) +* [[`c66f8c21f0`](https://github.com/nodejs/node/commit/c66f8c21f0)] - **path**: refactor for performance and consistency (Nathan Woltman) [#9289](https://github.com/joyent/node/pull/9289) +* [[`9deade4322`](https://github.com/nodejs/node/commit/9deade4322)] - **smalloc**: extend user API (Trevor Norris) [#905](https://github.com/iojs/io.js/pull/905) +* [[`61fe1fe21b`](https://github.com/nodejs/node/commit/61fe1fe21b)] - **src**: fix for SIGINT crash on FreeBSD (Fedor Indutny) [#14184](https://github.com/joyent/node/pull/14184) +* [[`b233131901`](https://github.com/nodejs/node/commit/b233131901)] - **src**: fix builtin modules failing with --use-strict (Julien Gilli) [#9237](https://github.com/joyent/node/pull/9237) +* [[`7e9d2f8de8`](https://github.com/nodejs/node/commit/7e9d2f8de8)] - **watchdog**: fix timeout for early polling return (Saúl Ibarra Corretgé) [#9410](https://github.com/joyent/node/pull/9410) + ## 2015-03-23, Version 1.6.2, @rvagg ### Notable changes @@ -1354,6 +1454,18 @@ will be removed at a later point. (Roman Reiss) [#1363](https://github.com/nodej * [[`849319a260`](https://github.com/nodejs/io.js/commit/849319a260)] - **util**: Check input to util.inherits (Connor Peet) [#1240](https://github.com/nodejs/io.js/pull/1240) * [[`cf081a4712`](https://github.com/nodejs/io.js/commit/cf081a4712)] - **vm**: fix crash on fatal error in debug context (Ben Noordhuis) [#1229](https://github.com/nodejs/io.js/pull/1229) +## 2015-03-23, Version 0.12.1 (Stable) + +### Commits + +* [[`3b511a8ccd`](https://github.com/nodejs/node/commit/3b511a8ccd)] - **openssl**: upgrade to 1.0.1m (Addressing multiple CVES) + +## 2015-03-23, Version 0.10.38 (Maintenance) + +### Commits + +* [[`3b511a8ccd`](https://github.com/nodejs/node/commit/3b511a8ccd)] - **openssl**: upgrade to 1.0.1m (Addressing multiple CVES) + ## 2015-03-20, Version 1.6.1, @rvagg ### Notable changes @@ -1463,6 +1575,17 @@ will be removed at a later point. (Roman Reiss) [#1363](https://github.com/nodej * [[`8431fc53f1`](https://github.com/nodejs/io.js/commit/8431fc53f1)] - **tls_wrap**: proxy handle methods in prototype (Fedor Indutny) [#1108](https://github.com/nodejs/io.js/pull/1108) * [[`8070b1ff99`](https://github.com/nodejs/io.js/commit/8070b1ff99)] - **buffer**: Don't assign .parent if none exists (Trevor Norris) [#1109](https://github.com/nodejs/io.js/pull/1109) +## 2015-03-11, Version 0.10.37 (Maintenance) + +### Commits + +* [[`dcff5d565c`](https://github.com/nodejs/node/commit/dcff5d565c)] - uv: update to 0.10.36 (CVE-2015-0278) [#9274](https://github.com/joyent/node/pull/9274) +* [[`f2a45caf2e`](https://github.com/nodejs/node/commit/f2a45caf2e)] - domains: fix stack clearing after error handled (Jonas Dohse) [#9364](https://github.com/joyent/node/pull/9364) +* [[`d01a900078`](https://github.com/nodejs/node/commit/d01a900078)] - buffer: reword Buffer.concat error message (Chris Dickinson) [#8723](https://github.com/joyent/node/pull/8723) +* [[`c8239c08d7`](https://github.com/nodejs/node/commit/c8239c08d7)] - console: allow Object.prototype fields as labels (Julien Gilli) [#9215](https://github.com/joyent/node/pull/9215) +* [[`431eb172f9`](https://github.com/nodejs/node/commit/431eb172f9)] - V8: log version in profiler log file (Ben Noordhuis) [#9043](https://github.com/joyent/node/pull/9043) +* [[`8bcd0a4c4a`](https://github.com/nodejs/node/commit/8bcd0a4c4a)] - http: fix performance regression for GET requests (Florin-Cristian Gavrila) [#9026](https://github.com/joyent/node/pull/9026) + ## 2015-03-09, Version 1.5.1, @rvagg ### Notable changes @@ -1895,6 +2018,12 @@ _Note: version **1.4.0** was tagged and built but not released. A libuv bug was * [[`513724e`](https://github.com/nodejs/io.js/commit/513724efcc42ed150391915050fe60402f8dd48d)] - doc: add GPG fingerprint for chrisdickinson (Chris Dickinson) * [[`4168198`](https://github.com/nodejs/io.js/commit/41681983921d323da79b6d45e4ae0f8edb541e18)] - doc: add TC meeting 2015-01-28 minutes (Rod Vagg) +## 2015-02-06, Version 0.12.0 (Stable) + +### Commits + +* [[`087a7519ce`](https://github.com/nodejs/node/commit/087a7519ce)] - **npm**: Upgrade to 2.5.1 +* [[`4312f8d760`](https://github.com/nodejs/node/commit/4312f8d760)] - **mdb_v8**: update for v0.12 (Dave Pacheco) ## 2015-02-03, Version 1.1.0, @chrisdickinson @@ -1994,6 +2123,13 @@ _Note: version **1.4.0** was tagged and built but not released. A libuv bug was * [[`50ac4b7`](https://github.com/nodejs/io.js/commit/50ac4b7e2a823f92f0e102b804ec73f00eacb216)] - Working on 1.0.5 (Rod Vagg) * [[`d1fc9c6`](https://github.com/nodejs/io.js/commit/d1fc9c6caec68883401fe601d99f3a69fee52556)] - 2015-01-24 io.js v1.0.4 Release (Rod Vagg) +## 2015-01-26, Version 0.10.36 (Stable) + +### Commits + +* [[`deef605085`](https://github.com/nodejs/node/commit/deef605085)] - **openssl**: update to 1.0.1l +* [[`45f1330425`](https://github.com/nodejs/node/commit/45f1330425)] - **v8**: Fix debugger and strict mode regression (Julien Gilli) +* [[`6ebd85e105`](https://github.com/nodejs/node/commit/6ebd85e105)] - **v8**: don't busy loop in cpu profiler thread (Ben Noordhuis) [#8789](https://github.com/joyent/node/pull/8789) ## 2015-01-24, Version 1.0.4, @rvagg From 0cc59299a468f85133d73d42d6ec1fc24db9486d Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 28 Aug 2015 16:24:29 +1000 Subject: [PATCH 139/214] doc: add TSC meeting minutes 2015-08-26 PR-URL: https://github.com/nodejs/node/pull/2591 Reviewed-By: Sakthipriyan Vairamani --- doc/tsc-meetings/2015-08-26.md | 112 +++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 doc/tsc-meetings/2015-08-26.md diff --git a/doc/tsc-meetings/2015-08-26.md b/doc/tsc-meetings/2015-08-26.md new file mode 100644 index 00000000000..54cf3377865 --- /dev/null +++ b/doc/tsc-meetings/2015-08-26.md @@ -0,0 +1,112 @@ +# Node Foundation TSC Meeting 2015-08-26 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-08-26 +* **GitHub Issue**: https://github.com/nodejs/node/issues/2560 +* **Minutes Google Doc**: https://docs.google.com/document/d/1aB76ClCgdjZUw3p-gHq9j6YwU11zWgJ4pmYPEWk6gjE +* _Previous Minutes Google Doc: _ + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests in the nodejs org prior to meeting. + +### joyent/node + +* Update README to reflect move to nodejs/node [#25897](https://github.com/joyent/node/pull/25897) + +### nodejs/node + +* doc: merge CHANGELOG.md with joyent/node ChangeLog [#2536](https://github.com/nodejs/node/pull/2536) +* (guidance on) rename of "language groups" from iojs-* to nodejs-*? [#2525](https://github.com/nodejs/node/issues/2525) +* Node.js v4 Release Timeline [#2522](https://github.com/nodejs/node/issues/2522) + +### nodejs/collaboration + +* How to onboard into WG? [#4](https://github.com/nodejs/collaboration/issues/4) + +## Minutes + + +### Present + +* Rod Vagg (TSC) +* Brian White (TSC) +* Steven R Loomis (TSC) +* Fedor Indutny (TSC) +* Bert Belder (TSC) +* Colin Ihrig (TSC) +* Ben Noordhuis (TSC) +* Mikeal Rogers +* Alexis Campailla (TSC) +* Trevor Norris (TSC) +* Shigeki Ohtsu (TSC) + + +### Review of the previous meeting + +* Travel assistance amendment (no issue for this) +* FYI: Collaboration WG: https://github.com/nodejs/collaboration +* Summit recap +* level-set on repo rename +* Future: “project lifecycle” (Mikeal) - process by which top level projects are added (libuv, node-gyp, etc), (conferences…) + +### Standup: + +* Rod Vagg: v4 release stuff, got certificates from/for the foundation, new website including CDN offering from CloudFlare +* Brian White: continuing work on benchmark app for node.js/io.js, triaging, reviewing/answering issues and pull requests. +* Steven R Loomis: Intl for convergence VS2015 +* Fedor Indutny: http perf improvement PR, reviewing PRS, looking at issue for shared ports for http cluster +* Bert Belder: busy with work, reviewing libuv PRs and responding to issues +* Colin Ihrig: Rename from io.js to Node.js, reviewing issues and PRs +* Ben Noordhuis: Running native addons as part of CI, libuv bugs, reviewing PRs +* Mikeal Rogers: Website ready for release, working on CloudFlare CDN stuff +* Alexis Campailla: CI for release, parallelising test runs for ARM, looking at managing dependencies with git +* Trevor Norris: reviewing PRs and issues +* Shigeki Ohtsu: reviewing convergence tests for SSLv2/3, working on TLS ALPN features before freeze + +### Update README to reflect move to nodejs/node [#25897](https://github.com/joyent/node/pull/25897) + +* Alexis: made changes in CI to prepare for this, we’ll keep PRs in original repo, node-accept-pull-request will land changes in new repo as well, mirroring changes in 0.10 and 0.12 across both old and new repos. Still using the old Jenkins for releases for 0.10 and 0.12 right now and that doesn’t depend on repo name & location. +Target ETA for transition: Monday. + + +### doc: merge CHANGELOG.md with joyent/node ChangeLog [#2536](https://github.com/nodejs/node/pull/2536) + +* Rod seeking confirmation from this group that this was _not a bad idea_. +* Discussion about documentation for people upgrading from older versions of Node and having a linear history. Jeremiah has been working on 0.10 -> v4 documentation. + +### (guidance on) rename of "language groups" from iojs-* to nodejs-*? [#2525](https://github.com/nodejs/node/issues/2525) + +* Steven discussed renaming the language groups +* Mikeal: some groups are not in a position to make decisions because they are not active but the ones that are should be given the opportunity to agree or disagree to the move rather than us imposing a move on them. We should post an issue in their repos. +* Steven: we should give them a timeline in issues in their repos +* Discussed naming, could be “lang” or “community” to make it more clear what they are about. +* ACTION: Steven to add a proposal to #2525, let TSC/collaborators add comments, later in the week will reach out to each of the groups. + +### Node.js v4 Release Timeline [#2522](https://github.com/nodejs/node/issues/2522) + +* Rod gave a summary of the proposed release timeline https://github.com/nodejs/node/issues/2522 (and appologised for documenting it as “the” release proposal just for the sake of getting it done). + - “feature freeze” Friday, 28th of August, cut v4.x branch + - nodejs.org DNS changeover to new website Monday, 31st of August + - release Thursday, 3rd of September + - RC builds between website and release + - backup release date of Monday, 7th of September if absolutely necessary to punt +* Discussed the outstanding items in the 4.0.0 milestone: https://github.com/nodejs/node/milestones/4.0.0, some concerning items: + - mdb support is late and may not get done, might have to be a semver-minor prior to LTS + - vcbuilt.bat needs to use the new build_release target and we have to verify that all builds have Intl enabled - Steven to work with Rod on this + - `process.send()` async/sync, Ben said that this is async on all platforms now (was just Windows previously but now it’s cross-platform) but it’s missing a callback so there’s no way of doing back-pressure. No time to add this prior to v4 but could be done as semiver-minor later. Ben agreed to document current behaviour properly in the docs. + - `_unrefActive` is in Jeremiah’s hands, he will land the 0.12 changes as the io.js version is terrible. Discussed further perf improvements but agreed to leave those changes till later, ideally till v5 because of the potential for subtle edge-case bugs being introduced. + +### How to onboard into WG? [nodejs/collaboration#4](https://github.com/nodejs/collaboration/issues/4) + +* Discussed GitHub onboarding mechanics + +### V8 embedders unified debugger proposal + +* Trevor raised https://github.com/nodejs/node/issues/2546 which is a proposal for a unified debugger for V8 embedders using Chromium DevTools. +* Discussion ensued, agreed to leave it for GitHub discussion unless/until there is something the TSC actually needs to make a decision about. + +### Next Meeting + +September 2nd From fc726399fd7eb83281ef6f302cf5d0370a0d84c3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 29 Aug 2015 13:19:53 -0700 Subject: [PATCH 140/214] test: unmark test-process-argv-0.js as flaky https://github.com/nodejs/node/pull/2541 fixed flakiness in test-process-argv-0.js. However, it was not removed from the list of flaky tests. This removes it from the list of flaky tests. PR-URL: https://github.com/nodejs/node/pull/2613 Reviewed-By: cjihrig - Colin Ihrig --- test/parallel/parallel.status | 1 - 1 file changed, 1 deletion(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 86c271956d9..7bb3c158d2c 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -12,7 +12,6 @@ test-tls-ticket-cluster : PASS,FLAKY [$system==linux] test-cluster-worker-forced-exit : PASS,FLAKY test-http-client-timeout-event : PASS,FLAKY -test-process-argv-0 : PASS,FLAKY test-tick-processor : PASS,FLAKY test-tls-no-sslv3 : PASS,FLAKY test-child-process-buffering : PASS,FLAKY From 23579a5f4ac56c382d201483306d73fe33e4f68b Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 19 Aug 2015 20:49:12 +1000 Subject: [PATCH 141/214] doc: add TSC meeting minutes 2015-08-12 PR-URL: https://github.com/nodejs/node/pull/2438 Reviewed-By: cjihrig - Colin Ihrig --- doc/tsc-meetings/2015-08-12.md | 87 ++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 doc/tsc-meetings/2015-08-12.md diff --git a/doc/tsc-meetings/2015-08-12.md b/doc/tsc-meetings/2015-08-12.md new file mode 100644 index 00000000000..88b08b91cf4 --- /dev/null +++ b/doc/tsc-meetings/2015-08-12.md @@ -0,0 +1,87 @@ +# Node.js Foundation TSC Meeting 2015-08-12 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-08-12 +* **GitHub Issue**: https://github.com/nodejs/node-convergence-archive/issues/71 +* **Minutes Google Doc**: https://docs.google.com/document/d/1q2bFjnf0Y23Ljxoze56Pmrbailaj5-UAqIUqIYVhiIk +* _Previous Minutes Google Doc: _ + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests prior to meeting. + +* Travel assistance amendment (no issue for this) +* FYI: Collaboration WG: https://github.com/nodejs/collaboration +* Summit recap +* level-set on repo rename +* Future: “project lifecycle” (Mikeal) - process by which top level projects are added (libuv, node-gyp, etc), (conferences…) + + +## Minutes + + +### Present + +* Mikeal Rogers +* Rod Vagg (TSC) +* James Snell (TSC) +* Michael Dawson (TSC) +* Steven R Loomis (TSC) +* Chris Dickinson (TSC) +* Alexis Campailla (TSC) +* Brian White (TSC) + +### Review of the previous meeting + +* Next branch release versioning [#2215](https://github.com/nodejs/io.js/issues/2215) +* TSC Chair - Election? + +### Standup: + +* Mikeal: summit, code & learn project for new collab +* Rod: Summit, migrating nodejs/io.js to nodejs/node +* James: convergence, joyent/node PRs +* Michael: patch for AIX, 0.12 work, Benchmarking meeting +* Steven: Summit, 1st Intl meeting, Intl convergence work, VS2015 fixes +* Chris: Summit, Docs repo has taken off, [HTTP lifecycle doc by Bryan English](https://github.com/nodejs/docs/blob/master/src/guides/anatomy-of-an-http-transaction.md) +* Alexis: Summit, progress on CI convergence, reviewed some PRs. +* Brian: Triaging and reviewing PRs and Issues. + +### Travel assistance amendment (no issue for this) + +* Chris Dickinson adding $500 to the travel expenditure +* Passed unanimously. + +### FYI: Collaboration WG: https://github.com/nodejs/collaboration + +* Steven: new WG coming out of the Summit, Sean (@snostorm) is taking lead on this. One idea under discussion now is to have a multi-timezone meetings for the language working groups. +* Mikeal: is this going to serve as a collaboration point for the language groups? +* Steven: https://github.com/nodejs/Intl/issues/9 +* Rod: beyond the language groups, what are the aims of this new group? +* Steven: trying to address, or having a place to discuss, common items across working groups. +* James: filling a need to liaise with the other working groups, acting as an intermediary + +### Summit recap + +* Mikeal: 6 sessions in 2 days, not solid answers to problems but a shared understanding of the common problems, feels like we are on the same page from that +* Mikeal: bigger sessions: what is the Node API and what is the Node platform? V8 release cycle. Errors and the inconsistencies. Kept coming back to the collaboration WG, which is why it exists. Talked about expanding the collaborator base, idea was to do some collaboration sprints to bring new folks up to speed, https://github.com/nodejs/code-and-learn comes from that idea (there is foundation budget for that). +* Mikeal: there were extensive notes taken, those are being edited now and will be published into the repo(s) and turned into blog posts. + +### level-set on repo rename + +* James: what are the remaining things to do - there’s confusion around the naming + - Renaming everything in the documentation (README, docs & other misc docs) + - Renaming binary + - Alexis: finishing convergence work +* Mikeal: preparing a blog post about what’s happening, will be reviewed and posted soon + +### Future: “project lifecycle” (Mikeal) - process by which top level projects are added (libuv, node-gyp, etc), (conferences…) + +* Mikeal: the TSC charter states that we will adopt a project lifecycle that will allow us to bring in other _top level projects_. Additionally, the TSC has had to take on board some non-technical work because of its position in the Foundation (voting on expenditure, etc.), a number of TSC members don’t want to be involved in that kind of activity. Have started drafting a new project lifecycle plan which splits off a “Core TSC” that contains the existing TSC members but with a focus on Node.js Core work while the existing TSC will take on board the higher-level foundation work and members can optionally resign if they aren’t interested in that work and we can expand it to non-Core collaborators. https://github.com/nodejs/TSC/tree/lifecycle + + +### Next Meeting + +August 19th + From 0a0577cf5fbfbdbfa0717b926bea82a7fd6f7ceb Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 31 Aug 2015 20:24:38 +1000 Subject: [PATCH 142/214] build: fix bad cherry-pick for vcbuild.bat build-release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/2625 Reviewed-By: orangemocha - Alexis Campailla Reviewed-By: joaocgreis - João Reis --- vcbuild.bat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index 7261b1cd417..e3046afd976 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -36,9 +36,9 @@ set noperfctr_msi_arg= set i18n_arg= set download_arg= set release_urls_arg= +set build_release= :next-arg -set build_release= if "%1"=="" goto args-done if /i "%1"=="debug" set config=Debug&goto arg-ok if /i "%1"=="release" set config=Release&goto arg-ok @@ -78,8 +78,10 @@ echo Warning: ignoring invalid command line option `%1`. :arg-ok shift goto next-arg + +:args-done + if defined build_release ( - set nosnapshot=1 set config=Release set msi=1 set licensertf=1 @@ -87,8 +89,6 @@ if defined build_release ( set i18n_arg=small-icu ) - -:args-done if "%config%"=="Debug" set debug_arg=--debug if defined nosnapshot set snapshot_arg=--without-snapshot if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1 @@ -260,10 +260,10 @@ echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build echo vcbuild.bat release msi : builds release build and MSI installer package echo vcbuild.bat test : builds debug build and runs tests +echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org goto exit :exit -echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org goto :EOF rem *************** From 3aa6bbb6488ccb347b6ce7f8f0a13b19db2ed6ba Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 31 Aug 2015 16:01:01 +1000 Subject: [PATCH 143/214] tools: update release.sh to work with new website MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit now need to specify "nodejs" or "iojs", also remove .gpg file PR-URL: https://github.com/nodejs/node/pull/2623 Reviewed-By: jbergstroem - Johan Bergström cherry-picked by @rvagg to v3.x, s/nodejs/iojs/ --- tools/release.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/release.sh b/tools/release.sh index fca88c97adc..5b7037d2e85 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -8,7 +8,7 @@ set -e -webhost=iojs.org +webhost=direct.iojs.org webuser=dist promotablecmd=dist-promotable promotecmd=dist-promote @@ -80,7 +80,7 @@ function sign { echo "GPG key for \"${version}\" tag is not yours, cannot sign" fi - shapath=$(ssh ${webuser}@${webhost} $signcmd $version) + shapath=$(ssh ${webuser}@${webhost} $signcmd iojs $version) if ! [[ ${shapath} =~ ^/.+/SHASUMS256.txt$ ]]; then echo 'Error: No SHASUMS file returned by sign!' @@ -98,7 +98,6 @@ function sign { scp ${webuser}@${webhost}:${shapath} ${tmpdir}/${shafile} gpg --default-key $gpgkey --clearsign ${tmpdir}/${shafile} - gpg --default-key $gpgkey --armor --export --output ${tmpdir}/${shafile}.gpg echo "Wrote to ${tmpdir}/" @@ -118,7 +117,7 @@ function sign { fi if [ "X${yorn}" == "Xy" ]; then - scp ${tmpdir}/${shafile} ${tmpdir}/${shafile}.asc ${tmpdir}/${shafile}.gpg ${webuser}@${webhost}:${shadir}/ + scp ${tmpdir}/${shafile} ${tmpdir}/${shafile}.asc ${webuser}@${webhost}:${shadir}/ break fi done @@ -145,7 +144,7 @@ fi echo -e "\n# Checking for releases ..." -promotable=$(ssh ${webuser}@${webhost} $promotablecmd) +promotable=$(ssh ${webuser}@${webhost} $promotablecmd iojs) if [ "X${promotable}" == "X" ]; then echo "No releases to promote!" @@ -178,7 +177,7 @@ for version in $versions; do echo -e "\n# Promoting ${version}..." - ssh ${webuser}@${webhost} $promotecmd $version + ssh ${webuser}@${webhost} $promotecmd iojs $version sign $version From 50c0baa8d73b03067555d0ecccd689e8ce9a5206 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 31 Aug 2015 16:05:02 +1000 Subject: [PATCH 144/214] build: rename 'doc' directory to 'docs' for upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to match nodejs.org directory name PR-URL: https://github.com/nodejs/node/pull/2623 Reviewed-By: jbergstroem - Johan Bergström --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 23857eaeb73..ff04745a75a 100644 --- a/Makefile +++ b/Makefile @@ -382,8 +382,8 @@ endif doc-upload: tar ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -r out/doc/ $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/ - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/doc.done" + scp -r out/doc/ $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/docs/ + ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done" $(TARBALL)-headers: config.gypi release-only $(PYTHON) ./configure \ From a860d7fae195a6a368793b66ab84e1af03fb624c Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 31 Aug 2015 17:03:26 +1000 Subject: [PATCH 145/214] build: change staging directory on new server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit new server has "nodejs" and "iojs" directories, upload to the appropriate one PR-URL: https://github.com/nodejs/node/pull/2623 Reviewed-By: jbergstroem - Johan Bergström cherry-picked to v3.x by @rvagg, s/nodejs/iojs --- Makefile | 42 +++++++++++++++++++++--------------------- vcbuild.bat | 10 +++++----- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index ff04745a75a..b0d492f7eb4 100644 --- a/Makefile +++ b/Makefile @@ -346,9 +346,9 @@ $(PKG): release-only pkg: $(PKG) pkg-upload: pkg - ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -p iojs-$(FULLVERSION).pkg $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg.done" + ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + scp -p iojs-$(FULLVERSION).pkg $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg.done" $(TARBALL): release-only $(NODE_EXE) doc git checkout-index -a -f --prefix=$(TARNAME)/ @@ -372,18 +372,18 @@ endif tar: $(TARBALL) tar-upload: tar - ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -p iojs-$(FULLVERSION).tar.gz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz.done" + ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + scp -p iojs-$(FULLVERSION).tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz.done" ifeq ($(XZ), 0) - scp -p iojs-$(FULLVERSION).tar.xz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz.done" + scp -p iojs-$(FULLVERSION).tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz.done" endif doc-upload: tar - ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -r out/doc/ $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/docs/ - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done" + ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" + scp -r out/doc/ $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs/ + ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done" $(TARBALL)-headers: config.gypi release-only $(PYTHON) ./configure \ @@ -405,12 +405,12 @@ endif tar-headers: $(TARBALL)-headers tar-headers-upload: tar-headers - ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done" + ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" + scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz + ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done" ifeq ($(XZ), 0) - scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done" + scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz + ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done" endif $(BINARYTAR): release-only @@ -437,12 +437,12 @@ endif binary: $(BINARYTAR) binary-upload: binary - ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz.done" + ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz.done" ifeq ($(XZ), 0) - scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz - ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz.done" + scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz.done" endif haswrk=$(shell which wrk > /dev/null 2>&1; echo $$?) diff --git a/vcbuild.bat b/vcbuild.bat index e3046afd976..61dede88e6b 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -213,11 +213,11 @@ if not defined SSHCONFIG ( exit /b 1 ) if not defined STAGINGSERVER set STAGINGSERVER=iojs-www -ssh -F %SSHCONFIG% %STAGINGSERVER% "mkdir -p staging/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%" -scp -F %SSHCONFIG% Release\iojs.exe %STAGINGSERVER%:staging/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%/iojs.exe -scp -F %SSHCONFIG% Release\iojs.lib %STAGINGSERVER%:staging/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%/iojs.lib -scp -F %SSHCONFIG% iojs-v%FULLVERSION%-%target_arch%.msi %STAGINGSERVER%:staging/%DISTTYPEDIR%/v%FULLVERSION%/ -ssh -F %SSHCONFIG% %STAGINGSERVER% "touch staging/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi.done staging/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%.done" +ssh -F %SSHCONFIG% %STAGINGSERVER% "mkdir -p iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%" +scp -F %SSHCONFIG% Release\iojs.exe %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%/iojs.exe +scp -F %SSHCONFIG% Release\iojs.lib %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%/iojs.lib +scp -F %SSHCONFIG% iojs-v%FULLVERSION%-%target_arch%.msi %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/ +ssh -F %SSHCONFIG% %STAGINGSERVER% "touch iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi.done iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%.done" :run @rem Run tests if requested. From 3172e9c54167d1af4e6a87c2e8799735c052bf41 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 31 Aug 2015 17:33:22 +1000 Subject: [PATCH 146/214] build: set file permissions before uploading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/2623 Reviewed-By: jbergstroem - Johan Bergström cherry-picked to v3.x by @rvagg, s/nodejs/iojs --- Makefile | 24 ++++++++++++++++-------- vcbuild.bat | 3 ++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b0d492f7eb4..0ee5507b045 100644 --- a/Makefile +++ b/Makefile @@ -347,6 +347,7 @@ pkg: $(PKG) pkg-upload: pkg ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + chmod 664 iojs-$(FULLVERSION).pkg scp -p iojs-$(FULLVERSION).pkg $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).pkg.done" @@ -373,17 +374,20 @@ tar: $(TARBALL) tar-upload: tar ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + chmod 664 iojs-$(FULLVERSION).tar.gz scp -p iojs-$(FULLVERSION).tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.gz.done" ifeq ($(XZ), 0) + chmod 664 iojs-$(FULLVERSION).tar.xz scp -p iojs-$(FULLVERSION).tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION).tar.xz.done" endif doc-upload: tar - ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -r out/doc/ $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs/ - ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done" + ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + chmod -R ug=rw-x+X,o=r+X out/doc/ + scp -pr out/doc/ $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/docs/ + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/docs.done" $(TARBALL)-headers: config.gypi release-only $(PYTHON) ./configure \ @@ -405,12 +409,14 @@ endif tar-headers: $(TARBALL)-headers tar-headers-upload: tar-headers - ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" - scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz - ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done" + ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + chmod 664 $(TARNAME)-headers.tar.gz + scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done" ifeq ($(XZ), 0) - scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz - ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done" + chmod 664 $(TARNAME)-headers.tar.xz + scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz + ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done" endif $(BINARYTAR): release-only @@ -438,9 +444,11 @@ binary: $(BINARYTAR) binary-upload: binary ssh $(STAGINGSERVER) "mkdir -p iojs/$(DISTTYPEDIR)/$(FULLVERSION)" + chmod 664 iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz.done" ifeq ($(XZ), 0) + chmod 664 iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz scp -p iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz $(STAGINGSERVER):iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz ssh $(STAGINGSERVER) "touch iojs/$(DISTTYPEDIR)/$(FULLVERSION)/iojs-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz.done" endif diff --git a/vcbuild.bat b/vcbuild.bat index 61dede88e6b..376c29508a3 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -218,6 +218,7 @@ scp -F %SSHCONFIG% Release\iojs.exe %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVER scp -F %SSHCONFIG% Release\iojs.lib %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%/iojs.lib scp -F %SSHCONFIG% iojs-v%FULLVERSION%-%target_arch%.msi %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/ ssh -F %SSHCONFIG% %STAGINGSERVER% "touch iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi.done iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%.done" +ssh -F %SSHCONFIG% %STAGINGSERVER% "chmod chmod -R ug=rw-x+X,o=r+X iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi* iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%*" :run @rem Run tests if requested. @@ -260,7 +261,7 @@ echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build echo vcbuild.bat release msi : builds release build and MSI installer package echo vcbuild.bat test : builds debug build and runs tests -echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org +echo vcbuild.bat build-release : builds the release distribution as used by iojs.org goto exit :exit From 42e075ae02b307ae44b86d6680e62eb3bb7dbc9e Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Mon, 17 Aug 2015 14:32:51 -0600 Subject: [PATCH 147/214] test: improve performance of stringbytes test String concatenation in the assert messages has drastic impact on test runtime. Removal of these messages is unlikely to affect debugging if any breaking changes are made. Previous time to run: $ time ./iojs test/parallel/test-stringbytes-external.js real 0m2.321s user 0m2.256s sys 0m0.092s With fix: $ time ./iojs test/parallel/test-stringbytes-external.js real 0m0.518s user 0m0.508s sys 0m0.008s PR-URL: https://github.com/nodejs/node/pull/2544 Reviewed-By: trevnorris - Trevor Norris Reviewed-By: thefourtheye - Sakthipriyan Vairamani --- test/parallel/test-stringbytes-external.js | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js index 107685ba8fd..4c29a10a8da 100644 --- a/test/parallel/test-stringbytes-external.js +++ b/test/parallel/test-stringbytes-external.js @@ -40,8 +40,7 @@ var c_ucs = new Buffer(b_ucs, 'ucs2'); assert.equal(c_bin.length, c_ucs.length); // make sure Buffers from externals are the same for (var i = 0; i < c_bin.length; i++) { - assert.equal(c_bin[i], c_ucs[i], c_bin[i] + ' == ' + c_ucs[i] + - ' : index ' + i); + assert.equal(c_bin[i], c_ucs[i]); } // check resultant strings assert.equal(c_bin.toString('ucs2'), c_ucs.toString('ucs2')); @@ -63,19 +62,14 @@ var PRE_3OF4_APEX = Math.ceil((EXTERN_APEX / 4) * 3) - RADIOS; var pumped_string2 = slice2.toString('hex'); var decoded = new Buffer(pumped_string, 'hex'); - var metadata = '\nEXTERN_APEX=1031913 - pumped_string.length='; - metadata += pumped_string.length + '\n'; - // the string are the same? for (var k = 0; k < pumped_string.length; ++k) { - assert.equal(pumped_string[k], pumped_string2[k], - metadata + 'chars should be the same at ' + k); + assert.equal(pumped_string[k], pumped_string2[k]); } // the recoded buffer is the same? for (var i = 0; i < decoded.length; ++i) { - assert.equal(datum[i], decoded[i], - metadata + 'bytes should be the same at ' + i); + assert.equal(datum[i], decoded[i]); } } })(); @@ -89,20 +83,14 @@ var PRE_3OF4_APEX = Math.ceil((EXTERN_APEX / 4) * 3) - RADIOS; var pumped_string2 = slice2.toString('base64'); var decoded = new Buffer(pumped_string, 'base64'); - var metadata = '\nEXTERN_APEX=1031913 - data=" + slice.length'; - metadata += ' pumped_string.length=' + pumped_string.length + '\n'; - // the string are the same? for (var k = 0; k < pumped_string.length - 3; ++k) { - assert.equal(pumped_string[k], pumped_string2[k], - metadata + 'chars should be the same for two slices at ' - + k + ' ' + pumped_string[k] + ' ' + pumped_string2[k]); + assert.equal(pumped_string[k], pumped_string2[k]); } // the recoded buffer is the same? for (var i = 0; i < decoded.length; ++i) { - assert.equal(datum[i], decoded[i], - metadata + 'bytes should be the same at ' + i); + assert.equal(datum[i], decoded[i]); } } })(); From ce04b735ccff65ff260550078858b46f9a63e819 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 21 Aug 2015 13:31:24 +0200 Subject: [PATCH 148/214] src: only memcmp if length > 0 in Buffer::Compare Both pointer arguments to memcmp are defined as non-null and compiler optimizes upon that. PR-URL: https://github.com/nodejs/node/pull/2544 Reviewed-By: trevnorris - Trevor Norris Reviewed-By: thefourtheye - Sakthipriyan Vairamani --- src/node_buffer.cc | 2 +- test/parallel/test-buffer.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index c8be5b5a448..54c4711a1ec 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -835,7 +835,7 @@ void Compare(const FunctionCallbackInfo &args) { size_t cmp_length = MIN(obj_a_length, obj_b_length); - int32_t val = memcmp(obj_a_data, obj_b_data, cmp_length); + int val = cmp_length > 0 ? memcmp(obj_a_data, obj_b_data, cmp_length) : 0; // Normalize val to be an integer in the range of [1, -1] since // implementations of memcmp() can vary by platform. diff --git a/test/parallel/test-buffer.js b/test/parallel/test-buffer.js index d5013c35528..1b65e10ea3f 100644 --- a/test/parallel/test-buffer.js +++ b/test/parallel/test-buffer.js @@ -1137,6 +1137,9 @@ assert.equal(Buffer.compare(d, b), 1); assert.equal(Buffer.compare(b, d), -1); assert.equal(Buffer.compare(c, c), 0); +assert.equal(Buffer.compare(Buffer(0), Buffer(0)), 0); +assert.equal(Buffer.compare(Buffer(0), Buffer(1)), -1); +assert.equal(Buffer.compare(Buffer(1), Buffer(0)), 1); assert.throws(function() { var b = new Buffer(1); From 1d0e5210a81fe70f2aaae990dc14f162994f5f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 5 Aug 2015 21:17:46 +0200 Subject: [PATCH 149/214] deps: upgrade libuv to 1.7.3 PR-URL: https://github.com/nodejs/node/pull/2310 Reviewed-By: bnoordhuis - Ben Noordhuis Reviewed-By: cjihrig - Colin Ihrig --- deps/uv/AUTHORS | 19 + deps/uv/ChangeLog | 160 ++++++ deps/uv/MAINTAINERS.md | 36 ++ deps/uv/Makefile.am | 4 + deps/uv/README.md | 36 ++ deps/uv/android-configure | 4 +- deps/uv/appveyor.yml | 36 ++ deps/uv/common.gypi | 7 +- deps/uv/configure.ac | 2 +- deps/uv/docs/src/check.rst | 2 +- deps/uv/docs/src/errors.rst | 6 +- deps/uv/docs/src/fs.rst | 12 + deps/uv/docs/src/fs_event.rst | 2 +- deps/uv/docs/src/idle.rst | 2 +- deps/uv/docs/src/index.rst | 1 + deps/uv/docs/src/misc.rst | 11 - deps/uv/docs/src/pipe.rst | 4 +- deps/uv/docs/src/signal.rst | 2 +- deps/uv/docs/src/stream.rst | 4 +- deps/uv/docs/src/tcp.rst | 13 +- deps/uv/docs/src/tty.rst | 6 +- deps/uv/docs/src/udp.rst | 11 +- deps/uv/docs/src/version.rst | 60 +++ deps/uv/include/uv-version.h | 8 +- deps/uv/include/uv.h | 7 +- deps/uv/libuv.nsi | 86 ++++ deps/uv/src/queue.h | 4 +- deps/uv/src/threadpool.c | 9 +- deps/uv/src/unix/aix.c | 191 ++----- deps/uv/src/unix/core.c | 30 +- deps/uv/src/unix/freebsd.c | 35 +- deps/uv/src/unix/fs.c | 137 +++-- deps/uv/src/unix/internal.h | 1 + deps/uv/src/unix/kqueue.c | 12 +- deps/uv/src/unix/loop.c | 34 +- deps/uv/src/unix/pthread-fixes.c | 1 + deps/uv/src/unix/stream.c | 36 +- deps/uv/src/unix/tcp.c | 51 +- deps/uv/src/unix/tty.c | 9 +- deps/uv/src/unix/udp.c | 42 +- deps/uv/src/uv-common.c | 26 +- deps/uv/src/uv-common.h | 2 +- deps/uv/src/version.c | 6 +- deps/uv/src/win/core.c | 21 +- deps/uv/src/win/fs-event.c | 22 +- deps/uv/src/win/fs.c | 55 +- deps/uv/src/win/internal.h | 3 +- deps/uv/src/win/pipe.c | 67 ++- deps/uv/src/win/process-stdio.c | 2 +- deps/uv/src/win/tcp.c | 78 ++- deps/uv/src/win/thread.c | 1 + deps/uv/src/win/tty.c | 128 ++++- deps/uv/src/win/udp.c | 80 ++- deps/uv/test/benchmark-fs-stat.c | 2 +- deps/uv/test/echo-server.c | 2 +- deps/uv/test/run-tests.c | 5 + deps/uv/test/runner-unix.c | 60 ++- deps/uv/test/task.h | 4 +- deps/uv/test/test-fs-event.c | 297 +++++++---- deps/uv/test/test-fs.c | 487 +++++++++++++----- deps/uv/test/test-list.h | 36 ++ deps/uv/test/test-pipe-connect-multiple.c | 104 ++++ deps/uv/test/test-pipe-pending-instances.c | 59 +++ deps/uv/test/test-signal-multiple-loops.c | 1 + deps/uv/test/test-spawn.c | 198 ++++++- .../uv/test/test-tcp-close-while-connecting.c | 12 +- deps/uv/test/test-tcp-connect-timeout.c | 2 + deps/uv/test/test-tcp-create-socket-early.c | 206 ++++++++ deps/uv/test/test-tcp-open.c | 38 ++ deps/uv/test/test-tcp-squelch-connreset.c | 119 +++++ deps/uv/test/test-threadpool-cancel.c | 6 +- deps/uv/test/test-udp-create-socket-early.c | 132 +++++ deps/uv/test/test-udp-multicast-interface.c | 2 +- deps/uv/test/test-udp-multicast-join.c | 2 + deps/uv/test/test-udp-multicast-join6.c | 5 + deps/uv/test/test-udp-multicast-ttl.c | 2 +- deps/uv/test/test-udp-open.c | 38 ++ deps/uv/uv.gyp | 12 +- 78 files changed, 2788 insertions(+), 667 deletions(-) create mode 100644 deps/uv/MAINTAINERS.md create mode 100644 deps/uv/appveyor.yml create mode 100644 deps/uv/docs/src/version.rst create mode 100644 deps/uv/libuv.nsi create mode 100644 deps/uv/test/test-pipe-connect-multiple.c create mode 100644 deps/uv/test/test-pipe-pending-instances.c create mode 100644 deps/uv/test/test-tcp-create-socket-early.c create mode 100644 deps/uv/test/test-tcp-squelch-connreset.c create mode 100644 deps/uv/test/test-udp-create-socket-early.c diff --git a/deps/uv/AUTHORS b/deps/uv/AUTHORS index bbb8f4d8cdc..2c12c14123c 100644 --- a/deps/uv/AUTHORS +++ b/deps/uv/AUTHORS @@ -200,3 +200,22 @@ farblue68 Jason Williams Igor Soarez Miodrag Milanovic +Cheng Zhao +Michael Neumann +Stefano Cristiano +heshamsafi +A. Hauptmann +John McNamee +Yosuke Furukawa +Santiago Gimeno +guworks +RossBencina +Roger A. Light +chenttuuvv +Richard Lau +ronkorving +Corbin Simpson +Zachary Hamm +Karl Skomski +Jeremy Whitlock +Willem Thiart diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog index 5d3a4cad46b..e9ebdecd4ca 100644 --- a/deps/uv/ChangeLog +++ b/deps/uv/ChangeLog @@ -1,3 +1,163 @@ +2015.08.28, Version 1.7.3 (Stable), 93877b11c8b86e0a6befcda83a54555c1e36e4f0 + +Changes since version 1.7.2: + +* threadpool: fix thread starvation bug (Ben Noordhuis) + + +2015.08.25, Version 1.7.2 (Stable), 4d13a013fcfa72311f0102751fdc7951873f466c + +Changes since version 1.7.1: + +* unix, win: make uv_loop_init return on error (Willem Thiart) + +* win: reset pipe handle for pipe servers (Saúl Ibarra Corretgé) + +* win: fix replacing pipe handle for pipe servers (Saúl Ibarra Corretgé) + +* win: fix setting pipe pending instances after bind (Saúl Ibarra Corretgé) + + +2015.08.20, Version 1.7.1 (Stable), 44f4b6bd82d8ae4583ccc4768a83af778ef69f85 + +Changes since version 1.7.0: + +* doc: document the procedure for verifying releases (Saúl Ibarra Corretgé) + +* doc: add note about Windows binaries to the README (Saúl Ibarra Corretgé) + +* doc: use long GPG IDs in MAINTAINERS.md (Saúl Ibarra Corretgé) + +* Revert "stream: squelch ECONNRESET error if already closed" (Saúl Ibarra + Corretgé) + +* doc: clarify uv_read_stop() is idempotent (Corbin Simpson) + +* unix: OpenBSD's setsockopt needs an unsigned char for multicast (Zachary + Hamm) + +* test: Fix two memory leaks (Karl Skomski) + +* unix,win: return EINVAL on nullptr args in uv_fs_{read,write} (Karl Skomski) + +* win: set accepted TCP sockets as non-inheritable (Saúl Ibarra Corretgé) + +* unix: remove superfluous parentheses in fs macros (Ben Noordhuis) + +* unix: don't copy arguments for sync fs requests (Ben Noordhuis) + +* test: plug small memory leak in unix test runner (Ben Noordhuis) + +* unix,windows: allow NULL loop for sync fs requests (Ben Noordhuis) + +* unix,windows: don't assert on unknown error code (Ben Noordhuis) + +* stream: retry write on EPROTOTYPE on OSX (Brian White) + +* common: fix use of snprintf on Windows (Saúl Ibarra Corretgé) + +* tests: refactored fs watch_dir tests for stability (Jeremy Whitlock) + + +2015.08.06, Version 1.7.0 (Stable), 415a865d6365ba58d02b92b89d46ba5d7744ec8b + +Changes since version 1.6.1: + +* win,stream: add slot to remember CRT fd (Bert Belder) + +* win,pipe: properly close when created from CRT fd (Bert Belder) + +* win,pipe: don't close fd 0-2 (Bert Belder) + +* win,tty: convert fd -> handle safely (Bert Belder) + +* win,tty: properly close when created from CRT fd (Bert Belder) + +* win,tty: don't close fd 0-2 (Bert Belder) + +* win,fs: don't close fd 0-2 (Bert Belder) + +* win: include "malloc.h" (Cheng Zhao) + +* windows: MSVC 2015 has C99 inline (Jason Williams) + +* dragonflybsd: fixes for nonblocking and cloexec (Michael Neumann) + +* dragonflybsd: use sendfile(2) for uv_fs_sendfile (Michael Neumann) + +* dragonflybsd: fix uv_exepath (Michael Neumann) + +* win,fs: Fixes align(8) directive on mingw (Stefano Cristiano) + +* unix, win: prevent replacing fd in uv_{udp,tcp,pipe}_t (Saúl Ibarra Corretgé) + +* win: move logic to set socket non-inheritable to uv_tcp_set_socket (Saúl + Ibarra Corretgé) + +* unix, win: add ability to create tcp/udp sockets early (Saúl Ibarra Corretgé) + +* test: retry select() on EINTR, honor milliseconds (Ben Noordhuis) + +* unix: consolidate tcp and udp bind error (Saúl Ibarra Corretgé) + +* test: conditionally skip udp_ipv6_multicast_join6 (heshamsafi) + +* core: add UV_VERSION_HEX macro (Saúl Ibarra Corretgé) + +* doc: add section with version-checking macros and functions (Saúl Ibarra + Corretgé) + +* tty: cleanup handle if uv_tty_init fails (Saúl Ibarra Corretgé) + +* darwin: save a fd when FSEvents is used (Saúl Ibarra Corretgé) + +* win: fix returning thread id in uv_thread_self (Saúl Ibarra Corretgé) + +* common: use offsetof for QUEUE_DATA (Saúl Ibarra Corretgé) + +* win: remove UV_HANDLE_CONNECTED (A. Hauptmann) + +* docs: add Windows specific note for uv_fs_open (Saúl Ibarra Corretgé) + +* doc: add note about uv_fs_scandir (Saúl Ibarra Corretgé) + +* test,unix: reduce stack size of watchdog threads (Ben Noordhuis) + +* win: add support for recursive file watching (Saúl Ibarra Corretgé) + +* win,tty: support consoles with non-default colors (John McNamee) + +* doc: add missing variable name (Yosuke Furukawa) + +* stream: squelch ECONNRESET error if already closed (Santiago Gimeno) + +* build: remove ancient condition from common.gypi (Saúl Ibarra Corretgé) + +* tests: skip some tests when network is unreachable (Luca Bruno) + +* build: proper support for android cross compilation (guworks) + +* android: add missing include to pthread-fixes.c (RossBencina) + +* test: fix compilation warning (Saúl Ibarra Corretgé) + +* doc: add a note about uv_dirent_t.type (Saúl Ibarra Corretgé) + +* win,test: fix shared library build (Saúl Ibarra Corretgé) + +* test: fix compilation warning (Santiago Gimeno) + +* build: add experimental Windows installer (Roger A. Light) + +* threadpool: send signal only when queue is empty (chenttuuvv) + +* aix: fix uv_exepath with relative paths (Richard Lau) + +* build: fix version syntax in AppVeyor file (Saúl Ibarra Corretgé) + +* unix: allow nbufs > IOV_MAX in uv_fs_{read,write} (ronkorving) + + 2015.06.06, Version 1.6.1 (Stable), 30c8be07bb78a66fdee5141626bf53a49a17094a Changes since version 1.6.0: diff --git a/deps/uv/MAINTAINERS.md b/deps/uv/MAINTAINERS.md new file mode 100644 index 00000000000..4db2f5130c0 --- /dev/null +++ b/deps/uv/MAINTAINERS.md @@ -0,0 +1,36 @@ + +# Project Maintainers + +libuv is currently managed by the following individuals: + +* **Ben Noordhuis** ([@bnoordhuis](https://github.com/bnoordhuis)) + - GPG key: D77B 1E34 243F BAF0 5F8E 9CC3 4F55 C8C8 46AB 89B9 (pubkey-bnoordhuis) +* **Bert Belder** ([@piscisaureus](https://github.com/piscisaureus)) +* **Fedor Indutny** ([@indutny](https://github.com/indutny)) + - GPG key: AF2E EA41 EC34 47BF DD86 FED9 D706 3CCE 19B7 E890 (pubkey-indutny) +* **Saúl Ibarra Corretgé** ([@saghul](https://github.com/saghul)) + - GPG key: FDF5 1936 4458 319F A823 3DC9 410E 5553 AE9B C059 (pubkey-saghul) + +## Storing a maintainer key in Git + +It's quite handy to store a maintainer's signature as a git blob, and have +that object tagged and signed with such key. + +Export your public key: + + $ gpg --armor --export saghul@gmail.com > saghul.asc + +Store it as a blob on the repo: + + $ git hash-object -w saghul.asc + +The previous command returns a hash, copy it. For the sake of this explanation, +we'll assume it's 'abcd1234'. Storing the blob in git is not enough, it could +be garbage collected since nothing references it, so we'll create a tag for it: + + $ git tag -s pubkey-saghul abcd1234 + +Commit the changes and push: + + $ git push origin pubkey-saghul + diff --git a/deps/uv/Makefile.am b/deps/uv/Makefile.am index e9814d7b703..f0ca6a7d82b 100644 --- a/deps/uv/Makefile.am +++ b/deps/uv/Makefile.am @@ -186,8 +186,10 @@ test_run_tests_SOURCES = test/blackhole-server.c \ test/test-ping-pong.c \ test/test-pipe-bind-error.c \ test/test-pipe-connect-error.c \ + test/test-pipe-connect-multiple.c \ test/test-pipe-connect-prepare.c \ test/test-pipe-getsockname.c \ + test/test-pipe-pending-instances.c \ test/test-pipe-sendmsg.c \ test/test-pipe-server-close.c \ test/test-pipe-close-stdout-read-stdin.c \ @@ -215,6 +217,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \ test/test-tcp-close-accept.c \ test/test-tcp-close-while-connecting.c \ test/test-tcp-close.c \ + test/test-tcp-create-socket-early.c \ test/test-tcp-connect-error-after-write.c \ test/test-tcp-connect-error.c \ test/test-tcp-connect-timeout.c \ @@ -240,6 +243,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \ test/test-timer.c \ test/test-tty.c \ test/test-udp-bind.c \ + test/test-udp-create-socket-early.c \ test/test-udp-dgram-too-big.c \ test/test-udp-ipv6.c \ test/test-udp-multicast-interface.c \ diff --git a/deps/uv/README.md b/deps/uv/README.md index f9a7a1e62e4..0ce26699716 100644 --- a/deps/uv/README.md +++ b/deps/uv/README.md @@ -89,6 +89,42 @@ also serve as API specification and usage examples. These resources are not handled by libuv maintainers and might be out of date. Please verify it before opening new issues. +## Downloading + +libuv can be downloaded either from the +[GitHub repository](https://github.com/libuv/libuv) +or from the [downloads site](http://dist.libuv.org/dist/). + +Starting with libuv 1.7.0, binaries for Windows are also provided. This is to +be considered EXPERIMENTAL. + +Before verifying the git tags or signature files, importing the relevant keys +is necessary. Key IDs are listed in the +[MAINTAINERS](https://github.com/libuv/libuv/blob/master/MAINTAINERS.md) +file, but are also available as git blob objects for easier use. + +Importing a key the usual way: + + $ gpg --keyserver pool.sks-keyservers.net \ + --recv-keys AE9BC059 + +Importing a key from a git blob object: + + $ git show pubkey-saghul | gpg --import + +### Verifying releases + +Git tags are signed with the developer's key, they can be verified as follows: + + $ git verify-tag v1.6.1 + +Starting with libuv 1.7.0, the tarballs stored in the +[downloads site](http://dist.libuv.org/dist/) are signed and an accomanying +signature file sit alongside each. Once both the release tarball and the +signature file are downloaded, the file can be verified as follows: + + $ gpg --verify libuv-1.7.0.tar.gz.sign + ## Build Instructions For GCC there are two build methods: via autotools or via [GYP][]. diff --git a/deps/uv/android-configure b/deps/uv/android-configure index 9750581206e..e0b250fb634 100755 --- a/deps/uv/android-configure +++ b/deps/uv/android-configure @@ -6,7 +6,7 @@ $1/build/tools/make-standalone-toolchain.sh \ --toolchain=arm-linux-androideabi-4.8 \ --arch=arm \ --install-dir=$TOOLCHAIN \ - --platform=android-9 + --platform=android-21 export PATH=$TOOLCHAIN/bin:$PATH export AR=arm-linux-androideabi-ar export CC=arm-linux-androideabi-gcc @@ -16,5 +16,5 @@ export PLATFORM=android if [ $2 -a $2 == 'gyp' ] then - ./gyp_uv.py -Dtarget_arch=arm -DOS=android + ./gyp_uv.py -Dtarget_arch=arm -DOS=android -f make-android fi diff --git a/deps/uv/appveyor.yml b/deps/uv/appveyor.yml new file mode 100644 index 00000000000..8790283340e --- /dev/null +++ b/deps/uv/appveyor.yml @@ -0,0 +1,36 @@ +version: v1.7.3.build{build} + +install: + - cinst -y nsis + +matrix: + fast_finish: true + allow_failures: + - platform: x86 + configuration: Release + - platform: x64 + configuration: Release + +platform: + - x86 + - x64 + +configuration: + - Release + +build_script: + # Fixed tag version number if using a tag. + - cmd: if "%APPVEYOR_REPO_TAG%" == "true" set APPVEYOR_BUILD_VERSION=%APPVEYOR_REPO_TAG_NAME% + # vcbuild overwrites the platform variable. + - cmd: set ARCH=%platform% + - cmd: vcbuild.bat release %ARCH% shared + +after_build: + - '"%PROGRAMFILES(x86)%\NSIS\makensis" /DVERSION=%APPVEYOR_BUILD_VERSION% /DARCH=%ARCH% libuv.nsi' + +artifacts: + - name: Installer + path: 'libuv-*.exe' + +cache: + - C:\projects\libuv\build\gyp diff --git a/deps/uv/common.gypi b/deps/uv/common.gypi index ecf9475234f..c6f6dec8657 100644 --- a/deps/uv/common.gypi +++ b/deps/uv/common.gypi @@ -37,9 +37,10 @@ 'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ], }, 'conditions': [ - ['OS != "win"', { - 'defines': [ 'EV_VERIFY=2' ], - }], + ['OS == "android"', { + 'cflags': [ '-fPIE' ], + 'ldflags': [ '-fPIE', '-pie' ] + }] ] }, 'Release': { diff --git a/deps/uv/configure.ac b/deps/uv/configure.ac index fe7228e2b72..ad5cb008420 100644 --- a/deps/uv/configure.ac +++ b/deps/uv/configure.ac @@ -13,7 +13,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libuv], [1.6.1], [https://github.com/libuv/libuv/issues]) +AC_INIT([libuv], [1.7.3], [https://github.com/libuv/libuv/issues]) AC_CONFIG_MACRO_DIR([m4]) m4_include([m4/libuv-extra-automake-flags.m4]) m4_include([m4/as_case.m4]) diff --git a/deps/uv/docs/src/check.rst b/deps/uv/docs/src/check.rst index 8d48f222767..36c93cf03d9 100644 --- a/deps/uv/docs/src/check.rst +++ b/deps/uv/docs/src/check.rst @@ -31,7 +31,7 @@ N/A API --- -.. c:function:: int uv_check_init(uv_loop_t*, uv_check_t* check) +.. c:function:: int uv_check_init(uv_loop_t* loop, uv_check_t* check) Initialize the handle. diff --git a/deps/uv/docs/src/errors.rst b/deps/uv/docs/src/errors.rst index 5d59dc30f28..cec25f5187e 100644 --- a/deps/uv/docs/src/errors.rst +++ b/deps/uv/docs/src/errors.rst @@ -322,8 +322,10 @@ API .. c:function:: const char* uv_strerror(int err) - Returns the error message for the given error code. + Returns the error message for the given error code. Leaks a few bytes + of memory when you call it with an unknown error code. .. c:function:: const char* uv_err_name(int err) - Returns the error name for the given error code. + Returns the error name for the given error code. Leaks a few bytes + of memory when you call it with an unknown error code. diff --git a/deps/uv/docs/src/fs.rst b/deps/uv/docs/src/fs.rst index c2a3fc252a1..33c04406f14 100644 --- a/deps/uv/docs/src/fs.rst +++ b/deps/uv/docs/src/fs.rst @@ -168,6 +168,11 @@ API Equivalent to :man:`open(2)`. + .. note:: + On Windows libuv uses `CreateFileW` and thus the file is always opened + in binary mode. Because of this the O_BINARY and O_TEXT flags are not + supported. + .. c:function:: int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb) Equivalent to :man:`preadv(2)`. @@ -206,6 +211,13 @@ API get `ent` populated with the next directory entry data. When there are no more entries ``UV_EOF`` will be returned. + .. note:: + Unlike `scandir(3)`, this function does not return the "." and ".." entries. + + .. note:: + On Linux, getting the type of an entry is only supported by some filesystems (btrfs, ext2, + ext3 and ext4 at the time of this writing), check the :man:`getdents(2)` man page. + .. c:function:: int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) .. c:function:: int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) .. c:function:: int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) diff --git a/deps/uv/docs/src/fs_event.rst b/deps/uv/docs/src/fs_event.rst index 681ae52f95c..c2d7f520236 100644 --- a/deps/uv/docs/src/fs_event.rst +++ b/deps/uv/docs/src/fs_event.rst @@ -88,7 +88,7 @@ API `path` for changes. `flags` can be an ORed mask of :c:type:`uv_fs_event_flags`. .. note:: Currently the only supported flag is ``UV_FS_EVENT_RECURSIVE`` and - only on OSX. + only on OSX and Windows. .. c:function:: int uv_fs_event_stop(uv_fs_event_t* handle) diff --git a/deps/uv/docs/src/idle.rst b/deps/uv/docs/src/idle.rst index 81f51d2076e..1f51c4a19e4 100644 --- a/deps/uv/docs/src/idle.rst +++ b/deps/uv/docs/src/idle.rst @@ -39,7 +39,7 @@ N/A API --- -.. c:function:: int uv_idle_init(uv_loop_t*, uv_idle_t* idle) +.. c:function:: int uv_idle_init(uv_loop_t* loop, uv_idle_t* idle) Initialize the handle. diff --git a/deps/uv/docs/src/index.rst b/deps/uv/docs/src/index.rst index 9cdc494aecb..fa89c4bffe5 100644 --- a/deps/uv/docs/src/index.rst +++ b/deps/uv/docs/src/index.rst @@ -68,6 +68,7 @@ Documentation design errors + version loop handle request diff --git a/deps/uv/docs/src/misc.rst b/deps/uv/docs/src/misc.rst index 9708c5dea47..e9ddba3db6a 100644 --- a/deps/uv/docs/src/misc.rst +++ b/deps/uv/docs/src/misc.rst @@ -135,17 +135,6 @@ API For :man:`isatty(3)` equivalent functionality use this function and test for ``UV_TTY``. -.. c:function:: unsigned int uv_version(void) - - Returns the libuv version packed into a single integer. 8 bits are used for - each component, with the patch number stored in the 8 least significant - bits. E.g. for libuv 1.2.3 this would return 0x010203. - -.. c:function:: const char* uv_version_string(void) - - Returns the libuv version number as a string. For non-release versions - "-pre" is appended, so the version number could be "1.2.3-pre". - .. c:function:: int uv_replace_allocator(uv_malloc_func malloc_func, uv_realloc_func realloc_func, uv_calloc_func calloc_func, uv_free_func free_func) .. versionadded:: 1.6.0 diff --git a/deps/uv/docs/src/pipe.rst b/deps/uv/docs/src/pipe.rst index df896a05834..d33b0f2b977 100644 --- a/deps/uv/docs/src/pipe.rst +++ b/deps/uv/docs/src/pipe.rst @@ -29,12 +29,12 @@ N/A API --- -.. c:function:: int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc) +.. c:function:: int uv_pipe_init(uv_loop_t* loop, uv_pipe_t* handle, int ipc) Initialize a pipe handle. The `ipc` argument is a boolean to indicate if this pipe will be used for handle passing between processes. -.. c:function:: int uv_pipe_open(uv_pipe_t*, uv_file file) +.. c:function:: int uv_pipe_open(uv_pipe_t* handle, uv_file file) Open an existing file descriptor or HANDLE as a pipe. diff --git a/deps/uv/docs/src/signal.rst b/deps/uv/docs/src/signal.rst index 21675945fc4..dc1223b90ac 100644 --- a/deps/uv/docs/src/signal.rst +++ b/deps/uv/docs/src/signal.rst @@ -62,7 +62,7 @@ Public members API --- -.. c:function:: int uv_signal_init(uv_loop_t*, uv_signal_t* signal) +.. c:function:: int uv_signal_init(uv_loop_t* loop, uv_signal_t* signal) Initialize the handle. diff --git a/deps/uv/docs/src/stream.rst b/deps/uv/docs/src/stream.rst index 880f0e2ebc7..21562b3702e 100644 --- a/deps/uv/docs/src/stream.rst +++ b/deps/uv/docs/src/stream.rst @@ -123,7 +123,7 @@ API .. note:: `server` and `client` must be handles running on the same loop. -.. c:function:: int uv_read_start(uv_stream_t*, uv_alloc_cb alloc_cb, uv_read_cb read_cb) +.. c:function:: int uv_read_start(uv_stream_t* stream, uv_alloc_cb alloc_cb, uv_read_cb read_cb) Read data from an incoming stream. The callback will be made several times until there is no more data to read or :c:func:`uv_read_stop` is called. @@ -142,6 +142,8 @@ API Stop reading data from the stream. The :c:type:`uv_read_cb` callback will no longer be called. + This function is idempotent and may be safely called on a stopped stream. + .. c:function:: int uv_write(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_write_cb cb) Write data to stream. Buffers are written in order. Example: diff --git a/deps/uv/docs/src/tcp.rst b/deps/uv/docs/src/tcp.rst index dd746fe87fb..dd18522d91d 100644 --- a/deps/uv/docs/src/tcp.rst +++ b/deps/uv/docs/src/tcp.rst @@ -28,9 +28,18 @@ N/A API --- -.. c:function:: int uv_tcp_init(uv_loop_t*, uv_tcp_t* handle) +.. c:function:: int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle) - Initialize the handle. + Initialize the handle. No socket is created as of yet. + +.. c:function:: int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags) + + Initialize the handle with the specified flags. At the moment the lower 8 bits + of the `flags` parameter are used as the socket domain. A socket will be created + for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created, + just like :c:func:`uv_tcp_init`. + + .. versionadded:: 1.7.0 .. c:function:: int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) diff --git a/deps/uv/docs/src/tty.rst b/deps/uv/docs/src/tty.rst index 18f34ef46d9..655dca9ca20 100644 --- a/deps/uv/docs/src/tty.rst +++ b/deps/uv/docs/src/tty.rst @@ -46,7 +46,7 @@ N/A API --- -.. c:function:: int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd, int readable) +.. c:function:: int uv_tty_init(uv_loop_t* loop, uv_tty_t* handle, uv_file fd, int readable) Initialize a new TTY stream with the given file descriptor. Usually the file descriptor will be: @@ -70,7 +70,7 @@ API descriptor that refers to a file returns `UV_EINVAL` on UNIX. -.. c:function:: int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode) +.. c:function:: int uv_tty_set_mode(uv_tty_t* handle, uv_tty_mode_t mode) .. versionchanged:: 1.2.0: the mode is specified as a :c:type:`uv_tty_mode_t` value. @@ -86,7 +86,7 @@ API code ``UV_EBUSY`` if you call it when execution is inside :c:func:`uv_tty_set_mode`. -.. c:function:: int uv_tty_get_winsize(uv_tty_t*, int* width, int* height) +.. c:function:: int uv_tty_get_winsize(uv_tty_t* handle, int* width, int* height) Gets the current Window size. On success it returns 0. diff --git a/deps/uv/docs/src/udp.rst b/deps/uv/docs/src/udp.rst index ec7ce56d38f..dd46603394e 100644 --- a/deps/uv/docs/src/udp.rst +++ b/deps/uv/docs/src/udp.rst @@ -105,11 +105,20 @@ Public members API --- -.. c:function:: int uv_udp_init(uv_loop_t*, uv_udp_t* handle) +.. c:function:: int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) Initialize a new UDP handle. The actual socket is created lazily. Returns 0 on success. +.. c:function:: int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) + + Initialize the handle with the specified flags. At the moment the lower 8 bits + of the `flags` parameter are used as the socket domain. A socket will be created + for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created, + just like :c:func:`uv_udp_init`. + + .. versionadded:: 1.7.0 + .. c:function:: int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) Opens an existing file descriptor or Windows SOCKET as a UDP handle. diff --git a/deps/uv/docs/src/version.rst b/deps/uv/docs/src/version.rst new file mode 100644 index 00000000000..e1715b2d3c5 --- /dev/null +++ b/deps/uv/docs/src/version.rst @@ -0,0 +1,60 @@ + +.. _version: + +Version-checking macros and functions +===================================== + +Starting with version 1.0.0 libuv follows the `semantic versioning`_ +scheme. This means that new APIs can be introduced throughout the lifetime of +a major release. In this section you'll find all macros and functions that +will allow you to write or compile code conditionally, in order to work with +multiple libuv versions. + +.. _semantic versioning: http://semver.org + + +Macros +------ + +.. c:macro:: UV_VERSION_MAJOR + + libuv version's major number. + +.. c:macro:: UV_VERSION_MINOR + + libuv version's minor number. + +.. c:macro:: UV_VERSION_PATCH + + libuv version's patch number. + +.. c:macro:: UV_VERSION_IS_RELEASE + + Set to 1 to indicate a release version of libuv, 0 for a development + snapshot. + +.. c:macro:: UV_VERSION_SUFFIX + + libuv version suffix. Certain development releases such as Release Candidates + might have a suffix such as "rc". + +.. c:macro:: UV_VERSION_HEX + + Returns the libuv version packed into a single integer. 8 bits are used for + each component, with the patch number stored in the 8 least significant + bits. E.g. for libuv 1.2.3 this would be 0x010203. + + .. versionadded:: 1.7.0 + + +Functions +--------- + +.. c:function:: unsigned int uv_version(void) + + Returns :c:macro:`UV_VERSION_HEX`. + +.. c:function:: const char* uv_version_string(void) + + Returns the libuv version number as a string. For non-release versions the + version suffix is included. diff --git a/deps/uv/include/uv-version.h b/deps/uv/include/uv-version.h index 3372212c8c7..90f2ce1f67a 100644 --- a/deps/uv/include/uv-version.h +++ b/deps/uv/include/uv-version.h @@ -31,9 +31,13 @@ */ #define UV_VERSION_MAJOR 1 -#define UV_VERSION_MINOR 6 -#define UV_VERSION_PATCH 1 +#define UV_VERSION_MINOR 7 +#define UV_VERSION_PATCH 3 #define UV_VERSION_IS_RELEASE 1 #define UV_VERSION_SUFFIX "" +#define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \ + (UV_VERSION_MINOR << 8) | \ + (UV_VERSION_PATCH)) + #endif /* UV_VERSION_H */ diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h index 564af5fad60..f96026b603d 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h @@ -406,7 +406,10 @@ struct uv_shutdown_s { /* private */ \ uv_close_cb close_cb; \ void* handle_queue[2]; \ - void* reserved[4]; \ + union { \ + int fd; \ + void* reserved[4]; \ + } u; \ UV_HANDLE_PRIVATE_FIELDS \ /* The abstract base class of all handles. */ @@ -504,6 +507,7 @@ struct uv_tcp_s { }; UV_EXTERN int uv_tcp_init(uv_loop_t*, uv_tcp_t* handle); +UV_EXTERN int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags); UV_EXTERN int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock); UV_EXTERN int uv_tcp_nodelay(uv_tcp_t* handle, int enable); UV_EXTERN int uv_tcp_keepalive(uv_tcp_t* handle, @@ -594,6 +598,7 @@ struct uv_udp_send_s { }; UV_EXTERN int uv_udp_init(uv_loop_t*, uv_udp_t* handle); +UV_EXTERN int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, unsigned int flags); UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock); UV_EXTERN int uv_udp_bind(uv_udp_t* handle, const struct sockaddr* addr, diff --git a/deps/uv/libuv.nsi b/deps/uv/libuv.nsi new file mode 100644 index 00000000000..159756e196c --- /dev/null +++ b/deps/uv/libuv.nsi @@ -0,0 +1,86 @@ +; NSIS installer script for libuv + +!include "MUI2.nsh" + +Name "libuv" +OutFile "libuv-${ARCH}-${VERSION}.exe" + +!include "x64.nsh" +# Default install location, for 32-bit files +InstallDir "$PROGRAMFILES\libuv" + +# Override install and registry locations if this is a 64-bit install. +function .onInit + ${If} ${ARCH} == "x64" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\libuv" + ${EndIf} +functionEnd + +;-------------------------------- +; Installer pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + + +;-------------------------------- +; Uninstaller pages +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +;-------------------------------- +; Languages +!insertmacro MUI_LANGUAGE "English" + +;-------------------------------- +; Installer sections + +Section "Files" SecInstall + SectionIn RO + SetOutPath "$INSTDIR" + File "Release\*.dll" + File "Release\*.lib" + File "LICENSE" + File "README.md" + + SetOutPath "$INSTDIR\include" + File "include\uv.h" + File "include\uv-errno.h" + File "include\uv-threadpool.h" + File "include\uv-version.h" + File "include\uv-win.h" + File "include\tree.h" + + WriteUninstaller "$INSTDIR\Uninstall.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayName" "libuv-${ARCH}-${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "HelpLink" "http://libuv.org/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "URLInfoAbout" "http://libuv.org/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayVersion" "${VERSION}" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "NoModify" "1" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "NoRepair" "1" +SectionEnd + +Section "Uninstall" + Delete "$INSTDIR\libuv.dll" + Delete "$INSTDIR\libuv.lib" + Delete "$INSTDIR\LICENSE" + Delete "$INSTDIR\README.md" + + Delete "$INSTDIR\include\uv.h" + Delete "$INSTDIR\include\uv-errno.h" + Delete "$INSTDIR\include\uv-threadpool.h" + Delete "$INSTDIR\include\uv-version.h" + Delete "$INSTDIR\include\uv-win.h" + Delete "$INSTDIR\include\tree.h" + + Delete "$INSTDIR\Uninstall.exe" + RMDir "$INSTDIR" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" +SectionEnd + diff --git a/deps/uv/src/queue.h b/deps/uv/src/queue.h index fe02b454ead..60c80000385 100644 --- a/deps/uv/src/queue.h +++ b/deps/uv/src/queue.h @@ -16,6 +16,8 @@ #ifndef QUEUE_H_ #define QUEUE_H_ +#include + typedef void *QUEUE[2]; /* Private macros. */ @@ -26,7 +28,7 @@ typedef void *QUEUE[2]; /* Public macros. */ #define QUEUE_DATA(ptr, type, field) \ - ((type *) ((char *) (ptr) - ((char *) &((type *) 0)->field))) + ((type *) ((char *) (ptr) - offsetof(type, field))) #define QUEUE_FOREACH(q, h) \ for ((q) = QUEUE_NEXT(h); (q) != (h); (q) = QUEUE_NEXT(q)) diff --git a/deps/uv/src/threadpool.c b/deps/uv/src/threadpool.c index debaf5ca965..15d719944f1 100644 --- a/deps/uv/src/threadpool.c +++ b/deps/uv/src/threadpool.c @@ -44,6 +44,7 @@ static void uv__req_init(uv_loop_t* loop, static uv_once_t once = UV_ONCE_INIT; static uv_cond_t cond; static uv_mutex_t mutex; +static unsigned int idle_threads; static unsigned int nthreads; static uv_thread_t* threads; static uv_thread_t default_threads[4]; @@ -69,8 +70,11 @@ static void worker(void* arg) { for (;;) { uv_mutex_lock(&mutex); - while (QUEUE_EMPTY(&wq)) + while (QUEUE_EMPTY(&wq)) { + idle_threads += 1; uv_cond_wait(&cond, &mutex); + idle_threads -= 1; + } q = QUEUE_HEAD(&wq); @@ -103,7 +107,8 @@ static void worker(void* arg) { static void post(QUEUE* q) { uv_mutex_lock(&mutex); QUEUE_INSERT_TAIL(&wq, q); - uv_cond_signal(&cond); + if (idle_threads > 0) + uv_cond_signal(&cond); uv_mutex_unlock(&mutex); } diff --git a/deps/uv/src/unix/aix.c b/deps/uv/src/unix/aix.c index a2b0744a047..c90b7e5cb9b 100644 --- a/deps/uv/src/unix/aix.c +++ b/deps/uv/src/unix/aix.c @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -288,182 +289,80 @@ uint64_t uv__hrtime(uv_clocktype_t type) { * and use it in conjunction with PATH environment variable to craft one. */ int uv_exepath(char* buffer, size_t* size) { - ssize_t res; - char cwd[PATH_MAX], cwdl[PATH_MAX]; - char symlink[PATH_MAX], temp_buffer[PATH_MAX]; - char pp[64]; - struct psinfo ps; - int fd; - char **argv; + int res; + char args[PATH_MAX]; + char abspath[PATH_MAX]; + size_t abspath_size; + struct procsinfo pi; if (buffer == NULL || size == NULL || *size == 0) return -EINVAL; - snprintf(pp, sizeof(pp), "/proc/%lu/psinfo", (unsigned long) getpid()); - - fd = open(pp, O_RDONLY); - if (fd < 0) - return fd; - - res = read(fd, &ps, sizeof(ps)); - uv__close(fd); - if (res < 0) - return res; - - if (ps.pr_argv == 0) - return -EINVAL; - - argv = (char **) *((char ***) (intptr_t) ps.pr_argv); - - if ((argv == NULL) || (argv[0] == NULL)) + pi.pi_pid = getpid(); + res = getargs(&pi, sizeof(pi), args, sizeof(args)); + if (res < 0) return -EINVAL; /* - * Three possibilities for argv[0]: + * Possibilities for args: * i) an absolute path such as: /home/user/myprojects/nodejs/node - * ii) a relative path such as: ./node or ./myprojects/nodejs/node + * ii) a relative path such as: ./node or ../myprojects/nodejs/node * iii) a bare filename such as "node", after exporting PATH variable * to its location. */ - /* case #1, absolute path. */ - if (argv[0][0] == '/') { - snprintf(symlink, PATH_MAX-1, "%s", argv[0]); - - /* This could or could not be a symlink. */ - res = readlink(symlink, temp_buffer, PATH_MAX-1); - - /* if readlink fails, it is a normal file just copy symlink to the - * output buffer. - */ - if (res < 0) { - assert(*size > strlen(symlink)); - strcpy(buffer, symlink); - - /* If it is a link, the resolved filename is again a relative path, - * make it absolute. - */ - } else { - assert(*size > (strlen(symlink) + 1 + strlen(temp_buffer))); - snprintf(buffer, *size-1, "%s/%s", dirname(symlink), temp_buffer); - } - *size = strlen(buffer); - return 0; - - /* case #2, relative path with usage of '.' */ - } else if (argv[0][0] == '.') { - char *relative = strchr(argv[0], '/'); - if (relative == NULL) - return -EINVAL; - - /* Get the current working directory to resolve the relative path. */ - snprintf(cwd, PATH_MAX-1, "/proc/%lu/cwd", (unsigned long) getpid()); - - /* This is always a symlink, resolve it. */ - res = readlink(cwd, cwdl, sizeof(cwdl) - 1); - if (res < 0) + /* Case i) and ii) absolute or relative paths */ + if (strchr(args, '/') != NULL) { + if (realpath(args, abspath) != abspath) return -errno; - snprintf(symlink, PATH_MAX-1, "%s%s", cwdl, relative + 1); + abspath_size = strlen(abspath); + + *size -= 1; + if (*size > abspath_size) + *size = abspath_size; + + memcpy(buffer, abspath, *size); + buffer[*size] = '\0'; - res = readlink(symlink, temp_buffer, PATH_MAX-1); - if (res < 0) { - assert(*size > strlen(symlink)); - strcpy(buffer, symlink); - } else { - assert(*size > (strlen(symlink) + 1 + strlen(temp_buffer))); - snprintf(buffer, *size-1, "%s/%s", dirname(symlink), temp_buffer); - } - *size = strlen(buffer); return 0; - - /* case #3, relative path without usage of '.', such as invocations in Node test suite. */ - } else if (strchr(argv[0], '/') != NULL) { - /* Get the current working directory to resolve the relative path. */ - snprintf(cwd, PATH_MAX-1, "/proc/%lu/cwd", (unsigned long) getpid()); - - /* This is always a symlink, resolve it. */ - res = readlink(cwd, cwdl, sizeof(cwdl) - 1); - if (res < 0) - return -errno; - - snprintf(symlink, PATH_MAX-1, "%s%s", cwdl, argv[0]); - - res = readlink(symlink, temp_buffer, PATH_MAX-1); - if (res < 0) { - assert(*size > strlen(symlink)); - strcpy(buffer, symlink); - } else { - assert(*size > (strlen(symlink) + 1 + strlen(temp_buffer))); - snprintf(buffer, *size-1, "%s/%s", dirname(symlink), temp_buffer); - } - *size = strlen(buffer); - return 0; - /* Usage of absolute filename with location exported in PATH */ } else { - char clonedpath[8192]; /* assume 8k buffer will fit PATH */ + /* Case iii). Search PATH environment variable */ + char trypath[PATH_MAX]; + char *clonedpath = NULL; char *token = NULL; - struct stat statstruct; - - /* Get the paths. */ char *path = getenv("PATH"); - if(sizeof(clonedpath) <= strlen(path)) + + if (path == NULL) return -EINVAL; - /* Get a local copy. */ - strcpy(clonedpath, path); + clonedpath = uv__strdup(path); + if (clonedpath == NULL) + return -ENOMEM; - /* Tokenize. */ token = strtok(clonedpath, ":"); + while (token != NULL) { + snprintf(trypath, sizeof(trypath) - 1, "%s/%s", token, args); + if (realpath(trypath, abspath) == abspath) { + /* Check the match is executable */ + if (access(abspath, X_OK) == 0) { + abspath_size = strlen(abspath); - /* Get current working directory. (may be required in the loop). */ - snprintf(cwd, PATH_MAX-1, "/proc/%lu/cwd", (unsigned long) getpid()); - res = readlink(cwd, cwdl, sizeof(cwdl) - 1); - if (res < 0) - return -errno; - /* Run through the tokens, append our executable file name with each, - * and see which one succeeds. Exit on first match. */ - while(token != NULL) { - if (token[0] == '.') { - /* Path contains a token relative to current directory. */ - char *relative = strchr(token, '/'); - if (relative != NULL) - /* A path which is not current directory. */ - snprintf(symlink, PATH_MAX-1, "%s%s/%s", cwdl, relative+1, ps.pr_fname); - else - snprintf(symlink, PATH_MAX-1, "%s%s", cwdl, ps.pr_fname); - if (stat(symlink, &statstruct) != -1) { - /* File exists. Resolve if it is a link. */ - res = readlink(symlink, temp_buffer, PATH_MAX-1); - if (res < 0) { - assert(*size > strlen(symlink)); - strcpy(buffer, symlink); - } else { - assert(*size > (strlen(symlink) + 1 + strlen(temp_buffer))); - snprintf(buffer, *size-1, "%s/%s", dirname(symlink), temp_buffer); - } - *size = strlen(buffer); - return 0; - } + *size -= 1; + if (*size > abspath_size) + *size = abspath_size; - /* Absolute path names. */ - } else { - snprintf(symlink, PATH_MAX-1, "%s/%s", token, ps.pr_fname); - if (stat(symlink, &statstruct) != -1) { - res = readlink(symlink, temp_buffer, PATH_MAX-1); - if (res < 0) { - assert(*size > strlen(symlink)); - strcpy(buffer, symlink); - } else { - assert(*size > (strlen(symlink) + 1 + strlen(temp_buffer))); - snprintf(buffer, *size-1, "%s/%s", dirname(symlink), temp_buffer); - } - *size = strlen(buffer); + memcpy(buffer, abspath, *size); + buffer[*size] = '\0'; + + uv__free(clonedpath); return 0; } } token = strtok(NULL, ":"); } + uv__free(clonedpath); + /* Out of tokens (path entries), and no match found */ return -EINVAL; } diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c index 826b4113b2a..e149357e076 100644 --- a/deps/uv/src/unix/core.c +++ b/deps/uv/src/unix/core.c @@ -35,7 +35,7 @@ #include #include #include -#include /* INT_MAX, PATH_MAX */ +#include /* INT_MAX, PATH_MAX, IOV_MAX */ #include /* writev */ #include /* getrusage */ #include @@ -55,13 +55,13 @@ # include #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) # include # include # include # include # define UV__O_CLOEXEC O_CLOEXEC -# if __FreeBSD__ >= 10 +# if defined(__FreeBSD__) && __FreeBSD__ >= 10 # define uv__accept4 accept4 # define UV__SOCK_NONBLOCK SOCK_NONBLOCK # define UV__SOCK_CLOEXEC SOCK_CLOEXEC @@ -199,6 +199,19 @@ void uv__make_close_pending(uv_handle_t* handle) { handle->loop->closing_handles = handle; } +int uv__getiovmax(void) { +#if defined(IOV_MAX) + return IOV_MAX; +#elif defined(_SC_IOV_MAX) + static int iovmax = -1; + if (iovmax == -1) + iovmax = sysconf(_SC_IOV_MAX); + return iovmax; +#else + return 1024; +#endif +} + static void uv__finish_close(uv_handle_t* handle) { /* Note: while the handle is in the UV_CLOSING state now, it's still possible @@ -477,7 +490,7 @@ int uv__close(int fd) { #if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ - defined(_AIX) + defined(_AIX) || defined(__DragonFly__) int uv__nonblock(int fd, int set) { int r; @@ -506,7 +519,8 @@ int uv__cloexec(int fd, int set) { return 0; } -#else /* !(defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) */ +#else /* !(defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ + defined(_AIX) || defined(__DragonFly__)) */ int uv__nonblock(int fd, int set) { int flags; @@ -569,7 +583,8 @@ int uv__cloexec(int fd, int set) { return 0; } -#endif /* defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) */ +#endif /* defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ + defined(_AIX) || defined(__DragonFly__) */ /* This function is not execve-safe, there is a race window @@ -907,7 +922,8 @@ int uv__open_cloexec(const char* path, int flags) { int err; int fd; -#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 9) +#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 9) || \ + defined(__DragonFly__) static int no_cloexec; if (!no_cloexec) { diff --git a/deps/uv/src/unix/freebsd.c b/deps/uv/src/unix/freebsd.c index 44976f7fe2a..c838beb28e9 100644 --- a/deps/uv/src/unix/freebsd.c +++ b/deps/uv/src/unix/freebsd.c @@ -74,6 +74,30 @@ uint64_t uv__hrtime(uv_clocktype_t type) { } +#ifdef __DragonFly__ +int uv_exepath(char* buffer, size_t* size) { + char abspath[PATH_MAX * 2 + 1]; + ssize_t abspath_size; + + if (buffer == NULL || size == NULL || *size == 0) + return -EINVAL; + + abspath_size = readlink("/proc/curproc/file", abspath, sizeof(abspath)); + if (abspath_size < 0) + return -errno; + + assert(abspath_size > 0); + *size -= 1; + + if (*size > abspath_size) + *size = abspath_size; + + memcpy(buffer, abspath, *size); + buffer[*size] = '\0'; + + return 0; +} +#else int uv_exepath(char* buffer, size_t* size) { char abspath[PATH_MAX * 2 + 1]; int mib[4]; @@ -82,19 +106,12 @@ int uv_exepath(char* buffer, size_t* size) { if (buffer == NULL || size == NULL || *size == 0) return -EINVAL; -#ifdef __DragonFly__ - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_ARGS; - mib[3] = getpid(); -#else mib[0] = CTL_KERN; mib[1] = KERN_PROC; mib[2] = KERN_PROC_PATHNAME; mib[3] = -1; -#endif - abspath_size = sizeof abspath;; + abspath_size = sizeof abspath; if (sysctl(mib, 4, abspath, &abspath_size, NULL, 0)) return -errno; @@ -110,7 +127,7 @@ int uv_exepath(char* buffer, size_t* size) { return 0; } - +#endif uint64_t uv_get_free_memory(void) { int freecount; diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c index 9dab202dd76..52082e9347d 100644 --- a/deps/uv/src/unix/fs.c +++ b/deps/uv/src/unix/fs.c @@ -58,52 +58,63 @@ # include #endif -#define INIT(type) \ +#define INIT(subtype) \ do { \ - uv__req_init((loop), (req), UV_FS); \ - (req)->fs_type = UV_FS_ ## type; \ - (req)->result = 0; \ - (req)->ptr = NULL; \ - (req)->loop = loop; \ - (req)->path = NULL; \ - (req)->new_path = NULL; \ - (req)->cb = (cb); \ + req->type = UV_FS; \ + if (cb != NULL) \ + uv__req_init(loop, req, UV_FS); \ + req->fs_type = UV_FS_ ## subtype; \ + req->result = 0; \ + req->ptr = NULL; \ + req->loop = loop; \ + req->path = NULL; \ + req->new_path = NULL; \ + req->cb = cb; \ } \ while (0) #define PATH \ do { \ - (req)->path = uv__strdup(path); \ - if ((req)->path == NULL) \ - return -ENOMEM; \ + assert(path != NULL); \ + if (cb == NULL) { \ + req->path = path; \ + } else { \ + req->path = uv__strdup(path); \ + if (req->path == NULL) \ + return -ENOMEM; \ + } \ } \ while (0) #define PATH2 \ do { \ - size_t path_len; \ - size_t new_path_len; \ - path_len = strlen((path)) + 1; \ - new_path_len = strlen((new_path)) + 1; \ - (req)->path = uv__malloc(path_len + new_path_len); \ - if ((req)->path == NULL) \ - return -ENOMEM; \ - (req)->new_path = (req)->path + path_len; \ - memcpy((void*) (req)->path, (path), path_len); \ - memcpy((void*) (req)->new_path, (new_path), new_path_len); \ + if (cb == NULL) { \ + req->path = path; \ + req->new_path = new_path; \ + } else { \ + size_t path_len; \ + size_t new_path_len; \ + path_len = strlen(path) + 1; \ + new_path_len = strlen(new_path) + 1; \ + req->path = uv__malloc(path_len + new_path_len); \ + if (req->path == NULL) \ + return -ENOMEM; \ + req->new_path = req->path + path_len; \ + memcpy((void*) req->path, path, path_len); \ + memcpy((void*) req->new_path, new_path, new_path_len); \ + } \ } \ while (0) #define POST \ do { \ - if ((cb) != NULL) { \ - uv__work_submit((loop), &(req)->work_req, uv__fs_work, uv__fs_done); \ + if (cb != NULL) { \ + uv__work_submit(loop, &req->work_req, uv__fs_work, uv__fs_done); \ return 0; \ } \ else { \ - uv__fs_work(&(req)->work_req); \ - uv__fs_done(&(req)->work_req, 0); \ - return (req)->result; \ + uv__fs_work(&req->work_req); \ + return req->result; \ } \ } \ while (0) @@ -309,8 +320,6 @@ static ssize_t uv__fs_read(uv_fs_t* req) { } done: - if (req->bufs != req->bufsml) - uv__free(req->bufs); return result; } @@ -545,7 +554,7 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) { return -1; } -#elif defined(__FreeBSD__) || defined(__APPLE__) +#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__) { off_t len; ssize_t r; @@ -555,7 +564,7 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) { * number of bytes have been sent, we don't consider it an error. */ -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) len = 0; r = sendfile(in_fd, out_fd, req->off, req->bufsml[0].len, NULL, &len, 0); #else @@ -670,9 +679,6 @@ done: pthread_mutex_unlock(&lock); #endif - if (req->bufs != req->bufsml) - uv__free(req->bufs); - return r; } @@ -777,6 +783,47 @@ static int uv__fs_fstat(int fd, uv_stat_t *buf) { } +typedef ssize_t (*uv__fs_buf_iter_processor)(uv_fs_t* req); +static ssize_t uv__fs_buf_iter(uv_fs_t* req, uv__fs_buf_iter_processor process) { + unsigned int iovmax; + unsigned int nbufs; + uv_buf_t* bufs; + ssize_t total; + ssize_t result; + + iovmax = uv__getiovmax(); + nbufs = req->nbufs; + bufs = req->bufs; + total = 0; + + while (nbufs > 0) { + req->nbufs = nbufs; + if (req->nbufs > iovmax) + req->nbufs = iovmax; + + result = process(req); + if (result <= 0) { + if (total == 0) + total = result; + break; + } + + if (req->off >= 0) + req->off += result; + + req->bufs += req->nbufs; + nbufs -= req->nbufs; + total += result; + } + + if (bufs != req->bufsml) + uv__free(bufs); + req->bufs = NULL; + + return total; +} + + static void uv__fs_work(struct uv__work* w) { int retry_on_eintr; uv_fs_t* req; @@ -810,7 +857,7 @@ static void uv__fs_work(struct uv__work* w) { X(MKDIR, mkdir(req->path, req->mode)); X(MKDTEMP, uv__fs_mkdtemp(req)); X(OPEN, uv__fs_open(req)); - X(READ, uv__fs_read(req)); + X(READ, uv__fs_buf_iter(req, uv__fs_read)); X(SCANDIR, uv__fs_scandir(req)); X(READLINK, uv__fs_readlink(req)); X(RENAME, rename(req->path, req->new_path)); @@ -820,7 +867,7 @@ static void uv__fs_work(struct uv__work* w) { X(SYMLINK, symlink(req->path, req->new_path)); X(UNLINK, unlink(req->path)); X(UTIME, uv__fs_utime(req)); - X(WRITE, uv__fs_write(req)); + X(WRITE, uv__fs_buf_iter(req, uv__fs_write)); default: abort(); } #undef X @@ -850,8 +897,7 @@ static void uv__fs_done(struct uv__work* w, int status) { req->result = -ECANCELED; } - if (req->cb != NULL) - req->cb(req); + req->cb(req); } @@ -1035,6 +1081,9 @@ int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, unsigned int nbufs, int64_t off, uv_fs_cb cb) { + if (bufs == NULL || nbufs == 0) + return -EINVAL; + INIT(READ); req->file = file; @@ -1157,6 +1206,9 @@ int uv_fs_write(uv_loop_t* loop, unsigned int nbufs, int64_t off, uv_fs_cb cb) { + if (bufs == NULL || nbufs == 0) + return -EINVAL; + INIT(WRITE); req->file = file; @@ -1176,7 +1228,14 @@ int uv_fs_write(uv_loop_t* loop, void uv_fs_req_cleanup(uv_fs_t* req) { - uv__free((void*)req->path); + /* Only necessary for asychronous requests, i.e., requests with a callback. + * Synchronous ones don't copy their arguments and have req->path and + * req->new_path pointing to user-owned memory. UV_FS_MKDTEMP is the + * exception to the rule, it always allocates memory. + */ + if (req->path != NULL && (req->cb != NULL || req->fs_type == UV_FS_MKDTEMP)) + uv__free((void*) req->path); /* Memory is shared with req->new_path. */ + req->path = NULL; req->new_path = NULL; diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h index c31e54992d3..741fa57d69c 100644 --- a/deps/uv/src/unix/internal.h +++ b/deps/uv/src/unix/internal.h @@ -172,6 +172,7 @@ int uv__socket(int domain, int type, int protocol); int uv__dup(int fd); ssize_t uv__recvmsg(int fd, struct msghdr *msg, int flags); void uv__make_close_pending(uv_handle_t* handle); +int uv__getiovmax(void); void uv__io_init(uv__io_t* w, uv__io_cb cb, int fd); void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events); diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c index 424236a6ef5..495f20d285f 100644 --- a/deps/uv/src/unix/kqueue.c +++ b/deps/uv/src/unix/kqueue.c @@ -379,6 +379,10 @@ int uv_fs_event_start(uv_fs_event_t* handle, if (!(statbuf.st_mode & S_IFDIR)) goto fallback; + /* The fallback fd is no longer needed */ + uv__close(fd); + handle->event_watcher.fd = -1; + return uv__fsevents_init(handle); fallback: @@ -406,8 +410,12 @@ int uv_fs_event_stop(uv_fs_event_t* handle) { uv__free(handle->path); handle->path = NULL; - uv__close(handle->event_watcher.fd); - handle->event_watcher.fd = -1; + if (handle->event_watcher.fd != -1) { + /* When FSEvents is used, we don't use the event_watcher's fd under certain + * confitions. (see uv_fs_event_start) */ + uv__close(handle->event_watcher.fd); + handle->event_watcher.fd = -1; + } return 0; } diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c index aa9146bf9aa..92e96f09ed0 100644 --- a/deps/uv/src/unix/loop.c +++ b/deps/uv/src/unix/loop.c @@ -63,24 +63,44 @@ int uv_loop_init(uv_loop_t* loop) { if (err) return err; - uv_signal_init(loop, &loop->child_watcher); + err = uv_signal_init(loop, &loop->child_watcher); + if (err) + goto fail_signal_init; + uv__handle_unref(&loop->child_watcher); loop->child_watcher.flags |= UV__HANDLE_INTERNAL; QUEUE_INIT(&loop->process_handles); - if (uv_rwlock_init(&loop->cloexec_lock)) - abort(); + err = uv_rwlock_init(&loop->cloexec_lock); + if (err) + goto fail_rwlock_init; - if (uv_mutex_init(&loop->wq_mutex)) - abort(); + err = uv_mutex_init(&loop->wq_mutex); + if (err) + goto fail_mutex_init; - if (uv_async_init(loop, &loop->wq_async, uv__work_done)) - abort(); + err = uv_async_init(loop, &loop->wq_async, uv__work_done); + if (err) + goto fail_async_init; uv__handle_unref(&loop->wq_async); loop->wq_async.flags |= UV__HANDLE_INTERNAL; return 0; + +fail_async_init: + uv_mutex_destroy(&loop->wq_mutex); + +fail_mutex_init: + uv_rwlock_destroy(&loop->cloexec_lock); + +fail_rwlock_init: + uv__signal_loop_cleanup(loop); + +fail_signal_init: + uv__platform_loop_delete(loop); + + return err; } diff --git a/deps/uv/src/unix/pthread-fixes.c b/deps/uv/src/unix/pthread-fixes.c index dc54f35d60a..3a71eb5aae7 100644 --- a/deps/uv/src/unix/pthread-fixes.c +++ b/deps/uv/src/unix/pthread-fixes.c @@ -35,6 +35,7 @@ * */ #include #include +#include int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset) { static int workaround; diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c index 7ad1658cf8d..183b68cf716 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -391,6 +391,9 @@ int uv__stream_open(uv_stream_t* stream, int fd, int flags) { int enable; #endif + if (!(stream->io_watcher.fd == -1 || stream->io_watcher.fd == fd)) + return -EBUSY; + assert(fd >= 0); stream->flags |= flags; @@ -736,19 +739,6 @@ static int uv__handle_fd(uv_handle_t* handle) { } } -static int uv__getiovmax() { -#if defined(IOV_MAX) - return IOV_MAX; -#elif defined(_SC_IOV_MAX) - static int iovmax = -1; - if (iovmax == -1) - iovmax = sysconf(_SC_IOV_MAX); - return iovmax; -#else - return 1024; -#endif -} - static void uv__write(uv_stream_t* stream) { struct iovec* iov; QUEUE* q; @@ -819,7 +809,17 @@ start: do { n = sendmsg(uv__stream_fd(stream), &msg, 0); } +#if defined(__APPLE__) + /* + * Due to a possible kernel bug at least in OS X 10.10 "Yosemite", + * EPROTOTYPE can be returned while trying to write to a socket that is + * shutting down. If we retry the write, we should get the expected EPIPE + * instead. + */ + while (n == -1 && (errno == EINTR || errno == EPROTOTYPE)); +#else while (n == -1 && errno == EINTR); +#endif } else { do { if (iovcnt == 1) { @@ -828,7 +828,17 @@ start: n = writev(uv__stream_fd(stream), iov, iovcnt); } } +#if defined(__APPLE__) + /* + * Due to a possible kernel bug at least in OS X 10.10 "Yosemite", + * EPROTOTYPE can be returned while trying to write to a socket that is + * shutting down. If we retry the write, we should get the expected EPIPE + * instead. + */ + while (n == -1 && (errno == EINTR || errno == EPROTOTYPE)); +#else while (n == -1 && errno == EINTR); +#endif } if (n < 0) { diff --git a/deps/uv/src/unix/tcp.c b/deps/uv/src/unix/tcp.c index 4060e7bd709..6d213a49778 100644 --- a/deps/uv/src/unix/tcp.c +++ b/deps/uv/src/unix/tcp.c @@ -28,18 +28,14 @@ #include -int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* tcp) { - uv__stream_init(loop, (uv_stream_t*)tcp, UV_TCP); - return 0; -} - - static int maybe_new_socket(uv_tcp_t* handle, int domain, int flags) { int sockfd; int err; - if (uv__stream_fd(handle) != -1) + if (domain == AF_UNSPEC || uv__stream_fd(handle) != -1) { + handle->flags |= flags; return 0; + } err = uv__socket(domain, SOCK_STREAM, 0); if (err < 0) @@ -56,6 +52,40 @@ static int maybe_new_socket(uv_tcp_t* handle, int domain, int flags) { } +int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) { + int domain; + + /* Use the lower 8 bits for the domain */ + domain = flags & 0xFF; + if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) + return -EINVAL; + + if (flags & ~0xFF) + return -EINVAL; + + uv__stream_init(loop, (uv_stream_t*)tcp, UV_TCP); + + /* If anything fails beyond this point we need to remove the handle from + * the handle queue, since it was added by uv__handle_init in uv_stream_init. + */ + + if (domain != AF_UNSPEC) { + int err = maybe_new_socket(tcp, domain, 0); + if (err) { + QUEUE_REMOVE(&tcp->handle_queue); + return err; + } + } + + return 0; +} + + +int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* tcp) { + return uv_tcp_init_ex(loop, tcp, AF_UNSPEC); +} + + int uv__tcp_bind(uv_tcp_t* tcp, const struct sockaddr* addr, unsigned int addrlen, @@ -91,8 +121,13 @@ int uv__tcp_bind(uv_tcp_t* tcp, #endif errno = 0; - if (bind(tcp->io_watcher.fd, addr, addrlen) && errno != EADDRINUSE) + if (bind(tcp->io_watcher.fd, addr, addrlen) && errno != EADDRINUSE) { + if (errno == EAFNOSUPPORT) + /* OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a + * socket created with AF_INET to an AF_INET6 address or vice versa. */ + return -EINVAL; return -errno; + } tcp->delayed_error = -errno; if (addr->sa_family == AF_INET6) diff --git a/deps/uv/src/unix/tty.c b/deps/uv/src/unix/tty.c index 7783548a6e9..54c9055a08a 100644 --- a/deps/uv/src/unix/tty.c +++ b/deps/uv/src/unix/tty.c @@ -51,8 +51,6 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) { flags = 0; newfd = -1; - uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY); - /* Reopen the file descriptor when it refers to a tty. This lets us put the * tty in non-blocking mode without affecting other processes that share it * with us. @@ -89,11 +87,18 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) { } skip: + uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY); + + /* If anything fails beyond this point we need to remove the handle from + * the handle queue, since it was added by uv__handle_init in uv_stream_init. + */ + #if defined(__APPLE__) r = uv__stream_try_select((uv_stream_t*) tty, &fd); if (r) { if (newfd != -1) uv__close(newfd); + QUEUE_REMOVE(&tty->handle_queue); return r; } #endif diff --git a/deps/uv/src/unix/udp.c b/deps/uv/src/unix/udp.c index f85ab1473a9..66ecc4e341b 100644 --- a/deps/uv/src/unix/udp.c +++ b/deps/uv/src/unix/udp.c @@ -321,6 +321,10 @@ int uv__udp_bind(uv_udp_t* handle, if (bind(fd, addr, addrlen)) { err = -errno; + if (errno == EAFNOSUPPORT) + /* OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a + * socket created with AF_INET to an AF_INET6 address or vice versa. */ + err = -EINVAL; goto out; } @@ -551,25 +555,51 @@ static int uv__udp_set_membership6(uv_udp_t* handle, } -int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) { +int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) { + int domain; + int err; + int fd; + + /* Use the lower 8 bits for the domain */ + domain = flags & 0xFF; + if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) + return -EINVAL; + + if (flags & ~0xFF) + return -EINVAL; + + if (domain != AF_UNSPEC) { + err = uv__socket(domain, SOCK_DGRAM, 0); + if (err < 0) + return err; + fd = err; + } else { + fd = -1; + } + uv__handle_init(loop, (uv_handle_t*)handle, UV_UDP); handle->alloc_cb = NULL; handle->recv_cb = NULL; handle->send_queue_size = 0; handle->send_queue_count = 0; - uv__io_init(&handle->io_watcher, uv__udp_io, -1); + uv__io_init(&handle->io_watcher, uv__udp_io, fd); QUEUE_INIT(&handle->write_queue); QUEUE_INIT(&handle->write_completed_queue); return 0; } +int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) { + return uv_udp_init_ex(loop, handle, AF_UNSPEC); +} + + int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) { int err; /* Check for already active socket. */ if (handle->io_watcher.fd != -1) - return -EALREADY; /* FIXME(bnoordhuis) Should be -EBUSY. */ + return -EBUSY; err = uv__nonblock(sock, 1); if (err) @@ -638,6 +668,8 @@ static int uv__setsockopt_maybe_char(uv_udp_t* handle, int val) { #if defined(__sun) || defined(_AIX) char arg = val; +#elif defined(__OpenBSD__) + unsigned char arg = val; #else int arg = val; #endif @@ -672,13 +704,13 @@ int uv_udp_set_ttl(uv_udp_t* handle, int ttl) { * so hardcode the size of these options on this platform, * and use the general uv__setsockopt_maybe_char call on other platforms. */ -#if defined(__sun) || defined(_AIX) +#if defined(__sun) || defined(_AIX) || defined(__OpenBSD__) return uv__setsockopt(handle, IP_TTL, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)); -#endif /* defined(__sun) || defined(_AIX) */ +#endif /* defined(__sun) || defined(_AIX) || defined (__OpenBSD__) */ return uv__setsockopt_maybe_char(handle, IP_TTL, diff --git a/deps/uv/src/uv-common.c b/deps/uv/src/uv-common.c index 77879b9a6c1..675a776bf4a 100644 --- a/deps/uv/src/uv-common.c +++ b/deps/uv/src/uv-common.c @@ -29,7 +29,9 @@ #include /* malloc */ #include /* memset */ -#if !defined(_WIN32) +#if defined(_WIN32) +# include /* malloc */ +#else # include /* if_nametoindex */ #endif @@ -135,14 +137,27 @@ uv_buf_t uv_buf_init(char* base, unsigned int len) { } +static const char* uv__unknown_err_code(int err) { + char buf[32]; + char* copy; + +#ifndef _WIN32 + snprintf(buf, sizeof(buf), "Unknown system error %d", err); +#else + _snprintf(buf, sizeof(buf), "Unknown system error %d", err); +#endif + copy = uv__strdup(buf); + + return copy != NULL ? copy : "Unknown system error"; +} + + #define UV_ERR_NAME_GEN(name, _) case UV_ ## name: return #name; const char* uv_err_name(int err) { switch (err) { UV_ERRNO_MAP(UV_ERR_NAME_GEN) - default: - assert(0); - return NULL; } + return uv__unknown_err_code(err); } #undef UV_ERR_NAME_GEN @@ -151,9 +166,8 @@ const char* uv_err_name(int err) { const char* uv_strerror(int err) { switch (err) { UV_ERRNO_MAP(UV_STRERROR_GEN) - default: - return "Unknown system error"; } + return uv__unknown_err_code(err); } #undef UV_STRERROR_GEN diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h index 8258d7a1387..b348ec76bd5 100644 --- a/deps/uv/src/uv-common.h +++ b/deps/uv/src/uv-common.h @@ -196,7 +196,7 @@ void uv__fs_scandir_cleanup(uv_fs_t* req); (((h)->flags & UV__HANDLE_REF) != 0) #if defined(_WIN32) -# define uv__handle_platform_init(h) +# define uv__handle_platform_init(h) ((h)->u.fd = -1) #else # define uv__handle_platform_init(h) ((h)->next_closing = NULL) #endif diff --git a/deps/uv/src/version.c b/deps/uv/src/version.c index ff91a460904..686dedd98d6 100644 --- a/deps/uv/src/version.c +++ b/deps/uv/src/version.c @@ -21,10 +21,6 @@ #include "uv.h" -#define UV_VERSION ((UV_VERSION_MAJOR << 16) | \ - (UV_VERSION_MINOR << 8) | \ - (UV_VERSION_PATCH)) - #define UV_STRINGIFY(v) UV_STRINGIFY_HELPER(v) #define UV_STRINGIFY_HELPER(v) #v @@ -40,7 +36,7 @@ unsigned int uv_version(void) { - return UV_VERSION; + return UV_VERSION_HEX; } diff --git a/deps/uv/src/win/core.c b/deps/uv/src/win/core.c index 115449224f9..de0483e1023 100644 --- a/deps/uv/src/win/core.c +++ b/deps/uv/src/win/core.c @@ -124,6 +124,8 @@ static void uv_init(void) { int uv_loop_init(uv_loop_t* loop) { + int err; + /* Initialize libuv itself first */ uv__once_init(); @@ -165,16 +167,27 @@ int uv_loop_init(uv_loop_t* loop) { loop->timer_counter = 0; loop->stop_flag = 0; - if (uv_mutex_init(&loop->wq_mutex)) - abort(); + err = uv_mutex_init(&loop->wq_mutex); + if (err) + goto fail_mutex_init; - if (uv_async_init(loop, &loop->wq_async, uv__work_done)) - abort(); + err = uv_async_init(loop, &loop->wq_async, uv__work_done); + if (err) + goto fail_async_init; uv__handle_unref(&loop->wq_async); loop->wq_async.flags |= UV__HANDLE_INTERNAL; return 0; + +fail_async_init: + uv_mutex_destroy(&loop->wq_mutex); + +fail_mutex_init: + CloseHandle(loop->iocp); + loop->iocp = INVALID_HANDLE_VALUE; + + return err; } diff --git a/deps/uv/src/win/fs-event.c b/deps/uv/src/win/fs-event.c index eb205d3921d..ba68f78c82a 100644 --- a/deps/uv/src/win/fs-event.c +++ b/deps/uv/src/win/fs-event.c @@ -43,7 +43,7 @@ static void uv_fs_event_queue_readdirchanges(uv_loop_t* loop, if (!ReadDirectoryChangesW(handle->dir_handle, handle->buffer, uv_directory_watcher_buffer_size, - FALSE, + (handle->flags & UV_FS_EVENT_RECURSIVE) ? TRUE : FALSE, FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | @@ -63,6 +63,20 @@ static void uv_fs_event_queue_readdirchanges(uv_loop_t* loop, handle->req_pending = 1; } +static int uv_relative_path(const WCHAR* filename, + const WCHAR* dir, + WCHAR** relpath) { + int dirlen = wcslen(dir); + int filelen = wcslen(filename); + if (dir[dirlen - 1] == '\\') + dirlen--; + *relpath = uv__malloc((MAX_PATH + 1) * sizeof(WCHAR)); + if (!*relpath) + uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); + wcsncpy(*relpath, filename + dirlen + 1, filelen - dirlen - 1); + (*relpath)[filelen - dirlen - 1] = L'\0'; + return 0; +} static int uv_split_path(const WCHAR* filename, WCHAR** dir, WCHAR** file) { @@ -237,7 +251,7 @@ int uv_fs_event_start(uv_fs_event_t* handle, if (!ReadDirectoryChangesW(handle->dir_handle, handle->buffer, uv_directory_watcher_buffer_size, - FALSE, + (flags & UV_FS_EVENT_RECURSIVE) ? TRUE : FALSE, FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | @@ -410,7 +424,9 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req, if (long_filenamew) { /* Get the file name out of the long path. */ - result = uv_split_path(long_filenamew, NULL, &filenamew); + result = uv_relative_path(long_filenamew, + handle->dirw, + &filenamew); uv__free(long_filenamew); if (result == 0) { diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index 00d0197a541..4a17573113f 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -116,8 +116,8 @@ void uv_fs_init() { } -INLINE static int fs__capture_path(uv_loop_t* loop, uv_fs_t* req, - const char* path, const char* new_path, const int copy_path) { +INLINE static int fs__capture_path(uv_fs_t* req, const char* path, + const char* new_path, const int copy_path) { char* buf; char* pos; ssize_t buf_sz = 0, path_len, pathw_len = 0, new_pathw_len = 0; @@ -528,7 +528,11 @@ void fs__close(uv_fs_t* req) { VERIFY_FD(fd, req); - result = _close(fd); + if (fd > 2) + result = _close(fd); + else + result = 0; + SET_REQ_RESULT(req, result); } @@ -821,7 +825,11 @@ void fs__scandir(uv_fs_t* req) { * A file name is at most 256 WCHARs long. * According to MSDN, the buffer must be aligned at an 8-byte boundary. */ +#if _MSC_VER __declspec(align(8)) char buffer[8192]; +#else + __attribute__ ((aligned (8))) char buffer[8192]; +#endif STATIC_ASSERT(sizeof buffer >= sizeof(FILE_DIRECTORY_INFORMATION) + 256 * sizeof(WCHAR)); @@ -1754,8 +1762,7 @@ static void uv__fs_done(struct uv__work* w, int status) { req->result = UV_ECANCELED; } - if (req->cb != NULL) - req->cb(req); + req->cb(req); } @@ -1784,7 +1791,7 @@ int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_req_init(loop, req, UV_FS_OPEN, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -1823,6 +1830,9 @@ int uv_fs_read(uv_loop_t* loop, unsigned int nbufs, int64_t offset, uv_fs_cb cb) { + if (bufs == NULL || nbufs == 0) + return UV_EINVAL; + uv_fs_req_init(loop, req, UV_FS_READ, cb); req->file.fd = fd; @@ -1856,6 +1866,9 @@ int uv_fs_write(uv_loop_t* loop, unsigned int nbufs, int64_t offset, uv_fs_cb cb) { + if (bufs == NULL || nbufs == 0) + return UV_EINVAL; + uv_fs_req_init(loop, req, UV_FS_WRITE, cb); req->file.fd = fd; @@ -1888,7 +1901,7 @@ int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_req_init(loop, req, UV_FS_UNLINK, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -1909,7 +1922,7 @@ int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_req_init(loop, req, UV_FS_MKDIR, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -1932,7 +1945,7 @@ int uv_fs_mkdtemp(uv_loop_t* loop, uv_fs_t* req, const char* tpl, uv_fs_req_init(loop, req, UV_FS_MKDTEMP, cb); - err = fs__capture_path(loop, req, tpl, NULL, TRUE); + err = fs__capture_path(req, tpl, NULL, TRUE); if (err) return uv_translate_sys_error(err); @@ -1951,7 +1964,7 @@ int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { uv_fs_req_init(loop, req, UV_FS_RMDIR, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -1972,7 +1985,7 @@ int uv_fs_scandir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_req_init(loop, req, UV_FS_SCANDIR, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -1995,7 +2008,7 @@ int uv_fs_link(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_req_init(loop, req, UV_FS_LINK, cb); - err = fs__capture_path(loop, req, path, new_path, cb != NULL); + err = fs__capture_path(req, path, new_path, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2016,7 +2029,7 @@ int uv_fs_symlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_req_init(loop, req, UV_FS_SYMLINK, cb); - err = fs__capture_path(loop, req, path, new_path, cb != NULL); + err = fs__capture_path(req, path, new_path, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2039,7 +2052,7 @@ int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_req_init(loop, req, UV_FS_READLINK, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2060,7 +2073,7 @@ int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_fs_req_init(loop, req, UV_FS_CHOWN, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2094,7 +2107,7 @@ int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { uv_fs_req_init(loop, req, UV_FS_STAT, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2114,7 +2127,7 @@ int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) { uv_fs_req_init(loop, req, UV_FS_LSTAT, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2149,7 +2162,7 @@ int uv_fs_rename(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_req_init(loop, req, UV_FS_RENAME, cb); - err = fs__capture_path(loop, req, path, new_path, cb != NULL); + err = fs__capture_path(req, path, new_path, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2238,7 +2251,7 @@ int uv_fs_access(uv_loop_t* loop, uv_fs_req_init(loop, req, UV_FS_ACCESS, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) return uv_translate_sys_error(err); @@ -2260,7 +2273,7 @@ int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_req_init(loop, req, UV_FS_CHMOD, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } @@ -2300,7 +2313,7 @@ int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, uv_fs_req_init(loop, req, UV_FS_UTIME, cb); - err = fs__capture_path(loop, req, path, NULL, cb != NULL); + err = fs__capture_path(req, path, NULL, cb != NULL); if (err) { return uv_translate_sys_error(err); } diff --git a/deps/uv/src/win/internal.h b/deps/uv/src/win/internal.h index 04b2a548ca8..8d4081bdb51 100644 --- a/deps/uv/src/win/internal.h +++ b/deps/uv/src/win/internal.h @@ -64,7 +64,7 @@ extern UV_THREAD_LOCAL int uv__crt_assert_enabled; /* Used by all handles. */ #define UV_HANDLE_CLOSED 0x00000002 -#define UV_HANDLE_ENDGAME_QUEUED 0x00000004 +#define UV_HANDLE_ENDGAME_QUEUED 0x00000008 /* uv-common.h: #define UV__HANDLE_CLOSING 0x00000001 */ /* uv-common.h: #define UV__HANDLE_ACTIVE 0x00000040 */ @@ -76,7 +76,6 @@ extern UV_THREAD_LOCAL int uv__crt_assert_enabled; #define UV_HANDLE_BOUND 0x00000200 #define UV_HANDLE_LISTENING 0x00000800 #define UV_HANDLE_CONNECTION 0x00001000 -#define UV_HANDLE_CONNECTED 0x00002000 #define UV_HANDLE_READABLE 0x00008000 #define UV_HANDLE_WRITABLE 0x00010000 #define UV_HANDLE_READ_PENDING 0x00020000 diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c index d232efae3aa..8312b1ceb95 100644 --- a/deps/uv/src/win/pipe.c +++ b/deps/uv/src/win/pipe.c @@ -180,6 +180,18 @@ static HANDLE open_named_pipe(const WCHAR* name, DWORD* duplex_flags) { } +static void close_pipe(uv_pipe_t* pipe) { + assert(pipe->u.fd == -1 || pipe->u.fd > 2); + if (pipe->u.fd == -1) + CloseHandle(pipe->handle); + else + close(pipe->u.fd); + + pipe->u.fd = -1; + pipe->handle = INVALID_HANDLE_VALUE; +} + + int uv_stdio_pipe_server(uv_loop_t* loop, uv_pipe_t* handle, DWORD access, char* name, size_t nameSize) { HANDLE pipeHandle; @@ -233,6 +245,7 @@ int uv_stdio_pipe_server(uv_loop_t* loop, uv_pipe_t* handle, DWORD access, static int uv_set_pipe_handle(uv_loop_t* loop, uv_pipe_t* handle, HANDLE pipeHandle, + int fd, DWORD duplex_flags) { NTSTATUS nt_status; IO_STATUS_BLOCK io_status; @@ -241,6 +254,10 @@ static int uv_set_pipe_handle(uv_loop_t* loop, DWORD current_mode = 0; DWORD err = 0; + if (!(handle->flags & UV_HANDLE_PIPESERVER) && + handle->handle != INVALID_HANDLE_VALUE) + return UV_EBUSY; + if (!SetNamedPipeHandleState(pipeHandle, &mode, NULL, NULL)) { err = GetLastError(); if (err == ERROR_ACCESS_DENIED) { @@ -292,6 +309,7 @@ static int uv_set_pipe_handle(uv_loop_t* loop, } handle->handle = pipeHandle; + handle->u.fd = fd; handle->flags |= duplex_flags; return 0; @@ -454,6 +472,8 @@ void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle) { void uv_pipe_pending_instances(uv_pipe_t* handle, int count) { + if (handle->flags & UV_HANDLE_BOUND) + return; handle->pipe.serv.pending_instances = count; handle->flags |= UV_HANDLE_PIPESERVER; } @@ -527,6 +547,7 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { if (uv_set_pipe_handle(loop, handle, handle->pipe.serv.accept_reqs[0].pipeHandle, + -1, 0)) { err = GetLastError(); goto error; @@ -580,7 +601,7 @@ static DWORD WINAPI pipe_connect_thread_proc(void* parameter) { } if (pipeHandle != INVALID_HANDLE_VALUE && - !uv_set_pipe_handle(loop, handle, pipeHandle, duplex_flags)) { + !uv_set_pipe_handle(loop, handle, pipeHandle, -1, duplex_flags)) { SET_REQ_SUCCESS(req); } else { SET_REQ_ERROR(req, GetLastError()); @@ -643,6 +664,7 @@ void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle, if (uv_set_pipe_handle(loop, (uv_pipe_t*) req->handle, pipeHandle, + -1, duplex_flags)) { err = GetLastError(); goto error; @@ -729,6 +751,7 @@ void uv_pipe_cleanup(uv_loop_t* loop, uv_pipe_t* handle) { handle->pipe.serv.accept_reqs[i].pipeHandle = INVALID_HANDLE_VALUE; } } + handle->handle = INVALID_HANDLE_VALUE; } if (handle->flags & UV_HANDLE_CONNECTION) { @@ -737,11 +760,8 @@ void uv_pipe_cleanup(uv_loop_t* loop, uv_pipe_t* handle) { } if ((handle->flags & UV_HANDLE_CONNECTION) - && handle->handle != INVALID_HANDLE_VALUE) { - CloseHandle(handle->handle); - handle->handle = INVALID_HANDLE_VALUE; - } - + && handle->handle != INVALID_HANDLE_VALUE) + close_pipe(handle); } @@ -786,7 +806,7 @@ static void uv_pipe_queue_accept(uv_loop_t* loop, uv_pipe_t* handle, return; } - if (uv_set_pipe_handle(loop, handle, req->pipeHandle, 0)) { + if (uv_set_pipe_handle(loop, handle, req->pipeHandle, -1, 0)) { CloseHandle(req->pipeHandle); req->pipeHandle = INVALID_HANDLE_VALUE; SET_REQ_ERROR(req, GetLastError()); @@ -1770,8 +1790,7 @@ void uv_process_pipe_shutdown_req(uv_loop_t* loop, uv_pipe_t* handle, } else { /* This pipe is not readable. We can just close it to let the other end */ /* know that we're done writing. */ - CloseHandle(handle->handle); - handle->handle = INVALID_HANDLE_VALUE; + close_pipe(handle); } if (req->cb) { @@ -1838,8 +1857,7 @@ static void eof_timer_cb(uv_timer_t* timer) { } /* Force both ends off the pipe. */ - CloseHandle(pipe->handle); - pipe->handle = INVALID_HANDLE_VALUE; + close_pipe(pipe); /* Stop reading, so the pending read that is going to fail will */ /* not be reported to the user. */ @@ -1874,6 +1892,27 @@ int uv_pipe_open(uv_pipe_t* pipe, uv_file file) { FILE_ACCESS_INFORMATION access; DWORD duplex_flags = 0; + if (os_handle == INVALID_HANDLE_VALUE) + return UV_EBADF; + + /* In order to avoid closing a stdio file descriptor 0-2, duplicate the + * underlying OS handle and forget about the original fd. + * We could also opt to use the original OS handle and just never close it, + * but then there would be no reliable way to cancel pending read operations + * upon close. + */ + if (file <= 2) { + if (!DuplicateHandle(INVALID_HANDLE_VALUE, + os_handle, + INVALID_HANDLE_VALUE, + &os_handle, + 0, + FALSE, + DUPLICATE_SAME_ACCESS)) + return uv_translate_sys_error(GetLastError()); + file = -1; + } + /* Determine what kind of permissions we have on this handle. * Cygwin opens the pipe in message mode, but we can support it, * just query the access flags and set the stream flags accordingly. @@ -1899,7 +1938,11 @@ int uv_pipe_open(uv_pipe_t* pipe, uv_file file) { duplex_flags |= UV_HANDLE_READABLE; if (os_handle == INVALID_HANDLE_VALUE || - uv_set_pipe_handle(pipe->loop, pipe, os_handle, duplex_flags) == -1) { + uv_set_pipe_handle(pipe->loop, + pipe, + os_handle, + file, + duplex_flags) == -1) { return UV_EINVAL; } diff --git a/deps/uv/src/win/process-stdio.c b/deps/uv/src/win/process-stdio.c index e81f799f0b8..e3c06f57dea 100644 --- a/deps/uv/src/win/process-stdio.c +++ b/deps/uv/src/win/process-stdio.c @@ -407,7 +407,7 @@ int uv__stdio_create(uv_loop_t* loop, stream_handle = ((uv_tty_t*) stream)->handle; crt_flags = FOPEN | FDEV; } else if (stream->type == UV_NAMED_PIPE && - stream->flags & UV_HANDLE_CONNECTED) { + stream->flags & UV_HANDLE_CONNECTION) { stream_handle = ((uv_pipe_t*) stream)->handle; crt_flags = FOPEN | FPIPE; } else { diff --git a/deps/uv/src/win/tcp.c b/deps/uv/src/win/tcp.c index da89f28d161..0f5654863e9 100644 --- a/deps/uv/src/win/tcp.c +++ b/deps/uv/src/win/tcp.c @@ -78,19 +78,27 @@ static int uv__tcp_keepalive(uv_tcp_t* handle, SOCKET socket, int enable, unsign } -static int uv_tcp_set_socket(uv_loop_t* loop, uv_tcp_t* handle, - SOCKET socket, int family, int imported) { +static int uv_tcp_set_socket(uv_loop_t* loop, + uv_tcp_t* handle, + SOCKET socket, + int family, + int imported) { DWORD yes = 1; int non_ifs_lsp; int err; - assert(handle->socket == INVALID_SOCKET); + if (handle->socket != INVALID_SOCKET) + return UV_EBUSY; /* Set the socket to nonblocking mode */ if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) { return WSAGetLastError(); } + /* Make the socket non-inheritable */ + if (!SetHandleInformation((HANDLE) socket, HANDLE_FLAG_INHERIT, 0)) + return GetLastError(); + /* Associate it with the I/O completion port. */ /* Use uv_handle_t pointer as completion key. */ if (CreateIoCompletionPort((HANDLE)socket, @@ -146,9 +154,18 @@ static int uv_tcp_set_socket(uv_loop_t* loop, uv_tcp_t* handle, } -int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle) { - uv_stream_init(loop, (uv_stream_t*) handle, UV_TCP); +int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* handle, unsigned int flags) { + int domain; + /* Use the lower 8 bits for the domain */ + domain = flags & 0xFF; + if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) + return UV_EINVAL; + + if (flags & ~0xFF) + return UV_EINVAL; + + uv_stream_init(loop, (uv_stream_t*) handle, UV_TCP); handle->tcp.serv.accept_reqs = NULL; handle->tcp.serv.pending_accepts = NULL; handle->socket = INVALID_SOCKET; @@ -158,10 +175,39 @@ int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle) { handle->tcp.serv.processed_accepts = 0; handle->delayed_error = 0; + /* If anything fails beyond this point we need to remove the handle from + * the handle queue, since it was added by uv__handle_init in uv_stream_init. + */ + + if (domain != AF_UNSPEC) { + SOCKET sock; + DWORD err; + + sock = socket(domain, SOCK_STREAM, 0); + if (sock == INVALID_SOCKET) { + err = WSAGetLastError(); + QUEUE_REMOVE(&handle->handle_queue); + return uv_translate_sys_error(err); + } + + err = uv_tcp_set_socket(handle->loop, handle, sock, domain, 0); + if (err) { + closesocket(sock); + QUEUE_REMOVE(&handle->handle_queue); + return uv_translate_sys_error(err); + } + + } + return 0; } +int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* handle) { + return uv_tcp_init_ex(loop, handle, AF_UNSPEC); +} + + void uv_tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle) { int err; unsigned int i; @@ -267,13 +313,6 @@ static int uv_tcp_try_bind(uv_tcp_t* handle, return WSAGetLastError(); } - /* Make the socket non-inheritable */ - if (!SetHandleInformation((HANDLE) sock, HANDLE_FLAG_INHERIT, 0)) { - err = GetLastError(); - closesocket(sock); - return err; - } - err = uv_tcp_set_socket(handle->loop, handle, sock, addr->sa_family, 0); if (err) { closesocket(sock); @@ -774,7 +813,7 @@ int uv_tcp_getsockname(const uv_tcp_t* handle, int* namelen) { int result; - if (!(handle->flags & UV_HANDLE_BOUND)) { + if (handle->socket == INVALID_SOCKET) { return UV_EINVAL; } @@ -796,7 +835,7 @@ int uv_tcp_getpeername(const uv_tcp_t* handle, int* namelen) { int result; - if (!(handle->flags & UV_HANDLE_BOUND)) { + if (handle->socket == INVALID_SOCKET) { return UV_EINVAL; } @@ -1165,12 +1204,6 @@ int uv_tcp_import(uv_tcp_t* tcp, uv__ipc_socket_info_ex* socket_info_ex, return WSAGetLastError(); } - if (!SetHandleInformation((HANDLE) socket, HANDLE_FLAG_INHERIT, 0)) { - err = GetLastError(); - closesocket(socket); - return err; - } - err = uv_tcp_set_socket(tcp->loop, tcp, socket, @@ -1426,11 +1459,6 @@ int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) { return uv_translate_sys_error(GetLastError()); } - /* Make the socket non-inheritable */ - if (!SetHandleInformation((HANDLE) sock, HANDLE_FLAG_INHERIT, 0)) { - return uv_translate_sys_error(GetLastError()); - } - err = uv_tcp_set_socket(handle->loop, handle, sock, diff --git a/deps/uv/src/win/thread.c b/deps/uv/src/win/thread.c index e91ae9b1385..d7171fd6902 100644 --- a/deps/uv/src/win/thread.c +++ b/deps/uv/src/win/thread.c @@ -191,6 +191,7 @@ int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) { uv_thread_t uv_thread_self(void) { + uv_once(&uv__current_thread_init_guard, uv__init_current_thread_key); return (uv_thread_t) uv_key_get(&uv__current_thread_key); } diff --git a/deps/uv/src/win/tty.c b/deps/uv/src/win/tty.c index 7b1e4ba0557..c3af02f7f2e 100644 --- a/deps/uv/src/win/tty.c +++ b/deps/uv/src/win/tty.c @@ -55,6 +55,7 @@ #define MAX_INPUT_BUFFER_LENGTH 8192 +static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info); static void uv_tty_update_virtual_window(CONSOLE_SCREEN_BUFFER_INFO* info); @@ -96,6 +97,15 @@ static CRITICAL_SECTION uv_tty_output_lock; static HANDLE uv_tty_output_handle = INVALID_HANDLE_VALUE; +static WORD uv_tty_default_text_attributes = + FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; + +static char uv_tty_default_fg_color = 7; +static char uv_tty_default_bg_color = 0; +static char uv_tty_default_fg_bright = 0; +static char uv_tty_default_bg_bright = 0; +static char uv_tty_default_inverse = 0; + void uv_console_init() { InitializeCriticalSection(&uv_tty_output_lock); @@ -106,9 +116,26 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) { HANDLE handle; CONSOLE_SCREEN_BUFFER_INFO screen_buffer_info; - handle = (HANDLE) _get_osfhandle(fd); - if (handle == INVALID_HANDLE_VALUE) { + handle = (HANDLE) uv__get_osfhandle(fd); + if (handle == INVALID_HANDLE_VALUE) return UV_EBADF; + + if (fd <= 2) { + /* In order to avoid closing a stdio file descriptor 0-2, duplicate the + * underlying OS handle and forget about the original fd. + * We could also opt to use the original OS handle and just never close it, + * but then there would be no reliable way to cancel pending read operations + * upon close. + */ + if (!DuplicateHandle(INVALID_HANDLE_VALUE, + handle, + INVALID_HANDLE_VALUE, + &handle, + 0, + FALSE, + DUPLICATE_SAME_ACCESS)) + return uv_translate_sys_error(GetLastError()); + fd = -1; } if (!readable) { @@ -126,6 +153,9 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) { /* is received. */ uv_tty_output_handle = handle; + /* Remember the original console text attributes. */ + uv_tty_capture_initial_style(&screen_buffer_info); + uv_tty_update_virtual_window(&screen_buffer_info); LeaveCriticalSection(&uv_tty_output_lock); @@ -136,6 +166,7 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) { uv_connection_init((uv_stream_t*) tty); tty->handle = handle; + tty->u.fd = fd; tty->reqs_pending = 0; tty->flags |= UV_HANDLE_BOUND; @@ -170,6 +201,62 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) { } +/* Set the default console text attributes based on how the console was + * configured when libuv started. + */ +static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info) { + static int style_captured = 0; + + /* Only do this once. + /* Assumption: Caller has acquired uv_tty_output_lock. */ + if (style_captured) + return; + + /* Save raw win32 attributes. */ + uv_tty_default_text_attributes = info->wAttributes; + + /* Convert black text on black background to use white text. */ + if (uv_tty_default_text_attributes == 0) + uv_tty_default_text_attributes = 7; + + /* Convert Win32 attributes to ANSI colors. */ + uv_tty_default_fg_color = 0; + uv_tty_default_bg_color = 0; + uv_tty_default_fg_bright = 0; + uv_tty_default_bg_bright = 0; + uv_tty_default_inverse = 0; + + if (uv_tty_default_text_attributes & FOREGROUND_RED) + uv_tty_default_fg_color |= 1; + + if (uv_tty_default_text_attributes & FOREGROUND_GREEN) + uv_tty_default_fg_color |= 2; + + if (uv_tty_default_text_attributes & FOREGROUND_BLUE) + uv_tty_default_fg_color |= 4; + + if (uv_tty_default_text_attributes & BACKGROUND_RED) + uv_tty_default_bg_color |= 1; + + if (uv_tty_default_text_attributes & BACKGROUND_GREEN) + uv_tty_default_bg_color |= 2; + + if (uv_tty_default_text_attributes & BACKGROUND_BLUE) + uv_tty_default_bg_color |= 4; + + if (uv_tty_default_text_attributes & FOREGROUND_INTENSITY) + uv_tty_default_fg_bright = 1; + + if (uv_tty_default_text_attributes & BACKGROUND_INTENSITY) + uv_tty_default_bg_bright = 1; + + if (uv_tty_default_text_attributes & COMMON_LVB_REVERSE_VIDEO) + uv_tty_default_inverse = 1; + + style_captured = 1; +} + + int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { DWORD flags; unsigned char was_reading; @@ -1004,7 +1091,7 @@ static int uv_tty_move_caret(uv_tty_t* handle, int x, unsigned char x_relative, static int uv_tty_reset(uv_tty_t* handle, DWORD* error) { const COORD origin = {0, 0}; - const WORD char_attrs = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; + const WORD char_attrs = uv_tty_default_text_attributes; CONSOLE_SCREEN_BUFFER_INFO info; DWORD count, written; @@ -1160,11 +1247,11 @@ static int uv_tty_set_style(uv_tty_t* handle, DWORD* error) { if (argc == 0) { /* Reset mode */ - fg_color = 7; - bg_color = 0; - fg_bright = 0; - bg_bright = 0; - inverse = 0; + fg_color = uv_tty_default_fg_color; + bg_color = uv_tty_default_bg_color; + fg_bright = uv_tty_default_fg_bright; + bg_bright = uv_tty_default_bg_bright; + inverse = uv_tty_default_inverse; } for (i = 0; i < argc; i++) { @@ -1172,11 +1259,11 @@ static int uv_tty_set_style(uv_tty_t* handle, DWORD* error) { if (arg == 0) { /* Reset mode */ - fg_color = 7; - bg_color = 0; - fg_bright = 0; - bg_bright = 0; - inverse = 0; + fg_color = uv_tty_default_fg_color; + bg_color = uv_tty_default_bg_color; + fg_bright = uv_tty_default_fg_bright; + bg_bright = uv_tty_default_bg_bright; + inverse = uv_tty_default_inverse; } else if (arg == 1) { /* Foreground bright on */ @@ -1213,8 +1300,8 @@ static int uv_tty_set_style(uv_tty_t* handle, DWORD* error) { } else if (arg == 39) { /* Default text color */ - fg_color = 7; - fg_bright = 0; + fg_color = uv_tty_default_fg_color; + fg_bright = uv_tty_default_fg_bright; } else if (arg >= 40 && arg <= 47) { /* Set background color */ @@ -1222,8 +1309,8 @@ static int uv_tty_set_style(uv_tty_t* handle, DWORD* error) { } else if (arg == 49) { /* Default background color */ - bg_color = 0; - bg_bright = 0; + bg_color = uv_tty_default_bg_color; + bg_bright = uv_tty_default_bg_bright; } else if (arg >= 90 && arg <= 97) { /* Set bold foreground color */ @@ -1916,11 +2003,16 @@ void uv_process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle, void uv_tty_close(uv_tty_t* handle) { - CloseHandle(handle->handle); + assert(handle->u.fd == -1 || handle->u.fd > 2); + if (handle->u.fd == -1) + CloseHandle(handle->handle); + else + close(handle->u.fd); if (handle->flags & UV_HANDLE_READING) uv_tty_read_stop(handle); + handle->u.fd = -1; handle->handle = INVALID_HANDLE_VALUE; handle->flags &= ~(UV_HANDLE_READABLE | UV_HANDLE_WRITABLE); uv__handle_closing(handle); diff --git a/deps/uv/src/win/udp.c b/deps/uv/src/win/udp.c index 197e5d828f2..24792ec067e 100644 --- a/deps/uv/src/win/udp.c +++ b/deps/uv/src/win/udp.c @@ -42,7 +42,7 @@ int uv_udp_getsockname(const uv_udp_t* handle, int* namelen) { int result; - if (!(handle->flags & UV_HANDLE_BOUND)) { + if (handle->socket == INVALID_SOCKET) { return UV_EINVAL; } @@ -61,7 +61,8 @@ static int uv_udp_set_socket(uv_loop_t* loop, uv_udp_t* handle, SOCKET socket, WSAPROTOCOL_INFOW info; int opt_len; - assert(handle->socket == INVALID_SOCKET); + if (handle->socket != INVALID_SOCKET) + return UV_EBUSY; /* Set the socket to nonblocking mode */ if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) { @@ -122,9 +123,18 @@ static int uv_udp_set_socket(uv_loop_t* loop, uv_udp_t* handle, SOCKET socket, } -int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) { - uv__handle_init(loop, (uv_handle_t*) handle, UV_UDP); +int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) { + int domain; + /* Use the lower 8 bits for the domain */ + domain = flags & 0xFF; + if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC) + return UV_EINVAL; + + if (flags & ~0xFF) + return UV_EINVAL; + + uv__handle_init(loop, (uv_handle_t*) handle, UV_UDP); handle->socket = INVALID_SOCKET; handle->reqs_pending = 0; handle->activecnt = 0; @@ -132,15 +142,42 @@ int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) { handle->func_wsarecvfrom = WSARecvFrom; handle->send_queue_size = 0; handle->send_queue_count = 0; - uv_req_init(loop, (uv_req_t*) &(handle->recv_req)); handle->recv_req.type = UV_UDP_RECV; handle->recv_req.data = handle; + /* If anything fails beyond this point we need to remove the handle from + * the handle queue, since it was added by uv__handle_init. + */ + + if (domain != AF_UNSPEC) { + SOCKET sock; + DWORD err; + + sock = socket(domain, SOCK_DGRAM, 0); + if (sock == INVALID_SOCKET) { + err = WSAGetLastError(); + QUEUE_REMOVE(&handle->handle_queue); + return uv_translate_sys_error(err); + } + + err = uv_udp_set_socket(handle->loop, handle, sock, domain); + if (err) { + closesocket(sock); + QUEUE_REMOVE(&handle->handle_queue); + return uv_translate_sys_error(err); + } + } + return 0; } +int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) { + return uv_udp_init_ex(loop, handle, AF_UNSPEC); +} + + void uv_udp_close(uv_loop_t* loop, uv_udp_t* handle) { uv_udp_recv_stop(handle); closesocket(handle->socket); @@ -190,25 +227,24 @@ static int uv_udp_maybe_bind(uv_udp_t* handle, closesocket(sock); return err; } - - if (flags & UV_UDP_REUSEADDR) { - DWORD yes = 1; - /* Set SO_REUSEADDR on the socket. */ - if (setsockopt(sock, - SOL_SOCKET, - SO_REUSEADDR, - (char*) &yes, - sizeof yes) == SOCKET_ERROR) { - err = WSAGetLastError(); - closesocket(sock); - return err; - } - } - - if (addr->sa_family == AF_INET6) - handle->flags |= UV_HANDLE_IPV6; } + if (flags & UV_UDP_REUSEADDR) { + DWORD yes = 1; + /* Set SO_REUSEADDR on the socket. */ + if (setsockopt(handle->socket, + SOL_SOCKET, + SO_REUSEADDR, + (char*) &yes, + sizeof yes) == SOCKET_ERROR) { + err = WSAGetLastError(); + return err; + } + } + + if (addr->sa_family == AF_INET6) + handle->flags |= UV_HANDLE_IPV6; + if (addr->sa_family == AF_INET6 && !(flags & UV_UDP_IPV6ONLY)) { /* On windows IPV6ONLY is on by default. */ /* If the user doesn't specify it libuv turns it off. */ diff --git a/deps/uv/test/benchmark-fs-stat.c b/deps/uv/test/benchmark-fs-stat.c index 5c87de00436..32d2589586c 100644 --- a/deps/uv/test/benchmark-fs-stat.c +++ b/deps/uv/test/benchmark-fs-stat.c @@ -31,7 +31,7 @@ #define sync_stat(req, path) \ do { \ - uv_fs_stat(uv_default_loop(), (req), (path), NULL); \ + uv_fs_stat(NULL, (req), (path), NULL); \ uv_fs_req_cleanup((req)); \ } \ while (0) diff --git a/deps/uv/test/echo-server.c b/deps/uv/test/echo-server.c index f223981c261..bfed67675dd 100644 --- a/deps/uv/test/echo-server.c +++ b/deps/uv/test/echo-server.c @@ -304,7 +304,7 @@ static int pipe_echo_start(char* pipeName) { #ifndef _WIN32 { uv_fs_t req; - uv_fs_unlink(uv_default_loop(), &req, pipeName, NULL); + uv_fs_unlink(NULL, &req, pipeName, NULL); uv_fs_req_cleanup(&req); } #endif diff --git a/deps/uv/test/run-tests.c b/deps/uv/test/run-tests.c index 1f458745327..b4be01f6f95 100644 --- a/deps/uv/test/run-tests.c +++ b/deps/uv/test/run-tests.c @@ -41,6 +41,7 @@ int ipc_helper_tcp_connection(void); int ipc_send_recv_helper(void); int ipc_helper_bind_twice(void); int stdio_over_pipes_helper(void); +int spawn_stdin_stdout(void); static int maybe_run_test(int argc, char **argv); @@ -172,5 +173,9 @@ static int maybe_run_test(int argc, char **argv) { } #endif /* !_WIN32 */ + if (strcmp(argv[1], "spawn_helper9") == 0) { + return spawn_stdin_stdout(); + } + return run_test(argv[1], 0, 1); } diff --git a/deps/uv/test/runner-unix.c b/deps/uv/test/runner-unix.c index 5da720fad43..2264d1e89d5 100644 --- a/deps/uv/test/runner-unix.c +++ b/deps/uv/test/runner-unix.c @@ -37,6 +37,7 @@ #include #include +#include #include @@ -173,6 +174,9 @@ int process_wait(process_info_t* vec, int n, int timeout) { process_info_t* p; dowait_args args; pthread_t tid; + pthread_attr_t attr; + unsigned int elapsed_ms; + struct timeval timebase; struct timeval tv; fd_set fds; @@ -199,20 +203,54 @@ int process_wait(process_info_t* vec, int n, int timeout) { return -1; } - r = pthread_create(&tid, NULL, dowait, &args); + if (pthread_attr_init(&attr)) + abort(); + + if (pthread_attr_setstacksize(&attr, 256 * 1024)) + abort(); + + r = pthread_create(&tid, &attr, dowait, &args); + + if (pthread_attr_destroy(&attr)) + abort(); + if (r) { perror("pthread_create()"); retval = -1; goto terminate; } - tv.tv_sec = timeout / 1000; - tv.tv_usec = 0; + if (gettimeofday(&timebase, NULL)) + abort(); - FD_ZERO(&fds); - FD_SET(args.pipe[0], &fds); + tv = timebase; + for (;;) { + /* Check that gettimeofday() doesn't jump back in time. */ + assert(tv.tv_sec == timebase.tv_sec || + (tv.tv_sec == timebase.tv_sec && tv.tv_usec >= timebase.tv_usec)); - r = select(args.pipe[0] + 1, &fds, NULL, NULL, &tv); + elapsed_ms = + (tv.tv_sec - timebase.tv_sec) * 1000 + + (tv.tv_usec / 1000) - + (timebase.tv_usec / 1000); + + r = 0; /* Timeout. */ + if (elapsed_ms >= (unsigned) timeout) + break; + + tv.tv_sec = (timeout - elapsed_ms) / 1000; + tv.tv_usec = (timeout - elapsed_ms) % 1000 * 1000; + + FD_ZERO(&fds); + FD_SET(args.pipe[0], &fds); + + r = select(args.pipe[0] + 1, &fds, NULL, NULL, &tv); + if (!(r == -1 && errno == EINTR)) + break; + + if (gettimeofday(&tv, NULL)) + abort(); + } if (r == -1) { perror("select()"); @@ -229,15 +267,11 @@ int process_wait(process_info_t* vec, int n, int timeout) { kill(p->pid, SIGTERM); } retval = -2; - - /* Wait for thread to finish. */ - r = pthread_join(tid, NULL); - if (r) { - perror("pthread_join"); - retval = -1; - } } + if (pthread_join(tid, NULL)) + abort(); + terminate: close(args.pipe[0]); close(args.pipe[1]); diff --git a/deps/uv/test/task.h b/deps/uv/test/task.h index e06a50e2134..e736763802f 100644 --- a/deps/uv/test/task.h +++ b/deps/uv/test/task.h @@ -179,8 +179,8 @@ enum test_status { #include -/* Define inline for MSVC */ -# ifdef _MSC_VER +/* Define inline for MSVC<2015 */ +# if defined(_MSC_VER) && _MSC_VER < 1900 # define inline __inline # endif diff --git a/deps/uv/test/test-fs-event.c b/deps/uv/test/test-fs-event.c index 0a2ba331455..a0908ce575b 100644 --- a/deps/uv/test/test-fs-event.c +++ b/deps/uv/test/test-fs-event.c @@ -37,11 +37,15 @@ static uv_fs_event_t fs_event; static const char file_prefix[] = "fsevent-"; +static const int fs_event_file_count = 16; +#if defined(__APPLE__) || defined(_WIN32) +static const char file_prefix_in_subdir[] = "subdir"; +#endif static uv_timer_t timer; static int timer_cb_called; static int close_cb_called; -static const int fs_event_file_count = 128; static int fs_event_created; +static int fs_event_removed; static int fs_event_cb_called; #if defined(PATH_MAX) static char fs_event_filename[PATH_MAX]; @@ -50,48 +54,45 @@ static char fs_event_filename[1024]; #endif /* defined(PATH_MAX) */ static int timer_cb_touch_called; -static void fs_event_unlink_files(uv_timer_t* handle); - -static void create_dir(uv_loop_t* loop, const char* name) { +static void create_dir(const char* name) { int r; uv_fs_t req; - r = uv_fs_mkdir(loop, &req, name, 0755, NULL); + r = uv_fs_mkdir(NULL, &req, name, 0755, NULL); ASSERT(r == 0 || r == UV_EEXIST); uv_fs_req_cleanup(&req); } -static void create_file(uv_loop_t* loop, const char* name) { +static void create_file(const char* name) { int r; uv_file file; uv_fs_t req; - r = uv_fs_open(loop, &req, name, O_WRONLY | O_CREAT, - S_IWUSR | S_IRUSR, NULL); + r = uv_fs_open(NULL, &req, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); file = r; uv_fs_req_cleanup(&req); - r = uv_fs_close(loop, &req, file, NULL); + r = uv_fs_close(NULL, &req, file, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&req); } -static void touch_file(uv_loop_t* loop, const char* name) { +static void touch_file(const char* name) { int r; uv_file file; uv_fs_t req; uv_buf_t buf; - r = uv_fs_open(loop, &req, name, O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &req, name, O_RDWR, 0, NULL); ASSERT(r >= 0); file = r; uv_fs_req_cleanup(&req); buf = uv_buf_init("foo", 4); - r = uv_fs_write(loop, &req, file, &buf, 1, -1, NULL); + r = uv_fs_write(NULL, &req, file, &buf, 1, -1, NULL); ASSERT(r >= 0); uv_fs_req_cleanup(&req); - r = uv_fs_close(loop, &req, file, NULL); + r = uv_fs_close(NULL, &req, file, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&req); } @@ -119,25 +120,6 @@ static void fs_event_cb_dir(uv_fs_event_t* handle, const char* filename, uv_close((uv_handle_t*)handle, close_cb); } -static void fs_event_cb_dir_multi_file(uv_fs_event_t* handle, - const char* filename, - int events, - int status) { - fs_event_cb_called++; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_RENAME); - ASSERT(filename == NULL || - strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0); - - /* Stop watching dir when received events about all files: - * both create and close events */ - if (fs_event_cb_called == 2 * fs_event_file_count) { - ASSERT(0 == uv_fs_event_stop(handle)); - uv_close((uv_handle_t*) handle, close_cb); - } -} - static const char* fs_event_get_filename(int i) { snprintf(fs_event_filename, sizeof(fs_event_filename), @@ -148,40 +130,140 @@ static const char* fs_event_get_filename(int i) { } static void fs_event_create_files(uv_timer_t* handle) { - int i; + /* Make sure we're not attempting to create files we do not intend */ + ASSERT(fs_event_created < fs_event_file_count); - /* Already created all files */ - if (fs_event_created == fs_event_file_count) { - uv_close((uv_handle_t*) &timer, close_cb); - return; + /* Create the file */ + create_file(fs_event_get_filename(fs_event_created)); + + if (++fs_event_created < fs_event_file_count) { + /* Create another file on a different event loop tick. We do it this way + * to avoid fs events coalescing into one fs event. */ + ASSERT(0 == uv_timer_start(&timer, fs_event_create_files, 1, 0)); } - - /* Create all files */ - for (i = 0; i < 16; i++, fs_event_created++) - create_file(handle->loop, fs_event_get_filename(i)); - - /* And unlink them */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 50, 0)); } -void fs_event_unlink_files(uv_timer_t* handle) { +static void fs_event_unlink_files(uv_timer_t* handle) { int r; int i; /* NOTE: handle might be NULL if invoked not as timer callback */ + if (handle == NULL) { + /* Unlink all files */ + for (i = 0; i < 16; i++) { + r = remove(fs_event_get_filename(i)); + if (handle != NULL) + ASSERT(r == 0); + } + } else { + /* Make sure we're not attempting to remove files we do not intend */ + ASSERT(fs_event_removed < fs_event_file_count); - /* Unlink all files */ - for (i = 0; i < 16; i++) { - r = remove(fs_event_get_filename(i)); - if (handle != NULL) - ASSERT(r == 0); + /* Remove the file */ + ASSERT(0 == remove(fs_event_get_filename(fs_event_removed))); + + if (++fs_event_removed < fs_event_file_count) { + /* Remove another file on a different event loop tick. We do it this way + * to avoid fs events coalescing into one fs event. */ + ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); + } } - - /* And create them again */ - if (handle != NULL) - ASSERT(0 == uv_timer_start(&timer, fs_event_create_files, 50, 0)); } +static void fs_event_cb_dir_multi_file(uv_fs_event_t* handle, + const char* filename, + int events, + int status) { + fs_event_cb_called++; + ASSERT(handle == &fs_event); + ASSERT(status == 0); + ASSERT(events == UV_CHANGE || UV_RENAME); + ASSERT(filename == NULL || + strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0); + + if (fs_event_created + fs_event_removed == fs_event_file_count) { + /* Once we've processed all create events, delete all files */ + ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); + } else if (fs_event_cb_called == 2 * fs_event_file_count) { + /* Once we've processed all create and delete events, stop watching */ + uv_close((uv_handle_t*) &timer, close_cb); + uv_close((uv_handle_t*) handle, close_cb); + } +} + +#if defined(__APPLE__) || defined(_WIN32) +static const char* fs_event_get_filename_in_subdir(int i) { + snprintf(fs_event_filename, + sizeof(fs_event_filename), + "watch_dir/subdir/%s%d", + file_prefix, + i); + return fs_event_filename; +} + +static void fs_event_create_files_in_subdir(uv_timer_t* handle) { + /* Make sure we're not attempting to create files we do not intend */ + ASSERT(fs_event_created < fs_event_file_count); + + /* Create the file */ + create_file(fs_event_get_filename_in_subdir(fs_event_created)); + + if (++fs_event_created < fs_event_file_count) { + /* Create another file on a different event loop tick. We do it this way + * to avoid fs events coalescing into one fs event. */ + ASSERT(0 == uv_timer_start(&timer, fs_event_create_files_in_subdir, 1, 0)); + } +} + +static void fs_event_unlink_files_in_subdir(uv_timer_t* handle) { + int r; + int i; + + /* NOTE: handle might be NULL if invoked not as timer callback */ + if (handle == NULL) { + /* Unlink all files */ + for (i = 0; i < 16; i++) { + r = remove(fs_event_get_filename_in_subdir(i)); + if (handle != NULL) + ASSERT(r == 0); + } + } else { + /* Make sure we're not attempting to remove files we do not intend */ + ASSERT(fs_event_removed < fs_event_file_count); + + /* Remove the file */ + ASSERT(0 == remove(fs_event_get_filename_in_subdir(fs_event_removed))); + + if (++fs_event_removed < fs_event_file_count) { + /* Remove another file on a different event loop tick. We do it this way + * to avoid fs events coalescing into one fs event. */ + ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0)); + } + } +} + +static void fs_event_cb_dir_multi_file_in_subdir(uv_fs_event_t* handle, + const char* filename, + int events, + int status) { + fs_event_cb_called++; + ASSERT(handle == &fs_event); + ASSERT(status == 0); + ASSERT(events == UV_CHANGE || UV_RENAME); + ASSERT(filename == NULL || + strncmp(filename, file_prefix_in_subdir, sizeof(file_prefix_in_subdir) - 1) == 0); + + if (fs_event_created + fs_event_removed == fs_event_file_count) { + /* Once we've processed all create events, delete all files */ + ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0)); + } else if (fs_event_cb_called == 2 * fs_event_file_count) { + /* Once we've processed all create and delete events, stop watching */ + uv_close((uv_handle_t*) &timer, close_cb); + uv_close((uv_handle_t*) handle, close_cb); + } +} +#endif + static void fs_event_cb_file(uv_fs_event_t* handle, const char* filename, int events, int status) { ++fs_event_cb_called; @@ -226,16 +308,16 @@ static void timer_cb_file(uv_timer_t* handle) { ++timer_cb_called; if (timer_cb_called == 1) { - touch_file(handle->loop, "watch_dir/file1"); + touch_file("watch_dir/file1"); } else { - touch_file(handle->loop, "watch_dir/file2"); + touch_file("watch_dir/file2"); uv_close((uv_handle_t*)handle, close_cb); } } static void timer_cb_touch(uv_timer_t* timer) { uv_close((uv_handle_t*)timer, NULL); - touch_file(timer->loop, "watch_file"); + touch_file("watch_file"); timer_cb_touch_called++; } @@ -255,7 +337,7 @@ TEST_IMPL(fs_event_watch_dir) { remove("watch_dir/file2"); remove("watch_dir/file1"); remove("watch_dir/"); - create_dir(loop, "watch_dir"); + create_dir("watch_dir"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -268,8 +350,7 @@ TEST_IMPL(fs_event_watch_dir) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fs_event_cb_called == 2 * fs_event_file_count); - ASSERT(fs_event_created == fs_event_file_count); + ASSERT(fs_event_cb_called == fs_event_created + fs_event_removed); ASSERT(close_cb_called == 2); /* Cleanup */ @@ -282,6 +363,50 @@ TEST_IMPL(fs_event_watch_dir) { return 0; } +TEST_IMPL(fs_event_watch_dir_recursive) { +#if defined(__APPLE__) || defined(_WIN32) + uv_loop_t* loop; + int r; + + /* Setup */ + loop = uv_default_loop(); + fs_event_unlink_files(NULL); + remove("watch_dir/file2"); + remove("watch_dir/file1"); + remove("watch_dir/subdir"); + remove("watch_dir/"); + create_dir("watch_dir"); + create_dir("watch_dir/subdir"); + + r = uv_fs_event_init(loop, &fs_event); + ASSERT(r == 0); + r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file_in_subdir, "watch_dir", UV_FS_EVENT_RECURSIVE); + ASSERT(r == 0); + r = uv_timer_init(loop, &timer); + ASSERT(r == 0); + r = uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0); + ASSERT(r == 0); + + uv_run(loop, UV_RUN_DEFAULT); + + ASSERT(fs_event_cb_called == fs_event_created + fs_event_removed); + ASSERT(close_cb_called == 2); + + /* Cleanup */ + fs_event_unlink_files_in_subdir(NULL); + remove("watch_dir/file2"); + remove("watch_dir/file1"); + remove("watch_dir/subdir"); + remove("watch_dir/"); + + MAKE_VALGRIND_HAPPY(); + return 0; +#else + RETURN_SKIP("Recursive directory watching not supported on this platform."); +#endif +} + + TEST_IMPL(fs_event_watch_file) { uv_loop_t* loop = uv_default_loop(); int r; @@ -290,9 +415,9 @@ TEST_IMPL(fs_event_watch_file) { remove("watch_dir/file2"); remove("watch_dir/file1"); remove("watch_dir/"); - create_dir(loop, "watch_dir"); - create_file(loop, "watch_dir/file1"); - create_file(loop, "watch_dir/file2"); + create_dir("watch_dir"); + create_file("watch_dir/file1"); + create_file("watch_dir/file2"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -348,7 +473,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) { /* Setup */ remove("watch_file"); - create_file(loop, "watch_file"); + create_file("watch_file"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -389,8 +514,8 @@ TEST_IMPL(fs_event_no_callback_after_close) { /* Setup */ remove("watch_dir/file1"); remove("watch_dir/"); - create_dir(loop, "watch_dir"); - create_file(loop, "watch_dir/file1"); + create_dir("watch_dir"); + create_file("watch_dir/file1"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -402,7 +527,7 @@ TEST_IMPL(fs_event_no_callback_after_close) { uv_close((uv_handle_t*)&fs_event, close_cb); - touch_file(loop, "watch_dir/file1"); + touch_file("watch_dir/file1"); uv_run(loop, UV_RUN_DEFAULT); ASSERT(fs_event_cb_called == 0); @@ -423,8 +548,8 @@ TEST_IMPL(fs_event_no_callback_on_close) { /* Setup */ remove("watch_dir/file1"); remove("watch_dir/"); - create_dir(loop, "watch_dir"); - create_file(loop, "watch_dir/file1"); + create_dir("watch_dir"); + create_file("watch_dir/file1"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -497,8 +622,8 @@ TEST_IMPL(fs_event_close_with_pending_event) { loop = uv_default_loop(); - create_dir(loop, "watch_dir"); - create_file(loop, "watch_dir/file"); + create_dir("watch_dir"); + create_file("watch_dir/file"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -506,7 +631,7 @@ TEST_IMPL(fs_event_close_with_pending_event) { ASSERT(r == 0); /* Generate an fs event. */ - touch_file(loop, "watch_dir/file"); + touch_file("watch_dir/file"); uv_close((uv_handle_t*)&fs_event, close_cb); @@ -554,12 +679,12 @@ TEST_IMPL(fs_event_close_in_callback) { loop = uv_default_loop(); - create_dir(loop, "watch_dir"); - create_file(loop, "watch_dir/file1"); - create_file(loop, "watch_dir/file2"); - create_file(loop, "watch_dir/file3"); - create_file(loop, "watch_dir/file4"); - create_file(loop, "watch_dir/file5"); + create_dir("watch_dir"); + create_file("watch_dir/file1"); + create_file("watch_dir/file2"); + create_file("watch_dir/file3"); + create_file("watch_dir/file4"); + create_file("watch_dir/file5"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -567,11 +692,11 @@ TEST_IMPL(fs_event_close_in_callback) { ASSERT(r == 0); /* Generate a couple of fs events. */ - touch_file(loop, "watch_dir/file1"); - touch_file(loop, "watch_dir/file2"); - touch_file(loop, "watch_dir/file3"); - touch_file(loop, "watch_dir/file4"); - touch_file(loop, "watch_dir/file5"); + touch_file("watch_dir/file1"); + touch_file("watch_dir/file2"); + touch_file("watch_dir/file3"); + touch_file("watch_dir/file4"); + touch_file("watch_dir/file5"); uv_run(loop, UV_RUN_DEFAULT); @@ -600,7 +725,7 @@ TEST_IMPL(fs_event_start_and_close) { loop = uv_default_loop(); - create_dir(loop, "watch_dir"); + create_dir("watch_dir"); r = uv_fs_event_init(loop, &fs_event1); ASSERT(r == 0); @@ -630,7 +755,7 @@ TEST_IMPL(fs_event_getpath) { char buf[1024]; size_t len; - create_dir(loop, "watch_dir"); + create_dir("watch_dir"); r = uv_fs_event_init(loop, &fs_event); ASSERT(r == 0); @@ -692,7 +817,7 @@ TEST_IMPL(fs_event_error_reporting) { TEST_FILE_LIMIT(ARRAY_SIZE(loops) * 3); remove("watch_dir/"); - create_dir(uv_default_loop(), "watch_dir"); + create_dir("watch_dir"); /* Create a lot of loops, and start FSEventStream in each of them. * Eventually, this should create enough streams to make FSEventStreamStart() diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c index a0600b30797..17b90e91c1a 100644 --- a/deps/uv/test/test-fs.c +++ b/deps/uv/test/test-fs.c @@ -119,7 +119,7 @@ static void check_permission(const char* filename, unsigned int mode) { uv_fs_t req; uv_stat_t* s; - r = uv_fs_stat(uv_default_loop(), &req, filename, NULL); + r = uv_fs_stat(NULL, &req, filename, NULL); ASSERT(r == 0); ASSERT(req.result == 0); @@ -402,7 +402,7 @@ static void check_mkdtemp_result(uv_fs_t* req) { check_permission(req->path, 0700); /* Check if req->path is actually a directory */ - r = uv_fs_stat(uv_default_loop(), &stat_req, req->path, NULL); + r = uv_fs_stat(NULL, &stat_req, req->path, NULL); ASSERT(r == 0); ASSERT(((uv_stat_t*)stat_req.ptr)->st_mode & S_IFDIR); uv_fs_req_cleanup(&stat_req); @@ -521,7 +521,7 @@ TEST_IMPL(fs_file_noent) { loop = uv_default_loop(); - r = uv_fs_open(loop, &req, "does_not_exist", O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &req, "does_not_exist", O_RDONLY, 0, NULL); ASSERT(r == UV_ENOENT); ASSERT(req.result == UV_ENOENT); uv_fs_req_cleanup(&req); @@ -549,7 +549,7 @@ TEST_IMPL(fs_file_nametoolong) { memset(name, 'a', TOO_LONG_NAME_LENGTH); name[TOO_LONG_NAME_LENGTH] = 0; - r = uv_fs_open(loop, &req, name, O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &req, name, O_RDONLY, 0, NULL); ASSERT(r == UV_ENAMETOOLONG); ASSERT(req.result == UV_ENAMETOOLONG); uv_fs_req_cleanup(&req); @@ -572,7 +572,7 @@ TEST_IMPL(fs_file_loop) { loop = uv_default_loop(); unlink("test_symlink"); - r = uv_fs_symlink(loop, &req, "test_symlink", "test_symlink", 0, NULL); + r = uv_fs_symlink(NULL, &req, "test_symlink", "test_symlink", 0, NULL); #ifdef _WIN32 /* * Windows XP and Server 2003 don't support symlinks; we'll get UV_ENOTSUP. @@ -585,7 +585,7 @@ TEST_IMPL(fs_file_loop) { ASSERT(r == 0); uv_fs_req_cleanup(&req); - r = uv_fs_open(loop, &req, "test_symlink", O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &req, "test_symlink", O_RDONLY, 0, NULL); ASSERT(r == UV_ELOOP); ASSERT(req.result == UV_ELOOP); uv_fs_req_cleanup(&req); @@ -730,63 +730,62 @@ TEST_IMPL(fs_file_sync) { uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &write_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(write_req.result >= 0); uv_fs_req_cleanup(&write_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_file", O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR, 0, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(read_req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); uv_fs_req_cleanup(&read_req); - r = uv_fs_ftruncate(loop, &ftruncate_req, open_req1.result, 7, NULL); + r = uv_fs_ftruncate(NULL, &ftruncate_req, open_req1.result, 7, NULL); ASSERT(r == 0); ASSERT(ftruncate_req.result == 0); uv_fs_req_cleanup(&ftruncate_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_rename(loop, &rename_req, "test_file", "test_file2", NULL); + r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL); ASSERT(r == 0); ASSERT(rename_req.result == 0); uv_fs_req_cleanup(&rename_req); - r = uv_fs_open(loop, &open_req1, "test_file2", O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY, 0, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, - NULL); + r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(read_req.result >= 0); ASSERT(strcmp(buf, "test-bu") == 0); uv_fs_req_cleanup(&read_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_unlink(loop, &unlink_req, "test_file2", NULL); + r = uv_fs_unlink(NULL, &unlink_req, "test_file2", NULL); ASSERT(r == 0); ASSERT(unlink_req.result == 0); uv_fs_req_cleanup(&unlink_req); @@ -808,19 +807,19 @@ TEST_IMPL(fs_file_write_null_buffer) { loop = uv_default_loop(); - r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(NULL, 0); - r = uv_fs_write(loop, &write_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r == 0); ASSERT(write_req.result == 0); uv_fs_req_cleanup(&write_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); @@ -850,19 +849,19 @@ TEST_IMPL(fs_async_dir) { ASSERT(mkdir_cb_count == 1); /* Create 2 files synchronously. */ - r = uv_fs_open(loop, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&close_req); @@ -873,7 +872,7 @@ TEST_IMPL(fs_async_dir) { ASSERT(scandir_cb_count == 1); /* sync uv_fs_scandir */ - r = uv_fs_scandir(loop, &scandir_req, "test_dir", 0, NULL); + r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); ASSERT(r == 2); ASSERT(scandir_req.result == 2); ASSERT(scandir_req.ptr); @@ -957,12 +956,12 @@ TEST_IMPL(fs_async_sendfile) { ASSERT(r == 0); /* Test starts here. */ - r = uv_fs_open(loop, &open_req1, "test_file", O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR, 0, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); - r = uv_fs_open(loop, &open_req2, "test_file2", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req2, "test_file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req2.result >= 0); @@ -975,10 +974,10 @@ TEST_IMPL(fs_async_sendfile) { ASSERT(sendfile_cb_count == 1); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_close(loop, &close_req, open_req2.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req2.result, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&close_req); @@ -1008,7 +1007,7 @@ TEST_IMPL(fs_mkdtemp) { ASSERT(mkdtemp_cb_count == 1); /* sync mkdtemp */ - r = uv_fs_mkdtemp(loop, &mkdtemp_req2, path_template, NULL); + r = uv_fs_mkdtemp(NULL, &mkdtemp_req2, path_template, NULL); ASSERT(r == 0); check_mkdtemp_result(&mkdtemp_req2); @@ -1040,7 +1039,7 @@ TEST_IMPL(fs_fstat) { loop = uv_default_loop(); - r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, + r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); @@ -1048,12 +1047,12 @@ TEST_IMPL(fs_fstat) { uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &req, file, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); ASSERT(r == sizeof(test_buf)); ASSERT(req.result == sizeof(test_buf)); uv_fs_req_cleanup(&req); - r = uv_fs_fstat(loop, &req, file, NULL); + r = uv_fs_fstat(NULL, &req, file, NULL); ASSERT(r == 0); ASSERT(req.result == 0); s = req.ptr; @@ -1130,7 +1129,7 @@ TEST_IMPL(fs_fstat) { ASSERT(fstat_cb_count == 1); - r = uv_fs_close(loop, &req, file, NULL); + r = uv_fs_close(NULL, &req, file, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1161,7 +1160,7 @@ TEST_IMPL(fs_access) { loop = uv_default_loop(); /* File should not exist */ - r = uv_fs_access(loop, &req, "test_file", F_OK, NULL); + r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL); ASSERT(r < 0); ASSERT(req.result < 0); uv_fs_req_cleanup(&req); @@ -1174,7 +1173,7 @@ TEST_IMPL(fs_access) { access_cb_count = 0; /* reset for the next test */ /* Create file */ - r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, + r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); @@ -1182,7 +1181,7 @@ TEST_IMPL(fs_access) { uv_fs_req_cleanup(&req); /* File should exist */ - r = uv_fs_access(loop, &req, "test_file", F_OK, NULL); + r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1195,17 +1194,17 @@ TEST_IMPL(fs_access) { access_cb_count = 0; /* reset for the next test */ /* Close file */ - r = uv_fs_close(loop, &req, file, NULL); + r = uv_fs_close(NULL, &req, file, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); /* Directory access */ - r = uv_fs_mkdir(loop, &req, "test_dir", 0777, NULL); + r = uv_fs_mkdir(NULL, &req, "test_dir", 0777, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&req); - r = uv_fs_access(loop, &req, "test_dir", W_OK, NULL); + r = uv_fs_access(NULL, &req, "test_dir", W_OK, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1235,7 +1234,7 @@ TEST_IMPL(fs_chmod) { loop = uv_default_loop(); - r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, + r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); @@ -1243,14 +1242,14 @@ TEST_IMPL(fs_chmod) { uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &req, file, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); ASSERT(r == sizeof(test_buf)); ASSERT(req.result == sizeof(test_buf)); uv_fs_req_cleanup(&req); #ifndef _WIN32 /* Make the file write-only */ - r = uv_fs_chmod(loop, &req, "test_file", 0200, NULL); + r = uv_fs_chmod(NULL, &req, "test_file", 0200, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1259,7 +1258,7 @@ TEST_IMPL(fs_chmod) { #endif /* Make the file read-only */ - r = uv_fs_chmod(loop, &req, "test_file", 0400, NULL); + r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1267,7 +1266,7 @@ TEST_IMPL(fs_chmod) { check_permission("test_file", 0400); /* Make the file read+write with sync uv_fs_fchmod */ - r = uv_fs_fchmod(loop, &req, file, 0600, NULL); + r = uv_fs_fchmod(NULL, &req, file, 0600, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1333,7 +1332,7 @@ TEST_IMPL(fs_unlink_readonly) { loop = uv_default_loop(); - r = uv_fs_open(loop, + r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, @@ -1345,7 +1344,7 @@ TEST_IMPL(fs_unlink_readonly) { uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &req, file, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); ASSERT(r == sizeof(test_buf)); ASSERT(req.result == sizeof(test_buf)); uv_fs_req_cleanup(&req); @@ -1353,7 +1352,7 @@ TEST_IMPL(fs_unlink_readonly) { close(file); /* Make the file read-only */ - r = uv_fs_chmod(loop, &req, "test_file", 0400, NULL); + r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1361,7 +1360,7 @@ TEST_IMPL(fs_unlink_readonly) { check_permission("test_file", 0400); /* Try to unlink the file */ - r = uv_fs_unlink(loop, &req, "test_file", NULL); + r = uv_fs_unlink(NULL, &req, "test_file", NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1373,7 +1372,7 @@ TEST_IMPL(fs_unlink_readonly) { uv_run(loop, UV_RUN_DEFAULT); /* Cleanup. */ - uv_fs_chmod(loop, &req, "test_file", 0600, NULL); + uv_fs_chmod(NULL, &req, "test_file", 0600, NULL); uv_fs_req_cleanup(&req); unlink("test_file"); @@ -1392,7 +1391,7 @@ TEST_IMPL(fs_chown) { loop = uv_default_loop(); - r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, + r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); @@ -1400,13 +1399,13 @@ TEST_IMPL(fs_chown) { uv_fs_req_cleanup(&req); /* sync chown */ - r = uv_fs_chown(loop, &req, "test_file", -1, -1, NULL); + r = uv_fs_chown(NULL, &req, "test_file", -1, -1, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); /* sync fchown */ - r = uv_fs_fchown(loop, &req, file, -1, -1, NULL); + r = uv_fs_fchown(NULL, &req, file, -1, -1, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); @@ -1458,7 +1457,7 @@ TEST_IMPL(fs_link) { loop = uv_default_loop(); - r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, + r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); @@ -1466,7 +1465,7 @@ TEST_IMPL(fs_link) { uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &req, file, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); ASSERT(r == sizeof(test_buf)); ASSERT(req.result == sizeof(test_buf)); uv_fs_req_cleanup(&req); @@ -1474,12 +1473,12 @@ TEST_IMPL(fs_link) { close(file); /* sync link */ - r = uv_fs_link(loop, &req, "test_file", "test_file_link", NULL); + r = uv_fs_link(NULL, &req, "test_file", "test_file_link", NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); - r = uv_fs_open(loop, &req, "test_file_link", O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &req, "test_file_link", O_RDWR, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); link = req.result; @@ -1487,7 +1486,7 @@ TEST_IMPL(fs_link) { memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &req, link, &iov, 1, 0, NULL); + r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); @@ -1500,7 +1499,7 @@ TEST_IMPL(fs_link) { uv_run(loop, UV_RUN_DEFAULT); ASSERT(link_cb_count == 1); - r = uv_fs_open(loop, &req, "test_file_link2", O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &req, "test_file_link2", O_RDWR, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); link = req.result; @@ -1508,7 +1507,7 @@ TEST_IMPL(fs_link) { memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &req, link, &iov, 1, 0, NULL); + r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); @@ -1542,7 +1541,7 @@ TEST_IMPL(fs_readlink) { ASSERT(req.result == UV_ENOENT); uv_fs_req_cleanup(&req); - ASSERT(UV_ENOENT == uv_fs_readlink(loop, &req, "no_such_file", NULL)); + ASSERT(UV_ENOENT == uv_fs_readlink(NULL, &req, "no_such_file", NULL)); ASSERT(req.ptr == NULL); ASSERT(req.result == UV_ENOENT); uv_fs_req_cleanup(&req); @@ -1567,7 +1566,7 @@ TEST_IMPL(fs_symlink) { loop = uv_default_loop(); - r = uv_fs_open(loop, &req, "test_file", O_RDWR | O_CREAT, + r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); @@ -1575,7 +1574,7 @@ TEST_IMPL(fs_symlink) { uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &req, file, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); ASSERT(r == sizeof(test_buf)); ASSERT(req.result == sizeof(test_buf)); uv_fs_req_cleanup(&req); @@ -1583,7 +1582,7 @@ TEST_IMPL(fs_symlink) { close(file); /* sync symlink */ - r = uv_fs_symlink(loop, &req, "test_file", "test_file_symlink", 0, NULL); + r = uv_fs_symlink(NULL, &req, "test_file", "test_file_symlink", 0, NULL); #ifdef _WIN32 if (r < 0) { if (r == UV_ENOTSUP) { @@ -1605,7 +1604,7 @@ TEST_IMPL(fs_symlink) { ASSERT(req.result == 0); uv_fs_req_cleanup(&req); - r = uv_fs_open(loop, &req, "test_file_symlink", O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &req, "test_file_symlink", O_RDWR, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); link = req.result; @@ -1613,14 +1612,14 @@ TEST_IMPL(fs_symlink) { memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &req, link, &iov, 1, 0, NULL); + r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); close(link); - r = uv_fs_symlink(loop, + r = uv_fs_symlink(NULL, &req, "test_file_symlink", "test_file_symlink_symlink", @@ -1629,7 +1628,7 @@ TEST_IMPL(fs_symlink) { ASSERT(r == 0); uv_fs_req_cleanup(&req); - r = uv_fs_readlink(loop, &req, "test_file_symlink_symlink", NULL); + r = uv_fs_readlink(NULL, &req, "test_file_symlink_symlink", NULL); ASSERT(r == 0); ASSERT(strcmp(req.ptr, "test_file_symlink") == 0); uv_fs_req_cleanup(&req); @@ -1645,7 +1644,7 @@ TEST_IMPL(fs_symlink) { uv_run(loop, UV_RUN_DEFAULT); ASSERT(symlink_cb_count == 1); - r = uv_fs_open(loop, &req, "test_file_symlink2", O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &req, "test_file_symlink2", O_RDWR, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); link = req.result; @@ -1653,14 +1652,14 @@ TEST_IMPL(fs_symlink) { memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &req, link, &iov, 1, 0, NULL); + r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); close(link); - r = uv_fs_symlink(loop, + r = uv_fs_symlink(NULL, &req, "test_file_symlink2", "test_file_symlink2_symlink", @@ -1706,7 +1705,7 @@ TEST_IMPL(fs_symlink_dir) { loop = uv_default_loop(); - uv_fs_mkdir(loop, &req, "test_dir", 0777, NULL); + uv_fs_mkdir(NULL, &req, "test_dir", 0777, NULL); uv_fs_req_cleanup(&req); #ifdef _WIN32 @@ -1723,18 +1722,18 @@ TEST_IMPL(fs_symlink_dir) { test_dir = "test_dir"; #endif - r = uv_fs_symlink(loop, &req, test_dir, "test_dir_symlink", + r = uv_fs_symlink(NULL, &req, test_dir, "test_dir_symlink", UV_FS_SYMLINK_JUNCTION, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); - r = uv_fs_stat(loop, &req, "test_dir_symlink", NULL); + r = uv_fs_stat(NULL, &req, "test_dir_symlink", NULL); ASSERT(r == 0); ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFDIR); uv_fs_req_cleanup(&req); - r = uv_fs_lstat(loop, &req, "test_dir_symlink", NULL); + r = uv_fs_lstat(NULL, &req, "test_dir_symlink", NULL); ASSERT(r == 0); ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFLNK); #ifdef _WIN32 @@ -1744,7 +1743,7 @@ TEST_IMPL(fs_symlink_dir) { #endif uv_fs_req_cleanup(&req); - r = uv_fs_readlink(loop, &req, "test_dir_symlink", NULL); + r = uv_fs_readlink(NULL, &req, "test_dir_symlink", NULL); ASSERT(r == 0); #ifdef _WIN32 ASSERT(strcmp(req.ptr, test_dir + 4) == 0); @@ -1753,23 +1752,23 @@ TEST_IMPL(fs_symlink_dir) { #endif uv_fs_req_cleanup(&req); - r = uv_fs_open(loop, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_scandir(loop, &scandir_req, "test_dir_symlink", 0, NULL); + r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL); ASSERT(r == 2); ASSERT(scandir_req.result == 2); ASSERT(scandir_req.ptr); @@ -1785,15 +1784,15 @@ TEST_IMPL(fs_symlink_dir) { ASSERT(!scandir_req.ptr); /* unlink will remove the directory symlink */ - r = uv_fs_unlink(loop, &req, "test_dir_symlink", NULL); + r = uv_fs_unlink(NULL, &req, "test_dir_symlink", NULL); ASSERT(r == 0); uv_fs_req_cleanup(&req); - r = uv_fs_scandir(loop, &scandir_req, "test_dir_symlink", 0, NULL); + r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL); ASSERT(r == UV_ENOENT); uv_fs_req_cleanup(&scandir_req); - r = uv_fs_scandir(loop, &scandir_req, "test_dir", 0, NULL); + r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); ASSERT(r == 2); ASSERT(scandir_req.result == 2); ASSERT(scandir_req.ptr); @@ -1830,8 +1829,7 @@ TEST_IMPL(fs_utime) { /* Setup. */ loop = uv_default_loop(); unlink(path); - r = uv_fs_open(loop, &req, path, O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); + r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); uv_fs_req_cleanup(&req); @@ -1839,12 +1837,12 @@ TEST_IMPL(fs_utime) { atime = mtime = 400497753; /* 1982-09-10 11:22:33 */ - r = uv_fs_utime(loop, &req, path, atime, mtime, NULL); + r = uv_fs_utime(NULL, &req, path, atime, mtime, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); - r = uv_fs_stat(loop, &req, path, NULL); + r = uv_fs_stat(NULL, &req, path, NULL); ASSERT(r == 0); ASSERT(req.result == 0); check_utime(path, atime, mtime); @@ -1875,26 +1873,26 @@ TEST_IMPL(fs_stat_root) { int r; uv_loop_t* loop = uv_default_loop(); - r = uv_fs_stat(loop, &stat_req, "\\", NULL); + r = uv_fs_stat(NULL, &stat_req, "\\", NULL); ASSERT(r == 0); - r = uv_fs_stat(loop, &stat_req, "..\\..\\..\\..\\..\\..\\..", NULL); + r = uv_fs_stat(NULL, &stat_req, "..\\..\\..\\..\\..\\..\\..", NULL); ASSERT(r == 0); - r = uv_fs_stat(loop, &stat_req, "..", NULL); + r = uv_fs_stat(NULL, &stat_req, "..", NULL); ASSERT(r == 0); - r = uv_fs_stat(loop, &stat_req, "..\\", NULL); + r = uv_fs_stat(NULL, &stat_req, "..\\", NULL); ASSERT(r == 0); /* stats the current directory on c: */ - r = uv_fs_stat(loop, &stat_req, "c:", NULL); + r = uv_fs_stat(NULL, &stat_req, "c:", NULL); ASSERT(r == 0); - r = uv_fs_stat(loop, &stat_req, "c:\\", NULL); + r = uv_fs_stat(NULL, &stat_req, "c:\\", NULL); ASSERT(r == 0); - r = uv_fs_stat(loop, &stat_req, "\\\\?\\C:\\", NULL); + r = uv_fs_stat(NULL, &stat_req, "\\\\?\\C:\\", NULL); ASSERT(r == 0); MAKE_VALGRIND_HAPPY(); @@ -1915,8 +1913,7 @@ TEST_IMPL(fs_futime) { /* Setup. */ loop = uv_default_loop(); unlink(path); - r = uv_fs_open(loop, &req, path, O_RDWR | O_CREAT, - S_IWUSR | S_IRUSR, NULL); + r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); uv_fs_req_cleanup(&req); @@ -1924,18 +1921,18 @@ TEST_IMPL(fs_futime) { atime = mtime = 400497753; /* 1982-09-10 11:22:33 */ - r = uv_fs_open(loop, &req, path, O_RDWR, 0, NULL); + r = uv_fs_open(NULL, &req, path, O_RDWR, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); file = req.result; /* FIXME probably not how it's supposed to be used */ uv_fs_req_cleanup(&req); - r = uv_fs_futime(loop, &req, file, atime, mtime, NULL); + r = uv_fs_futime(NULL, &req, file, atime, mtime, NULL); ASSERT(r == 0); ASSERT(req.result == 0); uv_fs_req_cleanup(&req); - r = uv_fs_stat(loop, &req, path, NULL); + r = uv_fs_stat(NULL, &req, path, NULL); ASSERT(r == 0); ASSERT(req.result == 0); check_utime(path, atime, mtime); @@ -1968,7 +1965,7 @@ TEST_IMPL(fs_stat_missing_path) { loop = uv_default_loop(); - r = uv_fs_stat(loop, &req, "non_existent_file", NULL); + r = uv_fs_stat(NULL, &req, "non_existent_file", NULL); ASSERT(r == UV_ENOENT); ASSERT(req.result == UV_ENOENT); uv_fs_req_cleanup(&req); @@ -1987,13 +1984,13 @@ TEST_IMPL(fs_scandir_empty_dir) { path = "./empty_dir/"; loop = uv_default_loop(); - uv_fs_mkdir(loop, &req, path, 0777, NULL); + uv_fs_mkdir(NULL, &req, path, 0777, NULL); uv_fs_req_cleanup(&req); /* Fill the req to ensure that required fields are cleaned up */ memset(&req, 0xdb, sizeof(req)); - r = uv_fs_scandir(loop, &req, path, 0, NULL); + r = uv_fs_scandir(NULL, &req, path, 0, NULL); ASSERT(r == 0); ASSERT(req.result == 0); ASSERT(req.ptr == NULL); @@ -2007,7 +2004,7 @@ TEST_IMPL(fs_scandir_empty_dir) { uv_run(loop, UV_RUN_DEFAULT); ASSERT(scandir_cb_count == 1); - uv_fs_rmdir(loop, &req, path, NULL); + uv_fs_rmdir(NULL, &req, path, NULL); uv_fs_req_cleanup(&req); MAKE_VALGRIND_HAPPY(); @@ -2022,7 +2019,7 @@ TEST_IMPL(fs_scandir_file) { path = "test/fixtures/empty_file"; loop = uv_default_loop(); - r = uv_fs_scandir(loop, &scandir_req, path, 0, NULL); + r = uv_fs_scandir(NULL, &scandir_req, path, 0, NULL); ASSERT(r == UV_ENOTDIR); uv_fs_req_cleanup(&scandir_req); @@ -2046,14 +2043,14 @@ TEST_IMPL(fs_open_dir) { path = "."; loop = uv_default_loop(); - r = uv_fs_open(loop, &req, path, O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &req, path, O_RDONLY, 0, NULL); ASSERT(r >= 0); ASSERT(req.result >= 0); ASSERT(req.ptr == NULL); file = r; uv_fs_req_cleanup(&req); - r = uv_fs_close(loop, &req, file, NULL); + r = uv_fs_close(NULL, &req, file, NULL); ASSERT(r == 0); r = uv_fs_open(loop, &req, path, O_RDONLY, 0, open_cb_simple); @@ -2076,47 +2073,46 @@ TEST_IMPL(fs_file_open_append) { loop = uv_default_loop(); - r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &write_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(write_req.result >= 0); uv_fs_req_cleanup(&write_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_file", O_RDWR | O_APPEND, 0, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR | O_APPEND, 0, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &write_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(write_req.result >= 0); uv_fs_req_cleanup(&write_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_file", O_RDONLY, S_IRUSR, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, - NULL); + r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); printf("read = %d\n", r); ASSERT(r == 26); ASSERT(read_req.result == 26); @@ -2125,7 +2121,7 @@ TEST_IMPL(fs_file_open_append) { sizeof("test-buffer\n\0test-buffer\n\0") - 1) == 0); uv_fs_req_cleanup(&read_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); @@ -2147,54 +2143,53 @@ TEST_IMPL(fs_rename_to_existing_file) { loop = uv_default_loop(); - r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &write_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(write_req.result >= 0); uv_fs_req_cleanup(&write_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_file2", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_rename(loop, &rename_req, "test_file", "test_file2", NULL); + r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL); ASSERT(r == 0); ASSERT(rename_req.result == 0); uv_fs_req_cleanup(&rename_req); - r = uv_fs_open(loop, &open_req1, "test_file2", O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY, 0, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, - NULL); + r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(read_req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); uv_fs_req_cleanup(&read_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); @@ -2216,44 +2211,44 @@ TEST_IMPL(fs_read_file_eof) { loop = uv_default_loop(); - r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); - r = uv_fs_write(loop, &write_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(write_req.result >= 0); uv_fs_req_cleanup(&write_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_file", O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, 0, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, NULL); + r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); ASSERT(r >= 0); ASSERT(read_req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, + r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, read_req.result, NULL); ASSERT(r == 0); ASSERT(read_req.result == 0); uv_fs_req_cleanup(&read_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); @@ -2275,7 +2270,7 @@ TEST_IMPL(fs_write_multiple_bufs) { loop = uv_default_loop(); - r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, + r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); @@ -2283,17 +2278,17 @@ TEST_IMPL(fs_write_multiple_bufs) { iovs[0] = uv_buf_init(test_buf, sizeof(test_buf)); iovs[1] = uv_buf_init(test_buf2, sizeof(test_buf2)); - r = uv_fs_write(loop, &write_req, open_req1.result, iovs, 2, 0, NULL); + r = uv_fs_write(NULL, &write_req, open_req1.result, iovs, 2, 0, NULL); ASSERT(r >= 0); ASSERT(write_req.result >= 0); uv_fs_req_cleanup(&write_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); - r = uv_fs_open(loop, &open_req1, "test_file", O_RDONLY, 0, NULL); + r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, 0, NULL); ASSERT(r >= 0); ASSERT(open_req1.result >= 0); uv_fs_req_cleanup(&open_req1); @@ -2303,7 +2298,7 @@ TEST_IMPL(fs_write_multiple_bufs) { /* Read the strings back to separate buffers. */ iovs[0] = uv_buf_init(buf, sizeof(test_buf)); iovs[1] = uv_buf_init(buf2, sizeof(test_buf2)); - r = uv_fs_read(loop, &read_req, open_req1.result, iovs, 2, 0, NULL); + r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, 2, 0, NULL); ASSERT(r >= 0); ASSERT(read_req.result >= 0); ASSERT(strcmp(buf, test_buf) == 0); @@ -2311,13 +2306,13 @@ TEST_IMPL(fs_write_multiple_bufs) { uv_fs_req_cleanup(&read_req); iov = uv_buf_init(buf, sizeof(buf)); - r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, + r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, read_req.result, NULL); ASSERT(r == 0); ASSERT(read_req.result == 0); uv_fs_req_cleanup(&read_req); - r = uv_fs_close(loop, &close_req, open_req1.result, NULL); + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); ASSERT(r == 0); ASSERT(close_req.result == 0); uv_fs_req_cleanup(&close_req); @@ -2328,3 +2323,211 @@ TEST_IMPL(fs_write_multiple_bufs) { MAKE_VALGRIND_HAPPY(); return 0; } + + +TEST_IMPL(fs_write_alotof_bufs) { + const size_t iovcount = 54321; + uv_buf_t* iovs; + char* buffer; + size_t index; + int r; + + /* Setup. */ + unlink("test_file"); + + loop = uv_default_loop(); + + iovs = malloc(sizeof(*iovs) * iovcount); + ASSERT(iovs != NULL); + + r = uv_fs_open(NULL, + &open_req1, + "test_file", + O_RDWR | O_CREAT, + S_IWUSR | S_IRUSR, + NULL); + ASSERT(r >= 0); + ASSERT(open_req1.result >= 0); + uv_fs_req_cleanup(&open_req1); + + for (index = 0; index < iovcount; ++index) + iovs[index] = uv_buf_init(test_buf, sizeof(test_buf)); + + r = uv_fs_write(NULL, + &write_req, + open_req1.result, + iovs, + iovcount, + -1, + NULL); + ASSERT(r >= 0); + ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount); + uv_fs_req_cleanup(&write_req); + + /* Read the strings back to separate buffers. */ + buffer = malloc(sizeof(test_buf) * iovcount); + ASSERT(buffer != NULL); + + for (index = 0; index < iovcount; ++index) + iovs[index] = uv_buf_init(buffer + index * sizeof(test_buf), + sizeof(test_buf)); + + r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, iovcount, 0, NULL); + ASSERT(r >= 0); + ASSERT((size_t)read_req.result == sizeof(test_buf) * iovcount); + + for (index = 0; index < iovcount; ++index) + ASSERT(strncmp(buffer + index * sizeof(test_buf), + test_buf, + sizeof(test_buf)) == 0); + + uv_fs_req_cleanup(&read_req); + free(buffer); + + iov = uv_buf_init(buf, sizeof(buf)); + r = uv_fs_read(NULL, + &read_req, + open_req1.result, + &iov, + 1, + read_req.result, + NULL); + ASSERT(r == 0); + ASSERT(read_req.result == 0); + uv_fs_req_cleanup(&read_req); + + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); + ASSERT(r == 0); + ASSERT(close_req.result == 0); + uv_fs_req_cleanup(&close_req); + + /* Cleanup */ + unlink("test_file"); + free(iovs); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + +TEST_IMPL(fs_write_alotof_bufs_with_offset) { + const size_t iovcount = 54321; + uv_buf_t* iovs; + char* buffer; + size_t index; + int r; + int64_t offset; + char* filler = "0123456789"; + int filler_len = strlen(filler); + + /* Setup. */ + unlink("test_file"); + + loop = uv_default_loop(); + + iovs = malloc(sizeof(*iovs) * iovcount); + ASSERT(iovs != NULL); + + r = uv_fs_open(NULL, + &open_req1, + "test_file", + O_RDWR | O_CREAT, + S_IWUSR | S_IRUSR, + NULL); + ASSERT(r >= 0); + ASSERT(open_req1.result >= 0); + uv_fs_req_cleanup(&open_req1); + + iov = uv_buf_init(filler, filler_len); + r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); + ASSERT(r == filler_len); + ASSERT(write_req.result == filler_len); + uv_fs_req_cleanup(&write_req); + offset = (int64_t)r; + + for (index = 0; index < iovcount; ++index) + iovs[index] = uv_buf_init(test_buf, sizeof(test_buf)); + + r = uv_fs_write(NULL, + &write_req, + open_req1.result, + iovs, + iovcount, + offset, + NULL); + ASSERT(r >= 0); + ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount); + uv_fs_req_cleanup(&write_req); + + /* Read the strings back to separate buffers. */ + buffer = malloc(sizeof(test_buf) * iovcount); + ASSERT(buffer != NULL); + + for (index = 0; index < iovcount; ++index) + iovs[index] = uv_buf_init(buffer + index * sizeof(test_buf), + sizeof(test_buf)); + + r = uv_fs_read(NULL, &read_req, open_req1.result, + iovs, iovcount, offset, NULL); + ASSERT(r >= 0); + ASSERT(read_req.result == sizeof(test_buf) * iovcount); + + for (index = 0; index < iovcount; ++index) + ASSERT(strncmp(buffer + index * sizeof(test_buf), + test_buf, + sizeof(test_buf)) == 0); + + uv_fs_req_cleanup(&read_req); + free(buffer); + + r = uv_fs_stat(NULL, &stat_req, "test_file", NULL); + ASSERT(r == 0); + ASSERT((int64_t)((uv_stat_t*)stat_req.ptr)->st_size == + offset + (int64_t)(iovcount * sizeof(test_buf))); + uv_fs_req_cleanup(&stat_req); + + iov = uv_buf_init(buf, sizeof(buf)); + r = uv_fs_read(NULL, + &read_req, + open_req1.result, + &iov, + 1, + read_req.result + offset, + NULL); + ASSERT(r == 0); + ASSERT(read_req.result == 0); + uv_fs_req_cleanup(&read_req); + + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); + ASSERT(r == 0); + ASSERT(close_req.result == 0); + uv_fs_req_cleanup(&close_req); + + /* Cleanup */ + unlink("test_file"); + free(iovs); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + +TEST_IMPL(fs_read_write_null_arguments) { + int r; + + r = uv_fs_read(NULL, NULL, 0, NULL, 0, -1, NULL); + ASSERT(r == UV_EINVAL); + + r = uv_fs_write(NULL, NULL, 0, NULL, 0, -1, NULL); + ASSERT(r == UV_EINVAL); + + iov = uv_buf_init(NULL, 0); + r = uv_fs_read(NULL, NULL, 0, &iov, 0, -1, NULL); + ASSERT(r == UV_EINVAL); + + iov = uv_buf_init(NULL, 0); + r = uv_fs_write(NULL, NULL, 0, &iov, 0, -1, NULL); + ASSERT(r == UV_EINVAL); + + return 0; +} diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h index 1e4018c98b8..31899664f50 100644 --- a/deps/uv/test/test-list.h +++ b/deps/uv/test/test-list.h @@ -66,6 +66,7 @@ TEST_DECLARE (tcp_write_fail) TEST_DECLARE (tcp_try_write) TEST_DECLARE (tcp_write_queue_order) TEST_DECLARE (tcp_open) +TEST_DECLARE (tcp_open_twice) TEST_DECLARE (tcp_connect_error_after_write) TEST_DECLARE (tcp_shutdown_after_write) TEST_DECLARE (tcp_bind_error_addrinuse) @@ -80,6 +81,10 @@ TEST_DECLARE (tcp_connect_error_fault) TEST_DECLARE (tcp_connect_timeout) TEST_DECLARE (tcp_close_while_connecting) TEST_DECLARE (tcp_close) +TEST_DECLARE (tcp_create_early) +TEST_DECLARE (tcp_create_early_bad_bind) +TEST_DECLARE (tcp_create_early_bad_domain) +TEST_DECLARE (tcp_create_early_accept) #ifndef _WIN32 TEST_DECLARE (tcp_close_accept) TEST_DECLARE (tcp_oob) @@ -95,6 +100,9 @@ TEST_DECLARE (tcp_bind6_error_inval) TEST_DECLARE (tcp_bind6_localhost_ok) TEST_DECLARE (udp_bind) TEST_DECLARE (udp_bind_reuseaddr) +TEST_DECLARE (udp_create_early) +TEST_DECLARE (udp_create_early_bad_bind) +TEST_DECLARE (udp_create_early_bad_domain) TEST_DECLARE (udp_send_and_recv) TEST_DECLARE (udp_send_immediate) TEST_DECLARE (udp_send_unreachable) @@ -110,10 +118,12 @@ TEST_DECLARE (udp_options) TEST_DECLARE (udp_options6) TEST_DECLARE (udp_no_autobind) TEST_DECLARE (udp_open) +TEST_DECLARE (udp_open_twice) TEST_DECLARE (udp_try_send) TEST_DECLARE (pipe_bind_error_addrinuse) TEST_DECLARE (pipe_bind_error_addrnotavail) TEST_DECLARE (pipe_bind_error_inval) +TEST_DECLARE (pipe_connect_multiple) TEST_DECLARE (pipe_listen_without_bind) TEST_DECLARE (pipe_connect_bad_name) TEST_DECLARE (pipe_connect_to_file) @@ -121,6 +131,7 @@ TEST_DECLARE (pipe_connect_on_prepare) TEST_DECLARE (pipe_getsockname) TEST_DECLARE (pipe_getsockname_abstract) TEST_DECLARE (pipe_getsockname_blocking) +TEST_DECLARE (pipe_pending_instances) TEST_DECLARE (pipe_sendmsg) TEST_DECLARE (pipe_server_close) TEST_DECLARE (connection_fail) @@ -221,6 +232,7 @@ TEST_DECLARE (spawn_stdout_and_stderr_to_file_swap) TEST_DECLARE (spawn_auto_unref) TEST_DECLARE (spawn_closed_process_io) TEST_DECLARE (spawn_reads_child_path) +TEST_DECLARE (spawn_inherit_streams) TEST_DECLARE (fs_poll) TEST_DECLARE (fs_poll_getpath) TEST_DECLARE (kill) @@ -248,6 +260,7 @@ TEST_DECLARE (fs_file_open_append) TEST_DECLARE (fs_stat_missing_path) TEST_DECLARE (fs_read_file_eof) TEST_DECLARE (fs_event_watch_dir) +TEST_DECLARE (fs_event_watch_dir_recursive) TEST_DECLARE (fs_event_watch_file) TEST_DECLARE (fs_event_watch_file_twice) TEST_DECLARE (fs_event_watch_file_current_dir) @@ -264,6 +277,9 @@ TEST_DECLARE (fs_scandir_file) TEST_DECLARE (fs_open_dir) TEST_DECLARE (fs_rename_to_existing_file) TEST_DECLARE (fs_write_multiple_bufs) +TEST_DECLARE (fs_read_write_null_arguments) +TEST_DECLARE (fs_write_alotof_bufs) +TEST_DECLARE (fs_write_alotof_bufs_with_offset) TEST_DECLARE (threadpool_queue_work_simple) TEST_DECLARE (threadpool_queue_work_einval) TEST_DECLARE (threadpool_multiple_event_loops) @@ -289,8 +305,10 @@ TEST_DECLARE (ip6_addr_link_local) TEST_DECLARE (poll_close_doesnt_corrupt_stack) TEST_DECLARE (poll_closesocket) TEST_DECLARE (spawn_detect_pipe_name_collisions_on_windows) +#if !defined(USING_UV_SHARED) TEST_DECLARE (argument_escaping) TEST_DECLARE (environment_creation) +#endif TEST_DECLARE (listen_with_simultaneous_accepts) TEST_DECLARE (listen_no_simultaneous_accepts) TEST_DECLARE (fs_stat_root) @@ -393,6 +411,7 @@ TASK_LIST_START TEST_ENTRY (tcp_open) TEST_HELPER (tcp_open, tcp4_echo_server) + TEST_ENTRY (tcp_open_twice) TEST_ENTRY (tcp_shutdown_after_write) TEST_HELPER (tcp_shutdown_after_write, tcp4_echo_server) @@ -410,6 +429,10 @@ TASK_LIST_START TEST_ENTRY (tcp_connect_timeout) TEST_ENTRY (tcp_close_while_connecting) TEST_ENTRY (tcp_close) + TEST_ENTRY (tcp_create_early) + TEST_ENTRY (tcp_create_early_bad_bind) + TEST_ENTRY (tcp_create_early_bad_domain) + TEST_ENTRY (tcp_create_early_accept) #ifndef _WIN32 TEST_ENTRY (tcp_close_accept) TEST_ENTRY (tcp_oob) @@ -429,6 +452,9 @@ TASK_LIST_START TEST_ENTRY (udp_bind) TEST_ENTRY (udp_bind_reuseaddr) + TEST_ENTRY (udp_create_early) + TEST_ENTRY (udp_create_early_bad_bind) + TEST_ENTRY (udp_create_early_bad_domain) TEST_ENTRY (udp_send_and_recv) TEST_ENTRY (udp_send_immediate) TEST_ENTRY (udp_send_unreachable) @@ -447,14 +473,17 @@ TASK_LIST_START TEST_ENTRY (udp_open) TEST_HELPER (udp_open, udp4_echo_server) + TEST_ENTRY (udp_open_twice) TEST_ENTRY (pipe_bind_error_addrinuse) TEST_ENTRY (pipe_bind_error_addrnotavail) TEST_ENTRY (pipe_bind_error_inval) + TEST_ENTRY (pipe_connect_multiple) TEST_ENTRY (pipe_listen_without_bind) TEST_ENTRY (pipe_getsockname) TEST_ENTRY (pipe_getsockname_abstract) TEST_ENTRY (pipe_getsockname_blocking) + TEST_ENTRY (pipe_pending_instances) TEST_ENTRY (pipe_sendmsg) TEST_ENTRY (connection_fail) @@ -590,6 +619,7 @@ TASK_LIST_START TEST_ENTRY (spawn_auto_unref) TEST_ENTRY (spawn_closed_process_io) TEST_ENTRY (spawn_reads_child_path) + TEST_ENTRY (spawn_inherit_streams) TEST_ENTRY (fs_poll) TEST_ENTRY (fs_poll_getpath) TEST_ENTRY (kill) @@ -598,8 +628,10 @@ TASK_LIST_START TEST_ENTRY (poll_close_doesnt_corrupt_stack) TEST_ENTRY (poll_closesocket) TEST_ENTRY (spawn_detect_pipe_name_collisions_on_windows) +#if !defined(USING_UV_SHARED) TEST_ENTRY (argument_escaping) TEST_ENTRY (environment_creation) +# endif TEST_ENTRY (listen_with_simultaneous_accepts) TEST_ENTRY (listen_no_simultaneous_accepts) TEST_ENTRY (fs_stat_root) @@ -644,6 +676,7 @@ TASK_LIST_START TEST_ENTRY (fs_read_file_eof) TEST_ENTRY (fs_file_open_append) TEST_ENTRY (fs_event_watch_dir) + TEST_ENTRY (fs_event_watch_dir_recursive) TEST_ENTRY (fs_event_watch_file) TEST_ENTRY (fs_event_watch_file_twice) TEST_ENTRY (fs_event_watch_file_current_dir) @@ -660,6 +693,9 @@ TASK_LIST_START TEST_ENTRY (fs_open_dir) TEST_ENTRY (fs_rename_to_existing_file) TEST_ENTRY (fs_write_multiple_bufs) + TEST_ENTRY (fs_write_alotof_bufs) + TEST_ENTRY (fs_write_alotof_bufs_with_offset) + TEST_ENTRY (fs_read_write_null_arguments) TEST_ENTRY (threadpool_queue_work_simple) TEST_ENTRY (threadpool_queue_work_einval) TEST_ENTRY (threadpool_multiple_event_loops) diff --git a/deps/uv/test/test-pipe-connect-multiple.c b/deps/uv/test/test-pipe-connect-multiple.c new file mode 100644 index 00000000000..3de5a9a0bf4 --- /dev/null +++ b/deps/uv/test/test-pipe-connect-multiple.c @@ -0,0 +1,104 @@ +/* Copyright (c) 2015 Saúl Ibarra Corretgé . + * All rights reserved. + * + * 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. + */ + +#include "uv.h" +#include "task.h" +#include +#include + + +static int connection_cb_called = 0; +static int connect_cb_called = 0; + +#define NUM_CLIENTS 4 + +typedef struct { + uv_pipe_t pipe_handle; + uv_connect_t conn_req; +} client_t; + +static uv_pipe_t server_handle; +static client_t clients[NUM_CLIENTS]; +static uv_pipe_t connections[NUM_CLIENTS]; + + +static void connection_cb(uv_stream_t* server, int status) { + int r; + uv_pipe_t* conn; + ASSERT(status == 0); + + conn = &connections[connection_cb_called]; + r = uv_pipe_init(server->loop, conn, 0); + ASSERT(r == 0); + + r = uv_accept(server, (uv_stream_t*)conn); + ASSERT(r == 0); + + if (++connection_cb_called == NUM_CLIENTS && + connect_cb_called == NUM_CLIENTS) { + uv_stop(server->loop); + } +} + + +static void connect_cb(uv_connect_t* connect_req, int status) { + ASSERT(status == 0); + if (++connect_cb_called == NUM_CLIENTS && + connection_cb_called == NUM_CLIENTS) { + uv_stop(connect_req->handle->loop); + } +} + + +TEST_IMPL(pipe_connect_multiple) { + int i; + int r; + uv_loop_t* loop; + + loop = uv_default_loop(); + + r = uv_pipe_init(loop, &server_handle, 0); + ASSERT(r == 0); + + r = uv_pipe_bind(&server_handle, TEST_PIPENAME); + ASSERT(r == 0); + + r = uv_listen((uv_stream_t*)&server_handle, 128, connection_cb); + ASSERT(r == 0); + + for (i = 0; i < NUM_CLIENTS; i++) { + r = uv_pipe_init(loop, &clients[i].pipe_handle, 0); + ASSERT(r == 0); + uv_pipe_connect(&clients[i].conn_req, + &clients[i].pipe_handle, + TEST_PIPENAME, + connect_cb); + } + + uv_run(loop, UV_RUN_DEFAULT); + + ASSERT(connection_cb_called == NUM_CLIENTS); + ASSERT(connect_cb_called == NUM_CLIENTS); + + MAKE_VALGRIND_HAPPY(); + return 0; +} diff --git a/deps/uv/test/test-pipe-pending-instances.c b/deps/uv/test/test-pipe-pending-instances.c new file mode 100644 index 00000000000..b6ff911a0f2 --- /dev/null +++ b/deps/uv/test/test-pipe-pending-instances.c @@ -0,0 +1,59 @@ +/* Copyright (c) 2015 Saúl Ibarra Corretgé . + * All rights reserved. + * + * 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. + */ + +#include "uv.h" +#include "task.h" + + +static void connection_cb(uv_stream_t* server, int status) { + ASSERT(0 && "this will never be called"); +} + + +TEST_IMPL(pipe_pending_instances) { + int r; + uv_pipe_t pipe_handle; + uv_loop_t* loop; + + loop = uv_default_loop(); + + r = uv_pipe_init(loop, &pipe_handle, 0); + ASSERT(r == 0); + + uv_pipe_pending_instances(&pipe_handle, 8); + + r = uv_pipe_bind(&pipe_handle, TEST_PIPENAME); + ASSERT(r == 0); + + uv_pipe_pending_instances(&pipe_handle, 16); + + r = uv_listen((uv_stream_t*)&pipe_handle, 128, connection_cb); + ASSERT(r == 0); + + uv_close((uv_handle_t*)&pipe_handle, NULL); + + r = uv_run(loop, UV_RUN_DEFAULT); + ASSERT(r == 0); + + MAKE_VALGRIND_HAPPY(); + return 0; +} diff --git a/deps/uv/test/test-signal-multiple-loops.c b/deps/uv/test/test-signal-multiple-loops.c index f8fef36ee04..158129919bd 100644 --- a/deps/uv/test/test-signal-multiple-loops.c +++ b/deps/uv/test/test-signal-multiple-loops.c @@ -185,6 +185,7 @@ static void loop_creating_worker(void* context) { ASSERT(r == 0); uv_loop_close(loop); + free(loop); increment_counter(&loop_creation_counter); } while (!stop); diff --git a/deps/uv/test/test-spawn.c b/deps/uv/test/test-spawn.c index d01862abe1d..e71f0f7d53d 100644 --- a/deps/uv/test/test-spawn.c +++ b/deps/uv/test/test-spawn.c @@ -277,7 +277,7 @@ TEST_IMPL(spawn_stdout_to_file) { init_process_options("spawn_helper2", exit_cb); - r = uv_fs_open(uv_default_loop(), &fs_req, "stdout_file", O_CREAT | O_RDWR, + r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&fs_req); @@ -300,11 +300,11 @@ TEST_IMPL(spawn_stdout_to_file) { ASSERT(close_cb_called == 1); buf = uv_buf_init(output, sizeof(output)); - r = uv_fs_read(uv_default_loop(), &fs_req, file, &buf, 1, 0, NULL); + r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); ASSERT(r == 12); uv_fs_req_cleanup(&fs_req); - r = uv_fs_close(uv_default_loop(), &fs_req, file, NULL); + r = uv_fs_close(NULL, &fs_req, file, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&fs_req); @@ -331,7 +331,7 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file) { init_process_options("spawn_helper6", exit_cb); - r = uv_fs_open(uv_default_loop(), &fs_req, "stdout_file", O_CREAT | O_RDWR, + r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&fs_req); @@ -356,11 +356,11 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file) { ASSERT(close_cb_called == 1); buf = uv_buf_init(output, sizeof(output)); - r = uv_fs_read(uv_default_loop(), &fs_req, file, &buf, 1, 0, NULL); + r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); ASSERT(r == 27); uv_fs_req_cleanup(&fs_req); - r = uv_fs_close(uv_default_loop(), &fs_req, file, NULL); + r = uv_fs_close(NULL, &fs_req, file, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&fs_req); @@ -389,7 +389,7 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file2) { init_process_options("spawn_helper6", exit_cb); /* Replace stderr with our file */ - r = uv_fs_open(uv_default_loop(), + r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, @@ -418,11 +418,11 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file2) { ASSERT(close_cb_called == 1); buf = uv_buf_init(output, sizeof(output)); - r = uv_fs_read(uv_default_loop(), &fs_req, file, &buf, 1, 0, NULL); + r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); ASSERT(r == 27); uv_fs_req_cleanup(&fs_req); - r = uv_fs_close(uv_default_loop(), &fs_req, file, NULL); + r = uv_fs_close(NULL, &fs_req, file, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&fs_req); @@ -456,7 +456,7 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) { init_process_options("spawn_helper6", exit_cb); /* open 'stdout_file' and replace STDOUT_FILENO with it */ - r = uv_fs_open(uv_default_loop(), + r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, @@ -468,7 +468,7 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) { ASSERT(stdout_file != -1); /* open 'stderr_file' and replace STDERR_FILENO with it */ - r = uv_fs_open(uv_default_loop(), &fs_req, "stderr_file", O_CREAT | O_RDWR, + r = uv_fs_open(NULL, &fs_req, "stderr_file", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); ASSERT(r != -1); uv_fs_req_cleanup(&fs_req); @@ -497,11 +497,11 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) { buf = uv_buf_init(output, sizeof(output)); /* check the content of stdout_file */ - r = uv_fs_read(uv_default_loop(), &fs_req, stdout_file, &buf, 1, 0, NULL); + r = uv_fs_read(NULL, &fs_req, stdout_file, &buf, 1, 0, NULL); ASSERT(r >= 15); uv_fs_req_cleanup(&fs_req); - r = uv_fs_close(uv_default_loop(), &fs_req, stdout_file, NULL); + r = uv_fs_close(NULL, &fs_req, stdout_file, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&fs_req); @@ -509,11 +509,11 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) { ASSERT(strncmp("hello errworld\n", output, 15) == 0); /* check the content of stderr_file */ - r = uv_fs_read(uv_default_loop(), &fs_req, stderr_file, &buf, 1, 0, NULL); + r = uv_fs_read(NULL, &fs_req, stderr_file, &buf, 1, 0, NULL); ASSERT(r >= 12); uv_fs_req_cleanup(&fs_req); - r = uv_fs_close(uv_default_loop(), &fs_req, stderr_file, NULL); + r = uv_fs_close(NULL, &fs_req, stderr_file, NULL); ASSERT(r == 0); uv_fs_req_cleanup(&fs_req); @@ -994,6 +994,7 @@ TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) { } +#if !defined(USING_UV_SHARED) int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr); WCHAR* quote_cmd_arg(const WCHAR *source, WCHAR *target); @@ -1196,6 +1197,7 @@ TEST_IMPL(environment_creation) { return 0; } +#endif /* Regression test for issue #909 */ TEST_IMPL(spawn_with_an_odd_path) { @@ -1397,8 +1399,9 @@ TEST_IMPL(spawn_fs_open) { uv_buf_t buf; uv_stdio_container_t stdio[1]; - fd = uv_fs_open(uv_default_loop(), &fs_req, "/dev/null", O_RDWR, 0, NULL); + fd = uv_fs_open(NULL, &fs_req, "/dev/null", O_RDWR, 0, NULL); ASSERT(fd >= 0); + uv_fs_req_cleanup(&fs_req); init_process_options("spawn_helper8", exit_cb); @@ -1415,7 +1418,7 @@ TEST_IMPL(spawn_fs_open) { ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb)); ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_fs_close(uv_default_loop(), &fs_req, fd, NULL)); + ASSERT(0 == uv_fs_close(NULL, &fs_req, fd, NULL)); ASSERT(exit_cb_called == 1); ASSERT(close_cb_called == 2); /* One for `in`, one for process */ @@ -1540,3 +1543,164 @@ TEST_IMPL(spawn_reads_child_path) { MAKE_VALGRIND_HAPPY(); return 0; } + +#ifndef _WIN32 +static int mpipe(int *fds) { + if (pipe(fds) == -1) + return -1; + if (fcntl(fds[0], F_SETFD, FD_CLOEXEC) == -1 || + fcntl(fds[1], F_SETFD, FD_CLOEXEC) == -1) { + close(fds[0]); + close(fds[1]); + return -1; + } + return 0; +} +#else +static int mpipe(int *fds) { + SECURITY_ATTRIBUTES attr; + HANDLE readh, writeh; + attr.nLength = sizeof(attr); + attr.lpSecurityDescriptor = NULL; + attr.bInheritHandle = FALSE; + if (!CreatePipe(&readh, &writeh, &attr, 0)) + return -1; + fds[0] = _open_osfhandle((intptr_t)readh, 0); + fds[1] = _open_osfhandle((intptr_t)writeh, 0); + if (fds[0] == -1 || fds[1] == -1) { + CloseHandle(readh); + CloseHandle(writeh); + return -1; + } + return 0; +} +#endif /* !_WIN32 */ + +TEST_IMPL(spawn_inherit_streams) { + uv_process_t child_req; + uv_stdio_container_t child_stdio[2]; + int fds_stdin[2]; + int fds_stdout[2]; + uv_pipe_t pipe_stdin_child; + uv_pipe_t pipe_stdout_child; + uv_pipe_t pipe_stdin_parent; + uv_pipe_t pipe_stdout_parent; + unsigned char ubuf[OUTPUT_SIZE - 1]; + uv_buf_t buf; + unsigned int i; + int r; + uv_write_t write_req; + uv_loop_t* loop; + + init_process_options("spawn_helper9", exit_cb); + + loop = uv_default_loop(); + ASSERT(uv_pipe_init(loop, &pipe_stdin_child, 0) == 0); + ASSERT(uv_pipe_init(loop, &pipe_stdout_child, 0) == 0); + ASSERT(uv_pipe_init(loop, &pipe_stdin_parent, 0) == 0); + ASSERT(uv_pipe_init(loop, &pipe_stdout_parent, 0) == 0); + + ASSERT(mpipe(fds_stdin) != -1); + ASSERT(mpipe(fds_stdout) != -1); + + ASSERT(uv_pipe_open(&pipe_stdin_child, fds_stdin[0]) == 0); + ASSERT(uv_pipe_open(&pipe_stdout_child, fds_stdout[1]) == 0); + ASSERT(uv_pipe_open(&pipe_stdin_parent, fds_stdin[1]) == 0); + ASSERT(uv_pipe_open(&pipe_stdout_parent, fds_stdout[0]) == 0); + + child_stdio[0].flags = UV_INHERIT_STREAM; + child_stdio[0].data.stream = (uv_stream_t *)&pipe_stdin_child; + + child_stdio[1].flags = UV_INHERIT_STREAM; + child_stdio[1].data.stream = (uv_stream_t *)&pipe_stdout_child; + + options.stdio = child_stdio; + options.stdio_count = 2; + + ASSERT(uv_spawn(loop, &child_req, &options) == 0); + + uv_close((uv_handle_t*)&pipe_stdin_child, NULL); + uv_close((uv_handle_t*)&pipe_stdout_child, NULL); + + buf = uv_buf_init((char*)ubuf, sizeof ubuf); + for (i = 0; i < sizeof ubuf; ++i) + ubuf[i] = i & 255u; + memset(output, 0, sizeof ubuf); + + r = uv_write(&write_req, + (uv_stream_t*)&pipe_stdin_parent, + &buf, + 1, + write_cb); + ASSERT(r == 0); + + r = uv_read_start((uv_stream_t*)&pipe_stdout_parent, on_alloc, on_read); + ASSERT(r == 0); + + r = uv_run(loop, UV_RUN_DEFAULT); + ASSERT(r == 0); + + ASSERT(exit_cb_called == 1); + ASSERT(close_cb_called == 3); + + r = memcmp(ubuf, output, sizeof ubuf); + ASSERT(r == 0); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + +/* Helper for child process of spawn_inherit_streams */ +#ifndef _WIN32 +int spawn_stdin_stdout(void) { + char buf[1024]; + char* pbuf; + for (;;) { + ssize_t r, w, c; + do { + r = read(0, buf, sizeof buf); + } while (r == -1 && errno == EINTR); + if (r == 0) { + return 1; + } + ASSERT(r > 0); + c = r; + pbuf = buf; + while (c) { + do { + w = write(1, pbuf, (size_t)c); + } while (w == -1 && errno == EINTR); + ASSERT(w >= 0); + pbuf = pbuf + w; + c = c - w; + } + } + return 2; +} +#else +int spawn_stdin_stdout(void) { + char buf[1024]; + char* pbuf; + HANDLE h_stdin = GetStdHandle(STD_INPUT_HANDLE); + HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE); + ASSERT(h_stdin != INVALID_HANDLE_VALUE); + ASSERT(h_stdout != INVALID_HANDLE_VALUE); + for (;;) { + DWORD n_read; + DWORD n_written; + DWORD to_write; + if (!ReadFile(h_stdin, buf, sizeof buf, &n_read, NULL)) { + ASSERT(GetLastError() == ERROR_BROKEN_PIPE); + return 1; + } + to_write = n_read; + pbuf = buf; + while (to_write) { + ASSERT(WriteFile(h_stdout, pbuf, to_write, &n_written, NULL)); + to_write -= n_written; + pbuf += n_written; + } + } + return 2; +} +#endif /* !_WIN32 */ diff --git a/deps/uv/test/test-tcp-close-while-connecting.c b/deps/uv/test/test-tcp-close-while-connecting.c index 0a69a0ddee7..2c39b652b61 100644 --- a/deps/uv/test/test-tcp-close-while-connecting.c +++ b/deps/uv/test/test-tcp-close-while-connecting.c @@ -59,14 +59,18 @@ TEST_IMPL(tcp_close_while_connecting) { uv_connect_t connect_req; struct sockaddr_in addr; uv_loop_t* loop; + int r; loop = uv_default_loop(); ASSERT(0 == uv_ip4_addr("1.2.3.4", TEST_PORT, &addr)); ASSERT(0 == uv_tcp_init(loop, &tcp_handle)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &tcp_handle, - (const struct sockaddr*) &addr, - connect_cb)); + r = uv_tcp_connect(&connect_req, + &tcp_handle, + (const struct sockaddr*) &addr, + connect_cb); + if (r == UV_ENETUNREACH) + RETURN_SKIP("Network unreachable."); + ASSERT(r == 0); ASSERT(0 == uv_timer_init(loop, &timer1_handle)); ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 50, 0)); ASSERT(0 == uv_timer_init(loop, &timer2_handle)); diff --git a/deps/uv/test/test-tcp-connect-timeout.c b/deps/uv/test/test-tcp-connect-timeout.c index a22c773c6d8..081424b8002 100644 --- a/deps/uv/test/test-tcp-connect-timeout.c +++ b/deps/uv/test/test-tcp-connect-timeout.c @@ -79,6 +79,8 @@ TEST_IMPL(tcp_connect_timeout) { &conn, (const struct sockaddr*) &addr, connect_cb); + if (r == UV_ENETUNREACH) + RETURN_SKIP("Network unreachable."); ASSERT(r == 0); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); diff --git a/deps/uv/test/test-tcp-create-socket-early.c b/deps/uv/test/test-tcp-create-socket-early.c new file mode 100644 index 00000000000..65650adcc27 --- /dev/null +++ b/deps/uv/test/test-tcp-create-socket-early.c @@ -0,0 +1,206 @@ +/* Copyright (c) 2015 Saúl Ibarra Corretgé . + * All rights reserved. + * + * 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. + */ + +#include "uv.h" +#include "task.h" +#include + +#ifdef _WIN32 +# define INVALID_FD (INVALID_HANDLE_VALUE) +#else +# define INVALID_FD (-1) +#endif + + +static void on_connect(uv_connect_t* req, int status) { + ASSERT(status == 0); + uv_close((uv_handle_t*) req->handle, NULL); +} + + +static void on_connection(uv_stream_t* server, int status) { + uv_tcp_t* handle; + int r; + + ASSERT(status == 0); + + handle = malloc(sizeof(*handle)); + ASSERT(handle != NULL); + + r = uv_tcp_init_ex(server->loop, handle, AF_INET); + ASSERT(r == 0); + + r = uv_accept(server, (uv_stream_t*)handle); + ASSERT(r == UV_EBUSY); + + uv_close((uv_handle_t*) server, NULL); + uv_close((uv_handle_t*) handle, (uv_close_cb)free); +} + + +static void tcp_listener(uv_loop_t* loop, uv_tcp_t* server) { + struct sockaddr_in addr; + int r; + + ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + + r = uv_tcp_init(loop, server); + ASSERT(r == 0); + + r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0); + ASSERT(r == 0); + + r = uv_listen((uv_stream_t*) server, 128, on_connection); + ASSERT(r == 0); +} + + +static void tcp_connector(uv_loop_t* loop, uv_tcp_t* client, uv_connect_t* req) { + struct sockaddr_in server_addr; + int r; + + ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + + r = uv_tcp_init(loop, client); + ASSERT(r == 0); + + r = uv_tcp_connect(req, + client, + (const struct sockaddr*) &server_addr, + on_connect); + ASSERT(r == 0); +} + + +TEST_IMPL(tcp_create_early) { + struct sockaddr_in addr; + struct sockaddr_in sockname; + uv_tcp_t client; + uv_os_fd_t fd; + int r, namelen; + + ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + + r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET); + ASSERT(r == 0); + + r = uv_fileno((const uv_handle_t*) &client, &fd); + ASSERT(r == 0); + ASSERT(fd != INVALID_FD); + + /* Windows returns WSAEINVAL if the socket is not bound */ +#ifndef _WIN32 + namelen = sizeof sockname; + r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); + ASSERT(r == 0); + ASSERT(sockname.sin_family == AF_INET); +#endif + + r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0); + ASSERT(r == 0); + + namelen = sizeof sockname; + r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); + ASSERT(r == 0); + ASSERT(memcmp(&addr.sin_addr, + &sockname.sin_addr, + sizeof(addr.sin_addr)) == 0); + + uv_close((uv_handle_t*) &client, NULL); + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + +TEST_IMPL(tcp_create_early_bad_bind) { + struct sockaddr_in addr; + uv_tcp_t client; + uv_os_fd_t fd; + int r; + + ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + + r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET6); + ASSERT(r == 0); + + r = uv_fileno((const uv_handle_t*) &client, &fd); + ASSERT(r == 0); + ASSERT(fd != INVALID_FD); + + /* Windows returns WSAEINVAL if the socket is not bound */ +#ifndef _WIN32 + { + int namelen; + struct sockaddr_in6 sockname; + namelen = sizeof sockname; + r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); + ASSERT(r == 0); + ASSERT(sockname.sin6_family == AF_INET6); + } +#endif + + r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0); +#ifndef _WIN32 + ASSERT(r == UV_EINVAL); +#else + ASSERT(r == UV_EFAULT); +#endif + + uv_close((uv_handle_t*) &client, NULL); + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + +TEST_IMPL(tcp_create_early_bad_domain) { + uv_tcp_t client; + int r; + + r = uv_tcp_init_ex(uv_default_loop(), &client, 47); + ASSERT(r == UV_EINVAL); + + r = uv_tcp_init_ex(uv_default_loop(), &client, 1024); + ASSERT(r == UV_EINVAL); + + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + +TEST_IMPL(tcp_create_early_accept) { + uv_tcp_t client, server; + uv_connect_t connect_req; + + tcp_listener(uv_default_loop(), &server); + tcp_connector(uv_default_loop(), &client, &connect_req); + + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} diff --git a/deps/uv/test/test-tcp-open.c b/deps/uv/test/test-tcp-open.c index edeacc70e4f..6c8d43d0009 100644 --- a/deps/uv/test/test-tcp-open.c +++ b/deps/uv/test/test-tcp-open.c @@ -71,6 +71,17 @@ static uv_os_sock_t create_tcp_socket(void) { } +static void close_socket(uv_os_sock_t sock) { + int r; +#ifdef _WIN32 + r = closesocket(sock); +#else + r = close(sock); +#endif + ASSERT(r == 0); +} + + static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { @@ -180,3 +191,30 @@ TEST_IMPL(tcp_open) { MAKE_VALGRIND_HAPPY(); return 0; } + + +TEST_IMPL(tcp_open_twice) { + uv_tcp_t client; + uv_os_sock_t sock1, sock2; + int r; + + startup(); + sock1 = create_tcp_socket(); + sock2 = create_tcp_socket(); + + r = uv_tcp_init(uv_default_loop(), &client); + ASSERT(r == 0); + + r = uv_tcp_open(&client, sock1); + ASSERT(r == 0); + + r = uv_tcp_open(&client, sock2); + ASSERT(r == UV_EBUSY); + close_socket(sock2); + + uv_close((uv_handle_t*) &client, NULL); + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} diff --git a/deps/uv/test/test-tcp-squelch-connreset.c b/deps/uv/test/test-tcp-squelch-connreset.c new file mode 100644 index 00000000000..f1c57437977 --- /dev/null +++ b/deps/uv/test/test-tcp-squelch-connreset.c @@ -0,0 +1,119 @@ +/* Copyright (c) 2015, Santiago Gimeno + * + * 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. + */ + +#include "uv.h" +#include "task.h" +#include +#include + + +static uv_tcp_t tcp_server; +static uv_tcp_t tcp_client; +static uv_tcp_t tcp_server_client; +static uv_connect_t connect_req; +static uv_write_t write_req; + +static void alloc_cb(uv_handle_t* handle, + size_t size, + uv_buf_t* buf) { + buf->base = malloc(size); + buf->len = size; +} + +static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { + free(buf->base); + ASSERT(nread == UV_EOF); +} + +static void on_connect(uv_connect_t* req, int status) { + int r; + uv_buf_t outbuf; + + ASSERT(req != NULL); + ASSERT(status == 0); + + outbuf = uv_buf_init("ping", 4); + r = uv_write(&write_req, (uv_stream_t*) req->handle, &outbuf, 1, NULL); + ASSERT(r == 0); + + r = uv_read_start((uv_stream_t*) req->handle, alloc_cb, read_cb); + ASSERT(r == 0); +} + +static void on_connection(uv_stream_t* server, int status) { + int r; + + ASSERT(status == 0); + + r = uv_tcp_init(uv_default_loop(), &tcp_server_client); + ASSERT(r == 0); + + r = uv_accept(server, (uv_stream_t*) &tcp_server_client); + ASSERT(r == 0); + + uv_close((uv_handle_t*) &tcp_server_client, NULL); + uv_close((uv_handle_t*) &tcp_server, NULL); +} + +static void start_server(void) { + struct sockaddr_in addr; + int r; + + ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + + r = uv_tcp_init(uv_default_loop(), &tcp_server); + ASSERT(r == 0); + + r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); + ASSERT(r == 0); + + r = uv_listen((uv_stream_t*) &tcp_server, SOMAXCONN, on_connection); + ASSERT(r == 0); +} + +static void start_client(void) { + struct sockaddr_in addr; + int r; + + ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + + r = uv_tcp_init(uv_default_loop(), &tcp_client); + ASSERT(r == 0); + + r = uv_tcp_connect(&connect_req, + &tcp_client, + (const struct sockaddr*) &addr, + on_connect); + ASSERT(r == 0); +} + + +TEST_IMPL(tcp_squelch_connreset) { + + start_server(); + + start_client(); + + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} diff --git a/deps/uv/test/test-threadpool-cancel.c b/deps/uv/test/test-threadpool-cancel.c index f999cba818f..cb456224516 100644 --- a/deps/uv/test/test-threadpool-cancel.c +++ b/deps/uv/test/test-threadpool-cancel.c @@ -279,10 +279,12 @@ TEST_IMPL(threadpool_cancel_fs) { uv_fs_t reqs[25]; uv_loop_t* loop; unsigned n; + uv_buf_t iov; INIT_CANCEL_INFO(&ci, reqs); loop = uv_default_loop(); saturate_threadpool(); + iov = uv_buf_init(NULL, 0); /* Needs to match ARRAY_SIZE(fs_reqs). */ n = 0; @@ -300,7 +302,7 @@ TEST_IMPL(threadpool_cancel_fs) { ASSERT(0 == uv_fs_lstat(loop, reqs + n++, "/", fs_cb)); ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); ASSERT(0 == uv_fs_open(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_read(loop, reqs + n++, 0, NULL, 0, 0, fs_cb)); + ASSERT(0 == uv_fs_read(loop, reqs + n++, 0, &iov, 1, 0, fs_cb)); ASSERT(0 == uv_fs_scandir(loop, reqs + n++, "/", 0, fs_cb)); ASSERT(0 == uv_fs_readlink(loop, reqs + n++, "/", fs_cb)); ASSERT(0 == uv_fs_rename(loop, reqs + n++, "/", "/", fs_cb)); @@ -310,7 +312,7 @@ TEST_IMPL(threadpool_cancel_fs) { ASSERT(0 == uv_fs_symlink(loop, reqs + n++, "/", "/", 0, fs_cb)); ASSERT(0 == uv_fs_unlink(loop, reqs + n++, "/", fs_cb)); ASSERT(0 == uv_fs_utime(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_write(loop, reqs + n++, 0, NULL, 0, 0, fs_cb)); + ASSERT(0 == uv_fs_write(loop, reqs + n++, 0, &iov, 1, 0, fs_cb)); ASSERT(n == ARRAY_SIZE(reqs)); ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); diff --git a/deps/uv/test/test-udp-create-socket-early.c b/deps/uv/test/test-udp-create-socket-early.c new file mode 100644 index 00000000000..3d0152428b8 --- /dev/null +++ b/deps/uv/test/test-udp-create-socket-early.c @@ -0,0 +1,132 @@ +/* Copyright (c) 2015 Saúl Ibarra Corretgé . + * All rights reserved. + * + * 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. + */ + +#include "uv.h" +#include "task.h" +#include + +#ifdef _WIN32 +# define INVALID_FD (INVALID_HANDLE_VALUE) +#else +# define INVALID_FD (-1) +#endif + + +TEST_IMPL(udp_create_early) { + struct sockaddr_in addr; + struct sockaddr_in sockname; + uv_udp_t client; + uv_os_fd_t fd; + int r, namelen; + + ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + + r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET); + ASSERT(r == 0); + + r = uv_fileno((const uv_handle_t*) &client, &fd); + ASSERT(r == 0); + ASSERT(fd != INVALID_FD); + + /* Windows returns WSAEINVAL if the socket is not bound */ +#ifndef _WIN32 + namelen = sizeof sockname; + r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); + ASSERT(r == 0); + ASSERT(sockname.sin_family == AF_INET); +#endif + + r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); + ASSERT(r == 0); + + namelen = sizeof sockname; + r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); + ASSERT(r == 0); + ASSERT(memcmp(&addr.sin_addr, + &sockname.sin_addr, + sizeof(addr.sin_addr)) == 0); + + uv_close((uv_handle_t*) &client, NULL); + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + +TEST_IMPL(udp_create_early_bad_bind) { + struct sockaddr_in addr; + uv_udp_t client; + uv_os_fd_t fd; + int r; + + ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + + r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET6); + ASSERT(r == 0); + + r = uv_fileno((const uv_handle_t*) &client, &fd); + ASSERT(r == 0); + ASSERT(fd != INVALID_FD); + + /* Windows returns WSAEINVAL if the socket is not bound */ +#ifndef _WIN32 + { + int namelen; + struct sockaddr_in6 sockname; + namelen = sizeof sockname; + r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); + ASSERT(r == 0); + ASSERT(sockname.sin6_family == AF_INET6); + } +#endif + + r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); +#ifndef _WIN32 + ASSERT(r == UV_EINVAL); +#else + ASSERT(r == UV_EFAULT); +#endif + + uv_close((uv_handle_t*) &client, NULL); + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} + + +TEST_IMPL(udp_create_early_bad_domain) { + uv_udp_t client; + int r; + + r = uv_udp_init_ex(uv_default_loop(), &client, 47); + ASSERT(r == UV_EINVAL); + + r = uv_udp_init_ex(uv_default_loop(), &client, 1024); + ASSERT(r == UV_EINVAL); + + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} diff --git a/deps/uv/test/test-udp-multicast-interface.c b/deps/uv/test/test-udp-multicast-interface.c index f0679c578e2..71001a77e03 100644 --- a/deps/uv/test/test-udp-multicast-interface.c +++ b/deps/uv/test/test-udp-multicast-interface.c @@ -44,7 +44,7 @@ static void close_cb(uv_handle_t* handle) { static void sv_send_cb(uv_udp_send_t* req, int status) { ASSERT(req != NULL); - ASSERT(status == 0); + ASSERT(status == 0 || status == UV_ENETUNREACH); CHECK_HANDLE(req->handle); sv_send_cb_called++; diff --git a/deps/uv/test/test-udp-multicast-join.c b/deps/uv/test/test-udp-multicast-join.c index 686edf3d22d..6110a8d922a 100644 --- a/deps/uv/test/test-udp-multicast-join.c +++ b/deps/uv/test/test-udp-multicast-join.c @@ -116,6 +116,8 @@ TEST_IMPL(udp_multicast_join) { /* join the multicast channel */ r = uv_udp_set_membership(&client, "239.255.0.1", NULL, UV_JOIN_GROUP); + if (r == UV_ENODEV) + RETURN_SKIP("No multicast support."); ASSERT(r == 0); r = uv_udp_recv_start(&client, alloc_cb, cl_recv_cb); diff --git a/deps/uv/test/test-udp-multicast-join6.c b/deps/uv/test/test-udp-multicast-join6.c index 9ba201ab9eb..873cb6d811d 100644 --- a/deps/uv/test/test-udp-multicast-join6.c +++ b/deps/uv/test/test-udp-multicast-join6.c @@ -124,6 +124,11 @@ TEST_IMPL(udp_multicast_join6) { #else r = uv_udp_set_membership(&client, "ff02::1", NULL, UV_JOIN_GROUP); #endif + if (r == UV_ENODEV) { + MAKE_VALGRIND_HAPPY(); + RETURN_SKIP("No ipv6 multicast route"); + } + ASSERT(r == 0); r = uv_udp_recv_start(&client, alloc_cb, cl_recv_cb); diff --git a/deps/uv/test/test-udp-multicast-ttl.c b/deps/uv/test/test-udp-multicast-ttl.c index bed0ea13425..7f1af9b9dd9 100644 --- a/deps/uv/test/test-udp-multicast-ttl.c +++ b/deps/uv/test/test-udp-multicast-ttl.c @@ -44,7 +44,7 @@ static void close_cb(uv_handle_t* handle) { static void sv_send_cb(uv_udp_send_t* req, int status) { ASSERT(req != NULL); - ASSERT(status == 0); + ASSERT(status == 0 || status == UV_ENETUNREACH); CHECK_HANDLE(req->handle); sv_send_cb_called++; diff --git a/deps/uv/test/test-udp-open.c b/deps/uv/test/test-udp-open.c index b2b6117784b..4d77f45d367 100644 --- a/deps/uv/test/test-udp-open.c +++ b/deps/uv/test/test-udp-open.c @@ -67,6 +67,17 @@ static uv_os_sock_t create_udp_socket(void) { } +static void close_socket(uv_os_sock_t sock) { + int r; +#ifdef _WIN32 + r = closesocket(sock); +#else + r = close(sock); +#endif + ASSERT(r == 0); +} + + static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { @@ -164,3 +175,30 @@ TEST_IMPL(udp_open) { MAKE_VALGRIND_HAPPY(); return 0; } + + +TEST_IMPL(udp_open_twice) { + uv_udp_t client; + uv_os_sock_t sock1, sock2; + int r; + + startup(); + sock1 = create_udp_socket(); + sock2 = create_udp_socket(); + + r = uv_udp_init(uv_default_loop(), &client); + ASSERT(r == 0); + + r = uv_udp_open(&client, sock1); + ASSERT(r == 0); + + r = uv_udp_open(&client, sock2); + ASSERT(r == UV_EBUSY); + close_socket(sock2); + + uv_close((uv_handle_t*) &client, NULL); + uv_run(uv_default_loop(), UV_RUN_DEFAULT); + + MAKE_VALGRIND_HAPPY(); + return 0; +} diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index 7173a827a37..8049faa7a66 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -326,8 +326,10 @@ 'test/test-ping-pong.c', 'test/test-pipe-bind-error.c', 'test/test-pipe-connect-error.c', + 'test/test-pipe-connect-multiple.c', 'test/test-pipe-connect-prepare.c', 'test/test-pipe-getsockname.c', + 'test/test-pipe-pending-instances.c', 'test/test-pipe-sendmsg.c', 'test/test-pipe-server-close.c', 'test/test-pipe-close-stdout-read-stdin.c', @@ -356,6 +358,7 @@ 'test/test-tcp-close.c', 'test/test-tcp-close-accept.c', 'test/test-tcp-close-while-connecting.c', + 'test/test-tcp-create-socket-early.c', 'test/test-tcp-connect-error-after-write.c', 'test/test-tcp-shutdown-after-write.c', 'test/test-tcp-flags.c', @@ -384,6 +387,7 @@ 'test/test-timer.c', 'test/test-tty.c', 'test/test-udp-bind.c', + 'test/test-udp-create-socket-early.c', 'test/test-udp-dgram-too-big.c', 'test/test-udp-ipv6.c', 'test/test-udp-open.c', @@ -427,6 +431,9 @@ '_XOPEN_SOURCE=500', ], }], + ['uv_library=="shared_library"', { + 'defines': [ 'USING_UV_SHARED=1' ] + }], ], 'msvs-settings': { 'VCLinkerTool': { @@ -478,7 +485,10 @@ 'test/runner-unix.c', 'test/runner-unix.h', ] - }] + }], + ['uv_library=="shared_library"', { + 'defines': [ 'USING_UV_SHARED=1' ] + }], ], 'msvs-settings': { 'VCLinkerTool': { From d2f314c190ddc21492dcea36d9394863ff4e7eb3 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 2 Sep 2015 17:31:48 +1000 Subject: [PATCH 150/214] build: fix borked chmod call for release uploads PR-URL: https://github.com/nodejs/node/pull/2645 Reviewed-By: thefourtheye - Sakthipriyan Vairamani cherry-picked to v3.x by @rvagg --- vcbuild.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index 376c29508a3..da2c348befd 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -218,7 +218,7 @@ scp -F %SSHCONFIG% Release\iojs.exe %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVER scp -F %SSHCONFIG% Release\iojs.lib %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%/iojs.lib scp -F %SSHCONFIG% iojs-v%FULLVERSION%-%target_arch%.msi %STAGINGSERVER%:iojs/%DISTTYPEDIR%/v%FULLVERSION%/ ssh -F %SSHCONFIG% %STAGINGSERVER% "touch iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi.done iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%.done" -ssh -F %SSHCONFIG% %STAGINGSERVER% "chmod chmod -R ug=rw-x+X,o=r+X iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi* iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%*" +ssh -F %SSHCONFIG% %STAGINGSERVER% "chmod -R ug=rw-x+X,o=r+X iojs/%DISTTYPEDIR%/v%FULLVERSION%/iojs-v%FULLVERSION%-%target_arch%.msi* iojs/%DISTTYPEDIR%/v%FULLVERSION%/win-%target_arch%*" :run @rem Run tests if requested. From 1a6e52db307f0da605a6f15426727834cfc522d8 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 2 Sep 2015 15:39:16 +1000 Subject: [PATCH 151/214] 2015-09-02 io.js v3.3.0 Release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notable changes: * build: Add a --link-module option to configure that can be used to bundle additional JavaScript modules into a built binary (Bradley Meck) #2497 * docs: Merge outstanding doc updates from joyent/node (James M Snell) #2378 * http_parser: Significant performance improvement by having http.Server consume all initial data from its net.Socket and parsing directly without having to enter JavaScript. Any 'data' listeners on the net.Socket will result in the data being "unconsumed" into JavaScript, thereby undoing any performance gains. (Fedor Indutny) #2355 * libuv: Upgrade to 1.7.3 (from 1.6.1), see https://github.com/libuv/libuv/blob/v1.x/ChangeLog for details (Saúl Ibarra Corretgé) #2310 * V8: Upgrade to 4.4.63.30 (from 4.4.63.26) (Michaël Zasso) #2482 --- CHANGELOG.md | 88 ++++++++++++++++++++++++++++++++++++++++++++++ src/node_version.h | 6 ++-- 2 files changed, 91 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5d46e43b96..3e05bbee4f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,93 @@ # io.js ChangeLog +## 2015-09-02, Version 3.3.0, @rvagg + +### Notable changes + +* **build**: Add a `--link-module` option to `configure` that can be used to bundle additional JavaScript modules into a built binary (Bradley Meck) [#2497](https://github.com/nodejs/node/pull/2497) +* **docs**: Merge outstanding doc updates from joyent/node (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* **http_parser**: Significant performance improvement by having `http.Server` consume all initial data from its `net.Socket` and parsing directly without having to enter JavaScript. Any `'data'` listeners on the `net.Socket` will result in the data being "unconsumed" into JavaScript, thereby undoing any performance gains. (Fedor Indutny) [#2355](https://github.com/nodejs/node/pull/2355) +* **libuv**: Upgrade to 1.7.3 (from 1.6.1), see [ChangeLog](https://github.com/libuv/libuv/blob/v1.x/ChangeLog) for details (Saúl Ibarra Corretgé) [#2310](https://github.com/nodejs/node/pull/2310) +* **V8**: Upgrade to 4.4.63.30 (from 4.4.63.26) (Michaël Zasso) [#2482](https://github.com/nodejs/node/pull/2482) + +### Known issues + +See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and current list of known issues. + +* Some uses of computed object shorthand properties are not handled correctly by the current version of V8. e.g. `[{ [prop]: val }]` evaluates to `[{}]`. [#2507](https://github.com/nodejs/node/issues/2507) +* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/nodejs/io.js/issues/1264). +* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/io.js/issues/690) +* `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/nodejs/io.js/issues/760). +* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/io.js/issues/894) +* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/io.js/issues/1435). + +### Commits + +* [[`1a531b4e44`](https://github.com/nodejs/node/commit/1a531b4e44)] - **(SEMVER-MINOR)** Introduce --link-module to ./configure (Bradley Meck) [#2497](https://github.com/nodejs/node/pull/2497) +* [[`d2f314c190`](https://github.com/nodejs/node/commit/d2f314c190)] - **build**: fix borked chmod call for release uploads (Rod Vagg) [#2645](https://github.com/nodejs/node/pull/2645) +* [[`3172e9c541`](https://github.com/nodejs/node/commit/3172e9c541)] - **build**: set file permissions before uploading (Rod Vagg) [#2623](https://github.com/nodejs/node/pull/2623) +* [[`a860d7fae1`](https://github.com/nodejs/node/commit/a860d7fae1)] - **build**: change staging directory on new server (Rod Vagg) [#2623](https://github.com/nodejs/node/pull/2623) +* [[`50c0baa8d7`](https://github.com/nodejs/node/commit/50c0baa8d7)] - **build**: rename 'doc' directory to 'docs' for upload (Rod Vagg) [#2623](https://github.com/nodejs/node/pull/2623) +* [[`0a0577cf5f`](https://github.com/nodejs/node/commit/0a0577cf5f)] - **build**: fix bad cherry-pick for vcbuild.bat build-release (Rod Vagg) [#2625](https://github.com/nodejs/node/pull/2625) +* [[`34de90194b`](https://github.com/nodejs/node/commit/34de90194b)] - **build**: only define NODE_V8_OPTIONS if not empty (Evan Lucas) [#2532](https://github.com/nodejs/node/pull/2532) +* [[`944174b189`](https://github.com/nodejs/node/commit/944174b189)] - **build**: make ci test addons in test/addons (Ben Noordhuis) [#2428](https://github.com/nodejs/node/pull/2428) +* [[`e955f9a1b0`](https://github.com/nodejs/node/commit/e955f9a1b0)] - **crypto**: Use OPENSSL_cleanse to shred the data. (Сковорода Никита Андреевич) [#2575](https://github.com/nodejs/node/pull/2575) +* [[`395d736b9d`](https://github.com/nodejs/node/commit/395d736b9d)] - **debugger**: use strict equality comparison (Minwoo Jung) [#2558](https://github.com/nodejs/node/pull/2558) +* [[`1d0e5210a8`](https://github.com/nodejs/node/commit/1d0e5210a8)] - **deps**: upgrade libuv to 1.7.3 (Saúl Ibarra Corretgé) [#2310](https://github.com/nodejs/node/pull/2310) +* [[`34ef53364f`](https://github.com/nodejs/node/commit/34ef53364f)] - **deps**: update V8 to 4.4.63.30 (Michaël Zasso) [#2482](https://github.com/nodejs/node/pull/2482) +* [[`23579a5f4a`](https://github.com/nodejs/node/commit/23579a5f4a)] - **doc**: add TSC meeting minutes 2015-08-12 (Rod Vagg) [#2438](https://github.com/nodejs/node/pull/2438) +* [[`0cc59299a4`](https://github.com/nodejs/node/commit/0cc59299a4)] - **doc**: add TSC meeting minutes 2015-08-26 (Rod Vagg) [#2591](https://github.com/nodejs/node/pull/2591) +* [[`6efa96e33a`](https://github.com/nodejs/node/commit/6efa96e33a)] - **doc**: merge CHANGELOG.md with joyent/node ChangeLog (P.S.V.R) [#2536](https://github.com/nodejs/node/pull/2536) +* [[`f75d54607b`](https://github.com/nodejs/node/commit/f75d54607b)] - **doc**: clarify cluster behaviour with no workers (Jeremiah Senkpiel) [#2606](https://github.com/nodejs/node/pull/2606) +* [[`8936302121`](https://github.com/nodejs/node/commit/8936302121)] - **doc**: minor clarification in buffer.markdown (Сковорода Никита Андреевич) [#2574](https://github.com/nodejs/node/pull/2574) +* [[`0db0e53753`](https://github.com/nodejs/node/commit/0db0e53753)] - **doc**: add @jasnell and @sam-github to release team (Rod Vagg) [#2455](https://github.com/nodejs/node/pull/2455) +* [[`c16e100593`](https://github.com/nodejs/node/commit/c16e100593)] - **doc**: reorg release team to separate section (Rod Vagg) [#2455](https://github.com/nodejs/node/pull/2455) +* [[`e3e00143fd`](https://github.com/nodejs/node/commit/e3e00143fd)] - **doc**: fix bad merge on modules.markdown (James M Snell) +* [[`2f62455880`](https://github.com/nodejs/node/commit/2f62455880)] - **doc**: minor additional corrections and improvements (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`3bd08aac4b`](https://github.com/nodejs/node/commit/3bd08aac4b)] - **doc**: minor grammatical update in crypto.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`f707189370`](https://github.com/nodejs/node/commit/f707189370)] - **doc**: minor grammatical update (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`6c98cf0266`](https://github.com/nodejs/node/commit/6c98cf0266)] - **doc**: remove repeated statement in globals.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`48e6ccf8c2`](https://github.com/nodejs/node/commit/48e6ccf8c2)] - **doc**: remove 'dudes' from documentation (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`b5d68f8076`](https://github.com/nodejs/node/commit/b5d68f8076)] - **doc**: update tense in child_process.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`242e3fe3ba`](https://github.com/nodejs/node/commit/242e3fe3ba)] - **doc**: fixed worker.id type (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`ea9ee15c21`](https://github.com/nodejs/node/commit/ea9ee15c21)] - **doc**: port is optional for socket.bind() (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`0ff6657a50`](https://github.com/nodejs/node/commit/0ff6657a50)] - **doc**: fix minor types and grammar in fs docs (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`94d83c04f2`](https://github.com/nodejs/node/commit/94d83c04f2)] - **doc**: update parameter name in net.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`04111ce40f`](https://github.com/nodejs/node/commit/04111ce40f)] - **doc**: small typo in domain.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`c9fdd1bbbf`](https://github.com/nodejs/node/commit/c9fdd1bbbf)] - **doc**: fixed typo in net.markdown (missing comma) (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`27c07b3f8e`](https://github.com/nodejs/node/commit/27c07b3f8e)] - **doc**: update description of fs.exists in fs.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`52018e73d9`](https://github.com/nodejs/node/commit/52018e73d9)] - **doc**: clarification on the 'close' event (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`f6d3b87a25`](https://github.com/nodejs/node/commit/f6d3b87a25)] - **doc**: improve working in stream.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`b5da89431a`](https://github.com/nodejs/node/commit/b5da89431a)] - **doc**: update path.extname documentation (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`1d4ea609db`](https://github.com/nodejs/node/commit/1d4ea609db)] - **doc**: small clarifications to modules.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`c888985591`](https://github.com/nodejs/node/commit/c888985591)] - **doc**: code style cleanups in repl.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`105b493595`](https://github.com/nodejs/node/commit/105b493595)] - **doc**: correct grammar in cluster.markdown (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`51b86ccac7`](https://github.com/nodejs/node/commit/51b86ccac7)] - **doc**: Clarify the module.parent is set once (James M Snell) [#2378](https://github.com/nodejs/node/pull/2378) +* [[`d2ffecba2d`](https://github.com/nodejs/node/commit/d2ffecba2d)] - **doc**: add internal modules notice (Jeremiah Senkpiel) [#2523](https://github.com/nodejs/node/pull/2523) +* [[`b36debd5cb`](https://github.com/nodejs/node/commit/b36debd5cb)] - **env**: introduce `KickNextTick` (Fedor Indutny) [#2355](https://github.com/nodejs/node/pull/2355) +* [[`1bc446863f`](https://github.com/nodejs/node/commit/1bc446863f)] - **http_parser**: consume StreamBase instance (Fedor Indutny) [#2355](https://github.com/nodejs/node/pull/2355) +* [[`ce04b735cc`](https://github.com/nodejs/node/commit/ce04b735cc)] - **src**: only memcmp if length > 0 in Buffer::Compare (Karl Skomski) [#2544](https://github.com/nodejs/node/pull/2544) +* [[`31823e37c7`](https://github.com/nodejs/node/commit/31823e37c7)] - **src**: DRY getsockname/getpeername code (Ben Noordhuis) [#956](https://github.com/nodejs/node/pull/956) +* [[`13fd96dda3`](https://github.com/nodejs/node/commit/13fd96dda3)] - **src**: missing Exception::Error in node_http_parser (Jeremiah Senkpiel) [#2550](https://github.com/nodejs/node/pull/2550) +* [[`42e075ae02`](https://github.com/nodejs/node/commit/42e075ae02)] - **test**: improve performance of stringbytes test (Trevor Norris) [#2544](https://github.com/nodejs/node/pull/2544) +* [[`fc726399fd`](https://github.com/nodejs/node/commit/fc726399fd)] - **test**: unmark test-process-argv-0.js as flaky (Rich Trott) [#2613](https://github.com/nodejs/node/pull/2613) +* [[`7727ba1394`](https://github.com/nodejs/node/commit/7727ba1394)] - **test**: lint and refactor to avoid autocrlf issue (Roman Reiss) [#2494](https://github.com/nodejs/node/pull/2494) +* [[`c56aa829f0`](https://github.com/nodejs/node/commit/c56aa829f0)] - **test**: use tmpDir instead of fixturesDir (Sakthipriyan Vairamani) [#2583](https://github.com/nodejs/node/pull/2583) +* [[`5e65181ea4`](https://github.com/nodejs/node/commit/5e65181ea4)] - **test**: handling failure cases properly (Sakthipriyan Vairamani) [#2206](https://github.com/nodejs/node/pull/2206) +* [[`c48b95e847`](https://github.com/nodejs/node/commit/c48b95e847)] - **test**: initial list of flaky tests (Alexis Campailla) [#2424](https://github.com/nodejs/node/pull/2424) +* [[`94e88498ba`](https://github.com/nodejs/node/commit/94e88498ba)] - **test**: pass args to test-ci via env variable (Alexis Campailla) [#2424](https://github.com/nodejs/node/pull/2424) +* [[`09987c7a1c`](https://github.com/nodejs/node/commit/09987c7a1c)] - **test**: support flaky tests in test-ci (Alexis Campailla) [#2424](https://github.com/nodejs/node/pull/2424) +* [[`08b83c8b45`](https://github.com/nodejs/node/commit/08b83c8b45)] - **test**: add test configuration templates (Alexis Campailla) [#2424](https://github.com/nodejs/node/pull/2424) +* [[`8f8ab6fa57`](https://github.com/nodejs/node/commit/8f8ab6fa57)] - **test**: runner should return 0 on flaky tests (Alexis Campailla) [#2424](https://github.com/nodejs/node/pull/2424) +* [[`0cfd3be9c6`](https://github.com/nodejs/node/commit/0cfd3be9c6)] - **test**: runner support for flaky tests (Alexis Campailla) [#2424](https://github.com/nodejs/node/pull/2424) +* [[`3492d2d4c6`](https://github.com/nodejs/node/commit/3492d2d4c6)] - **test**: make test-process-argv-0 robust (Rich Trott) [#2541](https://github.com/nodejs/node/pull/2541) +* [[`a96cc31710`](https://github.com/nodejs/node/commit/a96cc31710)] - **test**: speed up test-child-process-spawnsync.js (Rich Trott) [#2542](https://github.com/nodejs/node/pull/2542) +* [[`856baf4c67`](https://github.com/nodejs/node/commit/856baf4c67)] - **test**: make spawnSync() test robust (Rich Trott) [#2535](https://github.com/nodejs/node/pull/2535) +* [[`3aa6bbb648`](https://github.com/nodejs/node/commit/3aa6bbb648)] - **tools**: update release.sh to work with new website (Rod Vagg) [#2623](https://github.com/nodejs/node/pull/2623) +* [[`f2f0fe45ff`](https://github.com/nodejs/node/commit/f2f0fe45ff)] - **tools**: make add-on scraper print filenames (Ben Noordhuis) [#2428](https://github.com/nodejs/node/pull/2428) +* [[`bb24c4a418`](https://github.com/nodejs/node/commit/bb24c4a418)] - **win,msi**: correct installation path registry keys (João Reis) [#2565](https://github.com/nodejs/node/pull/2565) +* [[`752977b888`](https://github.com/nodejs/node/commit/752977b888)] - **win,msi**: change InstallScope to perMachine (João Reis) [#2565](https://github.com/nodejs/node/pull/2565) + ## 2015-08-25, Version 3.2.0, @rvagg ### Notable changes diff --git a/src/node_version.h b/src/node_version.h index d8564f15d72..1c97bfe0773 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -2,10 +2,10 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 3 -#define NODE_MINOR_VERSION 2 -#define NODE_PATCH_VERSION 1 +#define NODE_MINOR_VERSION 3 +#define NODE_PATCH_VERSION 0 -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) From b09634a2894c50e8c8345e43700032fe1faff58a Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 2 Sep 2015 22:30:18 +1000 Subject: [PATCH 152/214] Working on v3.3.1 --- src/node_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_version.h b/src/node_version.h index 1c97bfe0773..b4d2f9f46b2 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -3,9 +3,9 @@ #define NODE_MAJOR_VERSION 3 #define NODE_MINOR_VERSION 3 -#define NODE_PATCH_VERSION 0 +#define NODE_PATCH_VERSION 1 -#define NODE_VERSION_IS_RELEASE 1 +#define NODE_VERSION_IS_RELEASE 0 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) From d370306de12fc5585652aa51df0104ab25f20e7b Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Wed, 2 Sep 2015 02:59:21 -0500 Subject: [PATCH 153/214] src: only set v8 flags if argc > 1 ParseArgs sets the first element of v8_args to argv[0], so v8_argc will always be at least 1. This change only calls V8::SetFlagsFromCommandLine if v8_argc > 1, leading to an additional startup improvement of ~5%. PR-URL: https://github.com/nodejs/node/pull/2646 Reviewed-By: trevnorris - Trevor Norris --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 7ddae5205ee..61ee7f74277 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3688,7 +3688,7 @@ void Init(int* argc, #endif // The const_cast doesn't violate conceptual const-ness. V8 doesn't modify // the argv array or the elements it points to. - if (v8_argc != 0) + if (v8_argc > 1) V8::SetFlagsFromCommandLine(&v8_argc, const_cast(v8_argv), true); // Anything that's still in v8_argv is not a V8 or a node option. From 6e744c58f2020a7eb2b6dae7818114a3118b46ce Mon Sep 17 00:00:00 2001 From: Julien Gilli Date: Wed, 20 Aug 2014 00:08:32 -0700 Subject: [PATCH 154/214] timers: Avoid linear scan in _unrefActive. Before this change, _unrefActive would keep the unrefList sorted when adding a new timer. Because _unrefActive is called extremely frequently, this linear scan (O(n) at worse) would make _unrefActive show high in the list of contributors when profiling CPU usage. This commit changes _unrefActive so that it doesn't try to keep the unrefList sorted. The insertion thus happens in constant time. However, when a timer expires, unrefTimeout has to go through the whole unrefList because it's not ordered anymore. It is usually not large enough to have a significant impact on performance because: - Most of the time, the timers will be removed before unrefTimeout is called because their users (sockets mainly) cancel them when an I/O operation takes place. - If they're not, it means that some I/O took a long time to happen, and the initiator of subsequents I/O operations that would add more timers has to wait for them to complete. With this change, _unrefActive does not show as a significant contributor in CPU profiling reports anymore. Fixes: https://github.com/joyent/node/issues/8160 Signed-off-by: Timothy J Fontaine Conflicts: lib/timers.js Fixes: https://github.com/nodejs/node-convergence-archive/issues/23 Ref: https://github.com/nodejs/node/issues/268 PR-URL: https://github.com/nodejs/node/pull/2540 Reviewed-By: bnoordhuis - Ben Noordhuis --- lib/timers.js | 121 +++++++++++++--------- test/parallel/test-timers-unref-active.js | 51 +++++++++ 2 files changed, 124 insertions(+), 48 deletions(-) create mode 100644 test/parallel/test-timers-unref-active.js diff --git a/lib/timers.js b/lib/timers.js index 494c599b3cd..7ae1879b141 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -483,32 +483,74 @@ function unrefTimeout() { debug('unrefTimer fired'); - var diff, domain, first, threw; - while (first = L.peek(unrefList)) { - diff = now - first._idleStart; + var timeSinceLastActive; + var nextTimeoutTime; + var nextTimeoutDuration; + var minNextTimeoutTime; + var itemToDelete; - if (diff < first._idleTimeout) { - diff = first._idleTimeout - diff; - unrefTimer.start(diff, 0); - unrefTimer.when = now + diff; - debug('unrefTimer rescheudling for later'); - return; + // The actual timer fired and has not yet been rearmed, + // let's consider its next firing time is invalid for now. + // It may be set to a relevant time in the future once + // we scanned through the whole list of timeouts and if + // we find a timeout that needs to expire. + unrefTimer.when = -1; + + // Iterate over the list of timeouts, + // call the onTimeout callback for those expired, + // and rearm the actual timer if the next timeout to expire + // will expire before the current actual timer. + var cur = unrefList._idlePrev; + while (cur != unrefList) { + timeSinceLastActive = now - cur._idleStart; + + if (timeSinceLastActive < cur._idleTimeout) { + // This timer hasn't expired yet, but check if its expiring time is + // earlier than the actual timer's expiring time + + nextTimeoutDuration = cur._idleTimeout - timeSinceLastActive; + nextTimeoutTime = now + nextTimeoutDuration; + if (minNextTimeoutTime == null || + (nextTimeoutTime < minNextTimeoutTime)) { + // We found a timeout that will expire earlier, + // store its next timeout time now so that we + // can rearm the actual timer accordingly when + // we scanned through the whole list. + minNextTimeoutTime = nextTimeoutTime; + } + + // This timer hasn't expired yet, skipping + cur = cur._idlePrev; + continue; } - L.remove(first); + // We found a timer that expired + var domain = cur.domain; - domain = first.domain; + if (!cur._onTimeout) continue; - if (!first._onTimeout) continue; - if (domain && domain._disposed) continue; + if (domain && domain._disposed) + continue; try { + var threw = true; + if (domain) domain.enter(); - threw = true; + + itemToDelete = cur; + // Move to the previous item before calling the _onTimeout callback, + // as it can mutate the list. + cur = cur._idlePrev; + + // Remove the timeout from the list because it expired. + L.remove(itemToDelete); + debug('unreftimer firing timeout'); - first._called = true; - first._onTimeout(); + itemToDelete._called = true; + itemToDelete._onTimeout(); + threw = false; + if (domain) domain.exit(); } finally { @@ -516,8 +558,15 @@ function unrefTimeout() { } } - debug('unrefList is empty'); - unrefTimer.when = -1; + // Rearm the actual timer with the timeout delay + // of the earliest timeout found. + if (minNextTimeoutTime != null) { + unrefTimer.start(minNextTimeoutTime - now, 0); + unrefTimer.when = minNextTimeoutTime; + debug('unrefTimer rescheduled'); + } else if (L.isEmpty(unrefList)) { + debug('unrefList is empty'); + } } @@ -543,38 +592,14 @@ exports._unrefActive = function(item) { var now = Timer.now(); item._idleStart = now; - if (L.isEmpty(unrefList)) { - debug('unrefList empty'); - L.append(unrefList, item); - - unrefTimer.start(msecs, 0); - unrefTimer.when = now + msecs; - debug('unrefTimer scheduled'); - return; - } - var when = now + msecs; - debug('unrefList find where we can insert'); - - var cur, them; - - for (cur = unrefList._idlePrev; cur != unrefList; cur = cur._idlePrev) { - them = cur._idleStart + cur._idleTimeout; - - if (when < them) { - debug('unrefList inserting into middle of list'); - - L.append(cur, item); - - if (unrefTimer.when > when) { - debug('unrefTimer is scheduled to fire too late, reschedule'); - unrefTimer.start(msecs, 0); - unrefTimer.when = when; - } - - return; - } + // If the actual timer is set to fire too late, or not set to fire at all, + // we need to make it fire earlier + if (unrefTimer.when === -1 || unrefTimer.when > when) { + unrefTimer.start(msecs, 0); + unrefTimer.when = when; + debug('unrefTimer scheduled'); } debug('unrefList append to end'); diff --git a/test/parallel/test-timers-unref-active.js b/test/parallel/test-timers-unref-active.js new file mode 100644 index 00000000000..08f28b0153f --- /dev/null +++ b/test/parallel/test-timers-unref-active.js @@ -0,0 +1,51 @@ +'use strict'; + +/* + * This test is aimed at making sure that unref timers queued with + * timers._unrefActive work correctly. + * + * Basically, it queues one timer in the unref queue, and then queues + * it again each time its timeout callback is fired until the callback + * has been called ten times. + * + * At that point, it unenrolls the unref timer so that its timeout callback + * is not fired ever again. + * + * Finally, a ref timeout is used with a delay large enough to make sure that + * all 10 timeouts had the time to expire. + */ + +const common = require('../common'); +const timers = require('timers'); +const assert = require('assert'); + +var someObject = {}; +var nbTimeouts = 0; + +/* + * libuv 0.10.x uses GetTickCount on Windows to implement timers, which uses + * system's timers whose resolution is between 10 and 16ms. See + * http://msdn.microsoft.com/en-us/library/windows/desktop/ms724408.aspx + * for more information. That's the lowest resolution for timers across all + * supported platforms. We're using it as the lowest common denominator, + * and thus expect 5 timers to be able to fire in under 100 ms. + */ +const N = 5; +const TEST_DURATION = 100; + +timers.unenroll(someObject); +timers.enroll(someObject, 1); + +someObject._onTimeout = function _onTimeout() { + ++nbTimeouts; + + if (nbTimeouts === N) timers.unenroll(someObject); + + timers._unrefActive(someObject); +}; + +timers._unrefActive(someObject); + +setTimeout(function() { + assert.equal(nbTimeouts, N); +}, TEST_DURATION); From 5d14a6eca7ad659f6e16dcdf61c9cba31774493e Mon Sep 17 00:00:00 2001 From: Julien Gilli Date: Thu, 18 Dec 2014 15:36:21 -0800 Subject: [PATCH 155/214] timers: don't mutate unref list while iterating it Commit 934bfe23a16556d05bfb1844ef4d53e8c9887c3d had introduced a regression where node would crash trying to access a null unref timer if a given unref timer's callback would remove other unref timers set to fire in the future. More generally, it makes the unrefTimeout function more solid by not mutating the unrefList while traversing it. Fixes: https://github.com/joyent/node/issues/8897 Conflicts: lib/timers.js Fixes: https://github.com/nodejs/node-convergence-archive/issues/23 Ref: https://github.com/nodejs/node/issues/268 PR-URL: https://github.com/nodejs/node/pull/2540 Reviewed-By: bnoordhuis - Ben Noordhuis --- lib/timers.js | 83 ++++++++++--------- ...imeout-removes-other-socket-unref-timer.js | 50 +++++++++++ ...emove-other-unref-timers-only-one-fires.js | 41 +++++++++ ...-timers-unref-remove-other-unref-timers.js | 33 ++++++++ 4 files changed, 170 insertions(+), 37 deletions(-) create mode 100644 test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js create mode 100644 test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js create mode 100644 test/parallel/test-timers-unref-remove-other-unref-timers.js diff --git a/lib/timers.js b/lib/timers.js index 7ae1879b141..82ac1568164 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -477,6 +477,39 @@ exports.clearImmediate = function(immediate) { var unrefList, unrefTimer; +function _makeTimerTimeout(timer) { + var domain = timer.domain; + var msecs = timer._idleTimeout; + + // Timer has been unenrolled by another timer that fired at the same time, + // so don't make it timeout. + if (!msecs || msecs < 0) + return; + + if (!timer._onTimeout) + return; + + if (domain && domain._disposed) + return; + + try { + var threw = true; + + if (domain) domain.enter(); + + debug('unreftimer firing timeout'); + L.remove(timer); + timer._called = true; + timer._onTimeout(); + + threw = false; + + if (domain) + domain.exit(); + } finally { + if (threw) process.nextTick(unrefTimeout); + } +} function unrefTimeout() { var now = Timer.now(); @@ -487,7 +520,7 @@ function unrefTimeout() { var nextTimeoutTime; var nextTimeoutDuration; var minNextTimeoutTime; - var itemToDelete; + var timersToTimeout = []; // The actual timer fired and has not yet been rearmed, // let's consider its next firing time is invalid for now. @@ -518,46 +551,22 @@ function unrefTimeout() { // we scanned through the whole list. minNextTimeoutTime = nextTimeoutTime; } - - // This timer hasn't expired yet, skipping - cur = cur._idlePrev; - continue; + } else { + // We found a timer that expired. Do not call its _onTimeout callback + // right now, as it could mutate any item of the list (including itself). + // Instead, add it to another list that will be processed once the list + // of current timers has been fully traversed. + timersToTimeout.push(cur); } - // We found a timer that expired - var domain = cur.domain; - - if (!cur._onTimeout) continue; - - if (domain && domain._disposed) - continue; - - try { - var threw = true; - - if (domain) domain.enter(); - - itemToDelete = cur; - // Move to the previous item before calling the _onTimeout callback, - // as it can mutate the list. - cur = cur._idlePrev; - - // Remove the timeout from the list because it expired. - L.remove(itemToDelete); - - debug('unreftimer firing timeout'); - itemToDelete._called = true; - itemToDelete._onTimeout(); - - threw = false; - - if (domain) - domain.exit(); - } finally { - if (threw) process.nextTick(unrefTimeout); - } + cur = cur._idlePrev; } + var nbTimersToTimeout = timersToTimeout.length; + for (var timerIdx = 0; timerIdx < nbTimersToTimeout; ++timerIdx) + _makeTimerTimeout(timersToTimeout[timerIdx]); + + // Rearm the actual timer with the timeout delay // of the earliest timeout found. if (minNextTimeoutTime != null) { diff --git a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js new file mode 100644 index 00000000000..081688cfa5e --- /dev/null +++ b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js @@ -0,0 +1,50 @@ +'use strict'; + +/* + * This test is a regression test for joyent/node#8897. + */ + +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +const clients = []; + +const server = net.createServer(function onClient(client) { + clients.push(client); + + if (clients.length === 2) { + /* + * Enroll two timers, and make the one supposed to fire first + * unenroll the other one supposed to fire later. This mutates + * the list of unref timers when traversing it, and exposes the + * original issue in joyent/node#8897. + */ + clients[0].setTimeout(1, function onTimeout() { + clients[1].setTimeout(0); + clients[0].end(); + clients[1].end(); + }); + + // Use a delay that is higher than the lowest timer resolution accross all + // supported platforms, so that the two timers don't fire at the same time. + clients[1].setTimeout(50); + } +}); + +server.listen(common.PORT, common.localhostIPv4, function() { + var nbClientsEnded = 0; + + function addEndedClient(client) { + ++nbClientsEnded; + if (nbClientsEnded === 2) { + server.close(); + } + }; + + const client1 = net.connect({ port: common.PORT }); + client1.on('end', addEndedClient); + + const client2 = net.connect({ port: common.PORT }); + client2.on('end', addEndedClient); +}); diff --git a/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js new file mode 100644 index 00000000000..aead4a4e7de --- /dev/null +++ b/test/parallel/test-timers-unref-remove-other-unref-timers-only-one-fires.js @@ -0,0 +1,41 @@ +'use strict'; + +/* + * The goal of this test is to make sure that, after the regression introduced + * by 934bfe23a16556d05bfb1844ef4d53e8c9887c3d, the fix preserves the following + * behavior of unref timers: if two timers are scheduled to fire at the same + * time, if one unenrolls the other one in its _onTimeout callback, the other + * one will *not* fire. + * + * This behavior is a private implementation detail and should not be + * considered public interface. + */ +const common = require('../common'); +const timers = require('timers'); +const assert = require('assert'); + +var nbTimersFired = 0; + +const foo = { + _onTimeout: function() { + ++nbTimersFired; + timers.unenroll(bar); + } +}; + +const bar = { + _onTimeout: function() { + ++nbTimersFired; + timers.unenroll(foo); + } +}; + +timers.enroll(bar, 1); +timers._unrefActive(bar); + +timers.enroll(foo, 1); +timers._unrefActive(foo); + +setTimeout(function() { + assert.notEqual(nbTimersFired, 2); +}, 20); diff --git a/test/parallel/test-timers-unref-remove-other-unref-timers.js b/test/parallel/test-timers-unref-remove-other-unref-timers.js new file mode 100644 index 00000000000..f727d5f86fd --- /dev/null +++ b/test/parallel/test-timers-unref-remove-other-unref-timers.js @@ -0,0 +1,33 @@ +'use strict'; + +/* + * This test is a regression test for joyent/node#8897. + * + * It tests some private implementation details that should not be + * considered public interface. + */ +const common = require('../common'); +const assert = require('assert'); +const timers = require('timers'); + +const foo = { + _onTimeout: assert.fail +}; + +const bar = { + _onTimeout: common.mustCall(function() { + timers.unenroll(foo); + }) +}; + +// We use timers with expiration times that are sufficiently apart to make +// sure that they're not fired at the same time on platforms where the timer +// resolution is a bit coarse (e.g Windows with a default resolution of ~15ms). +timers.enroll(bar, 1); +timers._unrefActive(bar); + +timers.enroll(foo, 50); +timers._unrefActive(foo); + +// Keep the process open. +setTimeout(function() {}, 100); From 74ff9bc86c840ecd1b01feca17628ad3ede5cbd8 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Thu, 27 Aug 2015 15:56:46 -0400 Subject: [PATCH 156/214] timers: minor _unrefActive fixes and improvements This commit addresses most of the review comments in https://github.com/nodejs/node/pull/2540, which are kept in this separate commit so as to better preserve the prior two patches as they landed in 0.12. This commit: - Fixes a bug with unrefActive timers and disposed domains. - Fixes a bug with unrolling an unrefActive timer from another. - Adds a test for both above bugs. - Improves check logic, making it stricter, simpler, or both. - Optimizes nicer with a smaller, separate function for the try/catch. Fixes: https://github.com/nodejs/node-convergence-archive/issues/23 Ref: https://github.com/nodejs/node/issues/268 PR-URL: https://github.com/nodejs/node/pull/2540 Reviewed-By: bnoordhuis - Ben Noordhuis --- lib/timers.js | 41 +++++++++-------- ...timers-unref-active-unenrolled-disposed.js | 46 +++++++++++++++++++ 2 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 test/parallel/test-timers-unref-active-unenrolled-disposed.js diff --git a/lib/timers.js b/lib/timers.js index 82ac1568164..e3d0eb15249 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -481,31 +481,36 @@ function _makeTimerTimeout(timer) { var domain = timer.domain; var msecs = timer._idleTimeout; + L.remove(timer); + // Timer has been unenrolled by another timer that fired at the same time, // so don't make it timeout. - if (!msecs || msecs < 0) + if (msecs <= 0) return; if (!timer._onTimeout) return; - if (domain && domain._disposed) - return; + if (domain) { + if (domain._disposed) + return; + domain.enter(); + } + + debug('unreftimer firing timeout'); + timer._called = true; + _runOnTimeout(timer); + + if (domain) + domain.exit(); +} + +function _runOnTimeout(timer) { + var threw = true; try { - var threw = true; - - if (domain) domain.enter(); - - debug('unreftimer firing timeout'); - L.remove(timer); - timer._called = true; timer._onTimeout(); - threw = false; - - if (domain) - domain.exit(); } finally { if (threw) process.nextTick(unrefTimeout); } @@ -519,7 +524,7 @@ function unrefTimeout() { var timeSinceLastActive; var nextTimeoutTime; var nextTimeoutDuration; - var minNextTimeoutTime; + var minNextTimeoutTime = TIMEOUT_MAX; var timersToTimeout = []; // The actual timer fired and has not yet been rearmed, @@ -534,7 +539,7 @@ function unrefTimeout() { // and rearm the actual timer if the next timeout to expire // will expire before the current actual timer. var cur = unrefList._idlePrev; - while (cur != unrefList) { + while (cur !== unrefList) { timeSinceLastActive = now - cur._idleStart; if (timeSinceLastActive < cur._idleTimeout) { @@ -543,7 +548,7 @@ function unrefTimeout() { nextTimeoutDuration = cur._idleTimeout - timeSinceLastActive; nextTimeoutTime = now + nextTimeoutDuration; - if (minNextTimeoutTime == null || + if (minNextTimeoutTime === TIMEOUT_MAX || (nextTimeoutTime < minNextTimeoutTime)) { // We found a timeout that will expire earlier, // store its next timeout time now so that we @@ -569,7 +574,7 @@ function unrefTimeout() { // Rearm the actual timer with the timeout delay // of the earliest timeout found. - if (minNextTimeoutTime != null) { + if (minNextTimeoutTime !== TIMEOUT_MAX) { unrefTimer.start(minNextTimeoutTime - now, 0); unrefTimer.when = minNextTimeoutTime; debug('unrefTimer rescheduled'); diff --git a/test/parallel/test-timers-unref-active-unenrolled-disposed.js b/test/parallel/test-timers-unref-active-unenrolled-disposed.js new file mode 100644 index 00000000000..ac22cd6e6a7 --- /dev/null +++ b/test/parallel/test-timers-unref-active-unenrolled-disposed.js @@ -0,0 +1,46 @@ +'use strict'; + +// https://github.com/nodejs/node/pull/2540/files#r38231197 + +const common = require('../common'); +const timers = require('timers'); +const assert = require('assert'); +const domain = require('domain'); + +// Crazy stuff to keep the process open, +// then close it when we are actually done. +const TEST_DURATION = common.platformTimeout(100); +const keepOpen = setTimeout(function() { + throw new Error('Test timed out. keepOpen was not canceled.'); +}, TEST_DURATION); + +const endTest = makeTimer(2); + +const someTimer = makeTimer(1); +someTimer.domain = domain.create(); +someTimer.domain.dispose(); +someTimer._onTimeout = function() { + throw new Error('someTimer was not supposed to fire!'); +}; + +endTest._onTimeout = common.mustCall(function() { + assert.strictEqual(someTimer._idlePrev, null); + assert.strictEqual(someTimer._idleNext, null); + clearTimeout(keepOpen); +}); + +const cancelsTimer = makeTimer(1); +cancelsTimer._onTimeout = common.mustCall(function() { + someTimer._idleTimeout = 0; +}); + +timers._unrefActive(cancelsTimer); +timers._unrefActive(someTimer); +timers._unrefActive(endTest); + +function makeTimer(msecs) { + const timer = {}; + timers.unenroll(timer); + timers.enroll(timer, msecs); + return timer; +} From 4593539b92fcf413da1d85c0545d2f9e6cd66086 Mon Sep 17 00:00:00 2001 From: saper Date: Tue, 11 Aug 2015 00:48:49 -0700 Subject: [PATCH 157/214] deps: backport 75e43a6 from v8 upstream Note: chunk in test-heap.cc:1989 discarded as related code missing from current version in node. Original commit message: Use static_cast<> for NULL (clang 3.7) The following errors come up when compiling v8 with clang 3.7 on FreeBSD/amd64: src/runtime/runtime-i18n.cc:629:37: error: reinterpret_cast from 'nullptr_t' to 'v8::internal::Smi *' is not allowed local_object->SetInternalField(1, reinterpret_cast(NULL)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ test/cctest/test-heap.cc:131:20: error: reinterpret_cast from 'nullptr_t' to 'v8::internal::Object *' is not allowed Handle n(reinterpret_cast(NULL), isolate); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test/cctest/test-heap.cc:1989:18: error: reinterpret_cast from 'nullptr_t' to 'Address' (aka 'unsigned char *') is not allowed Address base = reinterpret_cast
(NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +add myself to the AUTHORS file. BUG= Review URL: https://codereview.chromium.org/1277353002 Cr-Commit-Position: refs/heads/master@{#30103} PR-URL: https://github.com/nodejs/node/pull/2636 Reviewed-By: thefourtheye - Sakthipriyan Vairamani Reviewed-By: bnoordhuis - Ben Noordhuis --- deps/v8/AUTHORS | 1 + deps/v8/src/runtime/runtime-i18n.cc | 2 +- deps/v8/test/cctest/test-heap.cc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index b0a9765b443..4f853c275bc 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -69,6 +69,7 @@ Kang-Hao (Kenny) Lu Luis Reis Luke Zarko Maciej Małecki +Marcin Cieślak Mathias Bynens Matt Hanselman Matthew Sporleder diff --git a/deps/v8/src/runtime/runtime-i18n.cc b/deps/v8/src/runtime/runtime-i18n.cc index 5e016515448..346e773f86e 100644 --- a/deps/v8/src/runtime/runtime-i18n.cc +++ b/deps/v8/src/runtime/runtime-i18n.cc @@ -627,7 +627,7 @@ RUNTIME_FUNCTION(Runtime_CreateBreakIterator) { local_object->SetInternalField(0, reinterpret_cast(break_iterator)); // Make sure that the pointer to adopted text is NULL. - local_object->SetInternalField(1, reinterpret_cast(NULL)); + local_object->SetInternalField(1, static_cast(nullptr)); Factory* factory = isolate->factory(); Handle key = factory->NewStringFromStaticChars("breakIterator"); diff --git a/deps/v8/test/cctest/test-heap.cc b/deps/v8/test/cctest/test-heap.cc index cb08fb4c04e..f0a6ad5d269 100644 --- a/deps/v8/test/cctest/test-heap.cc +++ b/deps/v8/test/cctest/test-heap.cc @@ -126,7 +126,7 @@ TEST(HandleNull) { Isolate* isolate = CcTest::i_isolate(); HandleScope outer_scope(isolate); LocalContext context; - Handle n(reinterpret_cast(NULL), isolate); + Handle n(static_cast(nullptr), isolate); CHECK(!n.is_null()); } From b0014ecd27055180dcea02c39ccd34d0ef543697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 2 Sep 2015 17:03:02 +0100 Subject: [PATCH 158/214] test: mark test-repl-persistent-history as flaky This test is already being investigated, but until a solution is found it should be marked flaky. Ref: https://github.com/nodejs/node/issues/2319 Ref: https://github.com/nodejs/node/pull/2356 PR-URL: https://github.com/nodejs/node/pull/2659 Reviewed-By: orangemocha - Alexis Campailla --- test/sequential/sequential.status | 1 + 1 file changed, 1 insertion(+) diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index 2d733c87783..ec790c390bc 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -6,6 +6,7 @@ prefix sequential [true] # This section applies to all platforms test-child-process-fork-getconnections : PASS,FLAKY +test-repl-persistent-history : PASS,FLAKY [$system==win32] From 1865cad7ae7fb69489e1c085a7edc60292c0453a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 2 Sep 2015 17:36:29 +0100 Subject: [PATCH 159/214] test: mark test-vm-syntax-error-stderr as flaky Ref: https://github.com/nodejs/node/issues/2660 PR-URL: https://github.com/nodejs/node/pull/2662 Reviewed-By: orangemocha - Alexis Campailla --- test/sequential/sequential.status | 1 + 1 file changed, 1 insertion(+) diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index ec790c390bc..f61d98b63a0 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -11,6 +11,7 @@ test-repl-persistent-history : PASS,FLAKY [$system==win32] [$system==linux] +test-vm-syntax-error-stderr : PASS,FLAKY [$system==macos] From e73eafd7e7cb40eb929b217504364ba8136d7c8c Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Sun, 16 Aug 2015 16:09:02 +0200 Subject: [PATCH 160/214] src: fix memory leak in ExternString v8 will silently return an empty handle which doesn't delete our data if string length is above String::kMaxLength Fixes: https://github.com/nodejs/node/issues/1374 PR-URL: https://github.com/nodejs/node/pull/2402 Reviewed-By: trevnorris - Trevor Norris Reviewed-By: indutny - Fedor Indutny Reviewed-By: bnoordhuis - Ben Noordhuis Amended by @rvagg to change author date from "1970-08-16 16:09:02 +0200" to "2015-08-16 16:09:02 +0200" as per discussion @ https://github.com/nodejs/node/issues/2713 --- lib/buffer.js | 12 ++-- src/node_buffer.cc | 4 ++ src/string_bytes.cc | 39 +++++++++---- test/parallel/test-stringbytes-external.js | 66 ++++++++++++++++++++++ 4 files changed, 107 insertions(+), 14 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 4166724b732..13933001e83 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -350,10 +350,14 @@ function slowToString(encoding, start, end) { Buffer.prototype.toString = function() { - const length = this.length | 0; - if (arguments.length === 0) - return this.utf8Slice(0, length); - return slowToString.apply(this, arguments); + if (arguments.length === 0) { + var result = this.utf8Slice(0, this.length); + } else { + var result = slowToString.apply(this, arguments); + } + if (result === undefined) + throw new Error('toString failed'); + return result; }; diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 54c4711a1ec..3eceae59469 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1024,6 +1024,10 @@ void Initialize(Handle target, target->Set(env->context(), FIXED_ONE_BYTE_STRING(env->isolate(), "kMaxLength"), Integer::NewFromUnsigned(env->isolate(), kMaxLength)).FromJust(); + + target->Set(env->context(), + FIXED_ONE_BYTE_STRING(env->isolate(), "kStringMaxLength"), + Integer::New(env->isolate(), String::kMaxLength)).FromJust(); } diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 3d568c6ca13..7fc03c0f51d 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -22,13 +22,14 @@ using v8::Local; using v8::Object; using v8::String; using v8::Value; +using v8::MaybeLocal; template class ExternString: public ResourceType { public: ~ExternString() override { - delete[] data_; + free(const_cast(data_)); isolate()->AdjustAmountOfExternalAllocatedMemory(-byte_length()); } @@ -52,7 +53,11 @@ class ExternString: public ResourceType { if (length == 0) return scope.Escape(String::Empty(isolate)); - TypeName* new_data = new TypeName[length]; + TypeName* new_data = + static_cast(malloc(length * sizeof(*new_data))); + if (new_data == nullptr) { + return Local(); + } memcpy(new_data, data, length * sizeof(*new_data)); return scope.Escape(ExternString::New(isolate, @@ -72,10 +77,15 @@ class ExternString: public ResourceType { ExternString* h_str = new ExternString(isolate, data, length); - Local str = String::NewExternal(isolate, h_str); + MaybeLocal str = String::NewExternal(isolate, h_str); isolate->AdjustAmountOfExternalAllocatedMemory(h_str->byte_length()); - return scope.Escape(str); + if (str.IsEmpty()) { + delete h_str; + return Local(); + } + + return scope.Escape(str.ToLocalChecked()); } inline Isolate* isolate() const { return isolate_; } @@ -765,11 +775,14 @@ Local StringBytes::Encode(Isolate* isolate, case ASCII: if (contains_non_ascii(buf, buflen)) { - char* out = new char[buflen]; + char* out = static_cast(malloc(buflen)); + if (out == nullptr) { + return Local(); + } force_ascii(buf, out, buflen); if (buflen < EXTERN_APEX) { val = OneByteString(isolate, out, buflen); - delete[] out; + free(out); } else { val = ExternOneByteString::New(isolate, out, buflen); } @@ -797,14 +810,17 @@ Local StringBytes::Encode(Isolate* isolate, case BASE64: { size_t dlen = base64_encoded_size(buflen); - char* dst = new char[dlen]; + char* dst = static_cast(malloc(dlen)); + if (dst == nullptr) { + return Local(); + } size_t written = base64_encode(buf, buflen, dst, dlen); CHECK_EQ(written, dlen); if (dlen < EXTERN_APEX) { val = OneByteString(isolate, dst, dlen); - delete[] dst; + free(dst); } else { val = ExternOneByteString::New(isolate, dst, dlen); } @@ -813,13 +829,16 @@ Local StringBytes::Encode(Isolate* isolate, case HEX: { size_t dlen = buflen * 2; - char* dst = new char[dlen]; + char* dst = static_cast(malloc(dlen)); + if (dst == nullptr) { + return Local(); + } size_t written = hex_encode(buf, buflen, dst, dlen); CHECK_EQ(written, dlen); if (dlen < EXTERN_APEX) { val = OneByteString(isolate, dst, dlen); - delete[] dst; + free(dst); } else { val = ExternOneByteString::New(isolate, dst, dlen); } diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js index 4c29a10a8da..d0bb03f48ad 100644 --- a/test/parallel/test-stringbytes-external.js +++ b/test/parallel/test-stringbytes-external.js @@ -107,3 +107,69 @@ var PRE_3OF4_APEX = Math.ceil((EXTERN_APEX / 4) * 3) - RADIOS; assert.equal(a, b); assert.equal(b, c); })(); + +// v8 fails silently if string length > v8::String::kMaxLength +(function() { + // v8::String::kMaxLength defined in v8.h + const kStringMaxLength = process.binding('buffer').kStringMaxLength; + + assert.throws(function() { + new Buffer(kStringMaxLength + 1).toString(); + }, /toString failed|Buffer allocation failed/); + + try { + new Buffer(kStringMaxLength * 4); + } catch(e) { + assert.equal(e.message, 'Buffer allocation failed - process out of memory'); + console.log( + '1..0 # Skipped: intensive toString tests due to memory confinements'); + return; + } + + assert.throws(function() { + new Buffer(kStringMaxLength + 1).toString('ascii'); + }, /toString failed/); + + assert.throws(function() { + new Buffer(kStringMaxLength + 1).toString('utf8'); + }, /toString failed/); + + assert.throws(function() { + new Buffer(kStringMaxLength * 2 + 2).toString('utf16le'); + }, /toString failed/); + + assert.throws(function() { + new Buffer(kStringMaxLength + 1).toString('binary'); + }, /toString failed/); + + assert.throws(function() { + new Buffer(kStringMaxLength + 1).toString('base64'); + }, /toString failed/); + + assert.throws(function() { + new Buffer(kStringMaxLength + 1).toString('hex'); + }, /toString failed/); + + var maxString = new Buffer(kStringMaxLength).toString(); + assert.equal(maxString.length, kStringMaxLength); + // Free the memory early instead of at the end of the next assignment + maxString = undefined; + + maxString = new Buffer(kStringMaxLength).toString('binary'); + assert.equal(maxString.length, kStringMaxLength); + maxString = undefined; + + maxString = + new Buffer(kStringMaxLength + 1).toString('binary', 1); + assert.equal(maxString.length, kStringMaxLength); + maxString = undefined; + + maxString = + new Buffer(kStringMaxLength + 1).toString('binary', 0, kStringMaxLength); + assert.equal(maxString.length, kStringMaxLength); + maxString = undefined; + + maxString = new Buffer(kStringMaxLength + 2).toString('utf16le'); + assert.equal(maxString.length, (kStringMaxLength + 2) / 2); + maxString = undefined; +})(); From fcfd15f8f9c7170457a27947378291b0924b48d8 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Wed, 2 Sep 2015 11:30:00 +0200 Subject: [PATCH 161/214] test: mark eval_messages as flaky This test has failed recently during a PR test in Jenkins, for reasons seemingly not related to the change in the PR. PR-URL: https://github.com/nodejs/node/pull/2648 Reviewed-By: evanlucas - Evan Lucas --- test/message/message.status | 1 + 1 file changed, 1 insertion(+) diff --git a/test/message/message.status b/test/message/message.status index 1a4a0e3adc2..67c6de53424 100644 --- a/test/message/message.status +++ b/test/message/message.status @@ -9,6 +9,7 @@ prefix message [$system==win32] [$system==linux] +eval_messages : PASS,FLAKY [$system==macos] From 512dad6883bb8d27d6c0d8aefb1e5e9bc5e20150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Sat, 25 Jul 2015 16:09:59 +1000 Subject: [PATCH 162/214] doc: reorder collaborators by their usernames Fixes: https://github.com/nodejs/node/issues/1972 PR-URL: https://github.com/nodejs/node/pull/2322 Reviewed-By: orangemocha - Alexis Campailla Reviewed-By: thefourtheye - Sakthipriyan Vairamani --- README.md | 88 +++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 53d38f3f143..4ed172c29dc 100644 --- a/README.md +++ b/README.md @@ -339,53 +339,53 @@ information about the governance of the io.js project, see ### TSC (Technical Steering Committee) -* **Ben Noordhuis** <info@bnoordhuis.nl> ([@bnoordhuis](https://github.com/bnoordhuis)) -* **Bert Belder** <bertbelder@gmail.com> ([@piscisaureus](https://github.com/piscisaureus)) -* **Fedor Indutny** <fedor.indutny@gmail.com> ([@indutny](https://github.com/indutny)) -* **Trevor Norris** <trev.norris@gmail.com> ([@trevnorris](https://github.com/trevnorris)) -* **Chris Dickinson** <christopher.s.dickinson@gmail.com> ([@chrisdickinson](https://github.com/chrisdickinson)) -* **Rod Vagg** <rod@vagg.org> ([@rvagg](https://github.com/rvagg)) -* **Jeremiah Senkpiel** <fishrock123@rocketmail.com> ([@fishrock123](https://github.com/fishrock123)) -* **Colin Ihrig** <cjihrig@gmail.com> ([@cjihrig](https://github.com/cjihrig)) -* **Alexis Campailla** <orangemocha@nodejs.org> ([@orangemocha](https://github.com/orangemocha)) -* **Julien Gilli** <jgilli@nodejs.org> ([@misterdjules](https://github.com/misterdjules)) -* **James M Snell** <jasnell@gmail.com> ([@jasnell](https://github.com/jasnell)) -* **Steven R Loomis** <srloomis@us.ibm.com> ([@srl295](https://github.com/srl295)) -* **Michael Dawson** <michael_dawson@ca.ibm.com> ([@mhdawson](https://github.com/mhdawson)) -* **Shigeki Ohtsu** <ohtsu@iij.ad.jp> ([@shigeki](https://github.com/shigeki)) -* **Brian White** <mscdex@mscdex.net> ([@mscdex](https://github.com/mscdex)) +* [bnoordhuis](https://github.com/bnoordhuis) - **Ben Noordhuis** <info@bnoordhuis.nl> +* [chrisdickinson](https://github.com/chrisdickinson) - **Chris Dickinson** <christopher.s.dickinson@gmail.com> +* [cjihrig](https://github.com/cjihrig) - **Colin Ihrig** <cjihrig@gmail.com> +* [fishrock123](https://github.com/fishrock123) - **Jeremiah Senkpiel** <fishrock123@rocketmail.com> +* [indutny](https://github.com/indutny) - **Fedor Indutny** <fedor.indutny@gmail.com> +* [jasnell](https://github.com/jasnell) - **James M Snell** <jasnell@gmail.com> +* [mhdawson](https://github.com/mhdawson) - **Michael Dawson** <michael_dawson@ca.ibm.com> +* [misterdjules](https://github.com/misterdjules) - **Julien Gilli** <jgilli@nodejs.org> +* [mscdex](https://github.com/mscdex) - **Brian White** <mscdex@mscdex.net> +* [orangemocha](https://github.com/orangemocha) - **Alexis Campailla** <orangemocha@nodejs.org> +* [piscisaureus](https://github.com/piscisaureus) - **Bert Belder** <bertbelder@gmail.com> +* [rvagg](https://github.com/rvagg) - **Rod Vagg** <rod@vagg.org> +* [shigeki](https://github.com/shigeki) - **Shigeki Ohtsu** <ohtsu@iij.ad.jp> +* [srl295](https://github.com/srl295) - **Steven R Loomis** <srloomis@us.ibm.com> +* [trevnorris](https://github.com/trevnorris) - **Trevor Norris** <trev.norris@gmail.com> ### Collaborators -* **Isaac Z. Schlueter** <i@izs.me> ([@isaacs](https://github.com/isaacs)) -* **Mikeal Rogers** <mikeal.rogers@gmail.com> ([@mikeal](https://github.com/mikeal)) -* **Thorsten Lorenz** <thlorenz@gmx.de> ([@thlorenz](https://github.com/thlorenz)) -* **Stephen Belanger** <admin@stephenbelanger.com> ([@qard](https://github.com/qard)) -* **Evan Lucas** <evanlucas@me.com> ([@evanlucas](https://github.com/evanlucas)) -* **Brendan Ashworth** <brendan.ashworth@me.com> ([@brendanashworth](https://github.com/brendanashworth)) -* **Vladimir Kurchatkin** <vladimir.kurchatkin@gmail.com> ([@vkurchatkin](https://github.com/vkurchatkin)) -* **Nikolai Vavilov** <vvnicholas@gmail.com> ([@seishun](https://github.com/seishun)) -* **Nicu Micleușanu** <micnic90@gmail.com> ([@micnic](https://github.com/micnic)) -* **Aleksey Smolenchuk** <lxe@lxe.co> ([@lxe](https://github.com/lxe)) -* **Sam Roberts** <vieuxtech@gmail.com> ([@sam-github](https://github.com/sam-github)) -* **Wyatt Preul** <wpreul@gmail.com> ([@geek](https://github.com/geek)) -* **Christian Tellnes** <christian@tellnes.no> ([@tellnes](https://github.com/tellnes)) -* **Robert Kowalski** <rok@kowalski.gd> ([@robertkowalski](https://github.com/robertkowalski)) -* **Julian Duque** <julianduquej@gmail.com> ([@julianduque](https://github.com/julianduque)) -* **Johan Bergström** <bugs@bergstroem.nu> ([@jbergstroem](https://github.com/jbergstroem)) -* **Roman Reiss** <me@silverwind.io> ([@silverwind](https://github.com/silverwind)) -* **Petka Antonov** <petka_antonov@hotmail.com> ([@petkaantonov](https://github.com/petkaantonov)) -* **Yosuke Furukawa** <yosuke.furukawa@gmail.com> ([@yosuke-furukawa](https://github.com/yosuke-furukawa)) -* **Alex Kocharin** <alex@kocharin.ru> ([@rlidwka](https://github.com/rlidwka)) -* **Christopher Monsanto** <chris@monsan.to> ([@monsanto](https://github.com/monsanto)) -* **Ali Ijaz Sheikh** <ofrobots@google.com> ([@ofrobots](https://github.com/ofrobots)) -* **Oleg Elifantiev** <oleg@elifantiev.ru> ([@Olegas](https://github.com/Olegas)) -* **Domenic Denicola** <d@domenic.me> ([@domenic](https://github.com/domenic)) -* **Rich Trott** <rtrott@gmail.com> ([@Trott](https://github.com/Trott)) -* **Сковорода Никита Андреевич** <chalkerx@gmail.com> ([@ChALkeR](https://github.com/ChALkeR)) -* **Sakthipriyan Vairamani** <thechargingvolcano@gmail.com> ([@thefourtheye](https://github.com/thefourtheye)) -* **Michaël Zasso** <mic.besace@gmail.com> ([@targos](https://github.com/targos)) -* **João Reis** <reis@janeasystems.com> ([@joaocgreis](https://github.com/joaocgreis)) +* [brendanashworth](https://github.com/brendanashworth) - **Brendan Ashworth** <brendan.ashworth@me.com> +* [ChALkeR](https://github.com/ChALkeR) - **Сковорода Никита Андреевич** <chalkerx@gmail.com> +* [domenic](https://github.com/domenic) - **Domenic Denicola** <d@domenic.me> +* [evanlucas](https://github.com/evanlucas) - **Evan Lucas** <evanlucas@me.com> +* [geek](https://github.com/geek) - **Wyatt Preul** <wpreul@gmail.com> +* [isaacs](https://github.com/isaacs) - **Isaac Z. Schlueter** <i@izs.me> +* [jbergstroem](https://github.com/jbergstroem) - **Johan Bergström** <bugs@bergstroem.nu> +* [joaocgreis](https://github.com/joaocgreis) - **João Reis** <reis@janeasystems.com> +* [julianduque](https://github.com/julianduque) - **Julian Duque** <julianduquej@gmail.com> +* [lxe](https://github.com/lxe) - **Aleksey Smolenchuk** <lxe@lxe.co> +* [micnic](https://github.com/micnic) - **Nicu Micleușanu** <micnic90@gmail.com> +* [mikeal](https://github.com/mikeal) - **Mikeal Rogers** <mikeal.rogers@gmail.com> +* [monsanto](https://github.com/monsanto) - **Christopher Monsanto** <chris@monsan.to> +* [ofrobots](https://github.com/ofrobots) - **Ali Ijaz Sheikh** <ofrobots@google.com> +* [Olegas](https://github.com/Olegas) - **Oleg Elifantiev** <oleg@elifantiev.ru> +* [petkaantonov](https://github.com/petkaantonov) - **Petka Antonov** <petka_antonov@hotmail.com> +* [qard](https://github.com/qard) - **Stephen Belanger** <admin@stephenbelanger.com> +* [rlidwka](https://github.com/rlidwka) - **Alex Kocharin** <alex@kocharin.ru> +* [robertkowalski](https://github.com/robertkowalski) - **Robert Kowalski** <rok@kowalski.gd> +* [sam-github](https://github.com/sam-github) - **Sam Roberts** <vieuxtech@gmail.com> +* [seishun](https://github.com/seishun) - **Nikolai Vavilov** <vvnicholas@gmail.com> +* [silverwind](https://github.com/silverwind) - **Roman Reiss** <me@silverwind.io> +* [targos](https://github.com/targos) - **Michaël Zasso** <mic.besace@gmail.com> +* [tellnes](https://github.com/tellnes) - **Christian Tellnes** <christian@tellnes.no> +* [thefourtheye](https://github.com/thefourtheye) - **Sakthipriyan Vairamani** <thechargingvolcano@gmail.com> +* [thlorenz](https://github.com/thlorenz) - **Thorsten Lorenz** <thlorenz@gmx.de> +* [Trott](https://github.com/Trott) - **Rich Trott** <rtrott@gmail.com> +* [vkurchatkin](https://github.com/vkurchatkin) - **Vladimir Kurchatkin** <vladimir.kurchatkin@gmail.com> +* [yosuke-furukawa](https://github.com/yosuke-furukawa) - **Yosuke Furukawa** <yosuke.furukawa@gmail.com> Collaborators & TSC members follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in maintaining the io.js project. From 892944568634e3085de0c5df98cc93ac6602c886 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Fri, 28 Aug 2015 16:58:18 -0400 Subject: [PATCH 163/214] doc: update url doc to account for escaping Fixes: https://github.com/nodejs/node/issues/2113 Ref: 17a379ec39a34408477ac6a43751c1b9b2e952a4 PR-URL: https://github.com/nodejs/node/pull/2605 Reviewed-By: jasnell - James M Snell Reviewed-By: cjihrig - Colin Ihrig Reviewed-By: mscdex - Brian White --- doc/api/url.markdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/api/url.markdown b/doc/api/url.markdown index bc54bee360f..cd4797777f0 100644 --- a/doc/api/url.markdown +++ b/doc/api/url.markdown @@ -5,6 +5,8 @@ This module has utilities for URL resolution and parsing. Call `require('url')` to use it. +## URL Parsing + Parsed URL objects have some or all of the following fields, depending on whether or not they exist in the URL string. Any parts that are not in the URL string will not be in the parsed object. Examples are shown for the URL @@ -64,6 +66,15 @@ string will not be in the parsed object. Examples are shown for the URL Example: `'#hash'` +### Escaped Characters + +Spaces (`' '`) and the following characters will be automatically escaped in the +properties of URL objects: + + < > " ` \r \n \t { } | \ ^ ' + +--- + The following methods are provided by the URL module: ## url.parse(urlStr[, parseQueryString][, slashesDenoteHost]) From b2c5479a1428c5c79d09f2fe9b17140d7d511231 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 28 Aug 2015 19:56:22 -0700 Subject: [PATCH 164/214] test: refactor to eliminate flaky test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This retains the key elements of test-child-process-fork-getconnections (forks a child process, sends a bunch of sockets, uses getConnections() to enumerate them) but contains some code to work around an apparent intermittent bug that occurs on OS X where a socket seems to close itself unexpectedly. https://github.com/nodejs/node/issues/2610 was opened for the bug that was causing the problem in the first place. PR-URL: https://github.com/nodejs/node/pull/2609 Fixes: https://github.com/nodejs/node/issues/1100 Reviewed-By: jbergstroem - Johan Bergström Reviewed-By: Brendan Ashworth --- test/sequential/sequential.status | 1 - .../test-child-process-fork-getconnections.js | 59 ++++++++++--------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index f61d98b63a0..e7f0ca2b323 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -5,7 +5,6 @@ prefix sequential # sample-test : PASS,FLAKY [true] # This section applies to all platforms -test-child-process-fork-getconnections : PASS,FLAKY test-repl-persistent-history : PASS,FLAKY [$system==win32] diff --git a/test/sequential/test-child-process-fork-getconnections.js b/test/sequential/test-child-process-fork-getconnections.js index a587713b613..934df28d798 100644 --- a/test/sequential/test-child-process-fork-getconnections.js +++ b/test/sequential/test-child-process-fork-getconnections.js @@ -1,48 +1,52 @@ 'use strict'; -var assert = require('assert'); -var common = require('../common'); -var fork = require('child_process').fork; -var net = require('net'); -var count = 12; +const assert = require('assert'); +const common = require('../common'); +const fork = require('child_process').fork; +const net = require('net'); +const count = 12; if (process.argv[2] === 'child') { - var sockets = []; - var id = process.argv[3]; + let sockets = []; process.on('message', function(m, socket) { + function sendClosed(id) { + process.send({ id: id, status: 'closed'}); + }; + if (m.cmd === 'new') { assert(socket); assert(socket instanceof net.Socket, 'should be a net.Socket'); sockets.push(socket); - socket.on('end', function() { - if (!this.closingOnPurpose) - throw new Error('[c] closing by accident!'); - }); } if (m.cmd === 'close') { assert.equal(socket, undefined); - sockets[m.id].once('close', function() { - process.send({ id: m.id, status: 'closed' }); - }); - sockets[m.id].destroy(); + if (sockets[m.id].destroyed) { + // Workaround for https://github.com/nodejs/node/issues/2610 + sendClosed(m.id); + // End of workaround. When bug is fixed, this code can be used instead: + // throw new Error('socket destroyed unexpectedly!'); + } else { + sockets[m.id].once('close', sendClosed.bind(null, m.id)); + sockets[m.id].destroy(); + } } }); } else { - var child = fork(process.argv[1], ['child']); + const child = fork(process.argv[1], ['child']); child.on('exit', function(code, signal) { if (!childKilled) throw new Error('child died unexpectedly!'); }); - var server = net.createServer(); - var sockets = []; - var sent = 0; + const server = net.createServer(); + let sockets = []; + let sent = 0; server.on('connection', function(socket) { - child.send({ cmd: 'new' }, socket, { track: false }); + child.send({ cmd: 'new' }, socket); sockets.push(socket); if (sockets.length === count) { @@ -50,21 +54,18 @@ if (process.argv[2] === 'child') { } }); - var disconnected = 0; - var clients = []; + let disconnected = 0; server.on('listening', function() { - var j = count, client; + let j = count, client; while (j--) { client = net.connect(common.PORT, '127.0.0.1'); - client.id = j; client.on('close', function() { disconnected += 1; }); - clients.push(client); } }); - var childKilled = false; + let childKilled = false; function closeSockets(i) { if (i === count) { childKilled = true; @@ -73,17 +74,17 @@ if (process.argv[2] === 'child') { return; } - sent++; - child.send({ id: i, cmd: 'close' }); child.once('message', function(m) { assert(m.status === 'closed'); server.getConnections(function(err, num) { closeSockets(i + 1); }); }); + sent++; + child.send({ id: i, cmd: 'close' }); }; - var closeEmitted = false; + let closeEmitted = false; server.on('close', function() { closeEmitted = true; }); From 7be4e49cb6fd034e79738ab573a9218a1dab77ab Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 2 Sep 2015 14:16:24 -0700 Subject: [PATCH 165/214] child_process: check execFile and fork args Port of joyent/node commits: * https://github.com/nodejs/node-v0.x-archive/commit/e17c5a72b23f920f291d61f2780068c18768cb92 * https://github.com/nodejs/node-v0.x-archive/commit/70dafa7b624abd43432e03304d65cc527fbecc11 Pull over test-child-process-spawn-typeerror.js from v0.12, replacing the existing test in master. The new test includes a broader set of tests on the various arg choices and throws. Reviewed-By: trevnorris - Trevor Norris Reviewed-By: cjihrig - Colin Ihrig Reviewed-By: thefourtheye - Sakthipriyan Vairamani PR-URL: https://github.com/nodejs/node/pull/2667 Fixes: https://github.com/nodejs/node/issues/2515 --- lib/child_process.js | 32 ++++-- .../test-child-process-spawn-typeerror.js | 101 ++++++++++++++++-- 2 files changed, 114 insertions(+), 19 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index 57a8601df59..5d8103c014e 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -23,6 +23,8 @@ exports.fork = function(modulePath /*, args, options*/) { if (Array.isArray(arguments[1])) { args = arguments[1]; options = util._extend({}, arguments[2]); + } else if (arguments[1] && typeof arguments[1] !== 'object') { + throw new TypeError('Incorrect value of args option'); } else { args = []; options = util._extend({}, arguments[1]); @@ -108,7 +110,7 @@ exports.exec = function(command /*, options, callback*/) { exports.execFile = function(file /*, args, options, callback*/) { - var args, callback; + var args = [], callback; var options = { encoding: 'utf8', timeout: 0, @@ -118,18 +120,26 @@ exports.execFile = function(file /*, args, options, callback*/) { env: null }; - // Parse the parameters. - - if (typeof arguments[arguments.length - 1] === 'function') { - callback = arguments[arguments.length - 1]; + // Parse the optional positional parameters. + var pos = 1; + if (pos < arguments.length && Array.isArray(arguments[pos])) { + args = arguments[pos++]; + } else if (pos < arguments.length && arguments[pos] == null) { + pos++; } - if (Array.isArray(arguments[1])) { - args = arguments[1]; - options = util._extend(options, arguments[2]); - } else { - args = []; - options = util._extend(options, arguments[1]); + if (pos < arguments.length && typeof arguments[pos] === 'object') { + options = util._extend(options, arguments[pos++]); + } else if (pos < arguments.length && arguments[pos] == null) { + pos++; + } + + if (pos < arguments.length && typeof arguments[pos] === 'function') { + callback = arguments[pos++]; + } + + if (pos === 1 && arguments.length > 1) { + throw new TypeError('Incorrect value of args option'); } var child = spawn(file, args, { diff --git a/test/parallel/test-child-process-spawn-typeerror.js b/test/parallel/test-child-process-spawn-typeerror.js index 348ab2491dd..44d67e86086 100644 --- a/test/parallel/test-child-process-spawn-typeerror.js +++ b/test/parallel/test-child-process-spawn-typeerror.js @@ -1,14 +1,19 @@ 'use strict'; -var assert = require('assert'); -var child_process = require('child_process'); -var spawn = child_process.spawn; -var cmd = require('../common').isWindows ? 'rundll32' : 'ls'; -var invalidArgsMsg = /Incorrect value of args option/; -var invalidOptionsMsg = /options argument must be an object/; +const assert = require('assert'); +const child_process = require('child_process'); +const spawn = child_process.spawn; +const fork = child_process.fork; +const execFile = child_process.execFile; +const common = require('../common'); +const cmd = common.isWindows ? 'rundll32' : 'ls'; +const invalidcmd = 'hopefully_you_dont_have_this_on_your_machine'; +const invalidArgsMsg = /Incorrect value of args option/; +const invalidOptionsMsg = /options argument must be an object/; +const empty = common.fixturesDir + '/empty.js'; -// verify that args argument must be an array assert.throws(function() { - spawn(cmd, 'this is not an array'); + var child = spawn(invalidcmd, 'this is not an array'); + child.on('error', assert.fail); }, TypeError); // verify that valid argument combinations do not throw @@ -49,3 +54,83 @@ assert.throws(function() { spawn(cmd, [], 1); }, invalidOptionsMsg); +// Argument types for combinatorics +const a = []; +const o = {}; +const c = function callback() {}; +const s = 'string'; +const u = undefined; +const n = null; + +// function spawn(file=f [,args=a] [, options=o]) has valid combinations: +// (f) +// (f, a) +// (f, a, o) +// (f, o) +assert.doesNotThrow(function() { spawn(cmd); }); +assert.doesNotThrow(function() { spawn(cmd, a); }); +assert.doesNotThrow(function() { spawn(cmd, a, o); }); +assert.doesNotThrow(function() { spawn(cmd, o); }); + +// Variants of undefined as explicit 'no argument' at a position +assert.doesNotThrow(function() { spawn(cmd, u, o); }); +assert.doesNotThrow(function() { spawn(cmd, a, u); }); + +assert.throws(function() { spawn(cmd, n, o); }, TypeError); +assert.throws(function() { spawn(cmd, a, n); }, TypeError); + +assert.throws(function() { spawn(cmd, s); }, TypeError); +assert.throws(function() { spawn(cmd, a, s); }, TypeError); + + +// verify that execFile has same argument parsing behaviour as spawn +// +// function execFile(file=f [,args=a] [, options=o] [, callback=c]) has valid +// combinations: +// (f) +// (f, a) +// (f, a, o) +// (f, a, o, c) +// (f, a, c) +// (f, o) +// (f, o, c) +// (f, c) +assert.doesNotThrow(function() { execFile(cmd); }); +assert.doesNotThrow(function() { execFile(cmd, a); }); +assert.doesNotThrow(function() { execFile(cmd, a, o); }); +assert.doesNotThrow(function() { execFile(cmd, a, o, c); }); +assert.doesNotThrow(function() { execFile(cmd, a, c); }); +assert.doesNotThrow(function() { execFile(cmd, o); }); +assert.doesNotThrow(function() { execFile(cmd, o, c); }); +assert.doesNotThrow(function() { execFile(cmd, c); }); + +// Variants of undefined as explicit 'no argument' at a position +assert.doesNotThrow(function() { execFile(cmd, u, o, c); }); +assert.doesNotThrow(function() { execFile(cmd, a, u, c); }); +assert.doesNotThrow(function() { execFile(cmd, a, o, u); }); +assert.doesNotThrow(function() { execFile(cmd, n, o, c); }); +assert.doesNotThrow(function() { execFile(cmd, a, n, c); }); +assert.doesNotThrow(function() { execFile(cmd, a, o, n); }); + +// string is invalid in arg position (this may seem strange, but is +// consistent across node API, cf. `net.createServer('not options', 'not +// callback')` +assert.throws(function() { execFile(cmd, s, o, c); }, TypeError); +assert.doesNotThrow(function() { execFile(cmd, a, s, c); }); +assert.doesNotThrow(function() { execFile(cmd, a, o, s); }); + + +// verify that fork has same argument parsing behaviour as spawn +// +// function fork(file=f [,args=a] [, options=o]) has valid combinations: +// (f) +// (f, a) +// (f, a, o) +// (f, o) +assert.doesNotThrow(function() { fork(empty); }); +assert.doesNotThrow(function() { fork(empty, a); }); +assert.doesNotThrow(function() { fork(empty, a, o); }); +assert.doesNotThrow(function() { fork(empty, o); }); + +assert.throws(function() { fork(empty, s); }, TypeError); +assert.doesNotThrow(function() { fork(empty, a, s); }, TypeError); From 5a51edd7185ba468a3866fe1afdfd047521fa231 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Fri, 14 Aug 2015 10:07:18 +0200 Subject: [PATCH 166/214] build: add --enable-asan with builtin leakcheck PR-URL: https://github.com/nodejs/node/pull/2376 Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis --- common.gypi | 22 ++++++++++++++++++-- configure | 6 ++++++ src/node.cc | 8 +++++++ test/sequential/test-child-process-emfile.js | 9 +++++++- tools/lsan_suppressions.txt | 4 ++++ 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 tools/lsan_suppressions.txt diff --git a/common.gypi b/common.gypi index 7972c2d60a5..7819816bbbd 100644 --- a/common.gypi +++ b/common.gypi @@ -173,16 +173,34 @@ }, 'msvs_disabled_warnings': [4351, 4355, 4800], 'conditions': [ - ['asan != 0', { + ['asan == 1 and OS != "mac"', { 'cflags+': [ '-fno-omit-frame-pointer', '-fsanitize=address', - '-w', # http://crbug.com/162783 + '-DLEAK_SANITIZER' ], 'cflags_cc+': [ '-gline-tables-only' ], 'cflags!': [ '-fomit-frame-pointer' ], 'ldflags': [ '-fsanitize=address' ], }], + ['asan == 1 and OS == "mac"', { + 'xcode_settings': { + 'OTHER_CFLAGS+': [ + '-fno-omit-frame-pointer', + '-gline-tables-only', + '-fsanitize=address', + '-DLEAK_SANITIZER' + ], + 'OTHER_CFLAGS!': [ + '-fomit-frame-pointer', + ], + }, + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, + }], + ], + }], ['OS == "win"', { 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin 'defines': [ diff --git a/configure b/configure index f33821cd3a8..39f62ff3f06 100755 --- a/configure +++ b/configure @@ -335,6 +335,11 @@ parser.add_option('--xcode', dest='use_xcode', help='generate build files for use with xcode') +parser.add_option('--enable-asan', + action='store_true', + dest='enable_asan', + help='build with asan') + parser.add_option('--enable-static', action='store_true', dest='enable_static', @@ -707,6 +712,7 @@ def configure_node(o): if options.linked_module: o['variables']['library_files'] = options.linked_module + o['variables']['asan'] = int(options.enable_asan or 0) def configure_library(lib, output): shared_lib = 'shared_' + lib diff --git a/src/node.cc b/src/node.cc index 61ee7f74277..da10722e03b 100644 --- a/src/node.cc +++ b/src/node.cc @@ -52,6 +52,10 @@ #include #include +#if defined(LEAK_SANITIZER) +#include +#endif + #if defined(_MSC_VER) #include #include @@ -3967,6 +3971,10 @@ static void StartNodeInstance(void* arg) { instance_data->set_exit_code(exit_code); RunAtExit(env); +#if defined(LEAK_SANITIZER) + __lsan_do_leak_check(); +#endif + env->Dispose(); env = nullptr; } diff --git a/test/sequential/test-child-process-emfile.js b/test/sequential/test-child-process-emfile.js index 08a34a05f25..c4c467c3392 100644 --- a/test/sequential/test-child-process-emfile.js +++ b/test/sequential/test-child-process-emfile.js @@ -9,9 +9,11 @@ if (common.isWindows) { return; } +var openFds = []; + for (;;) { try { - fs.openSync(__filename, 'r'); + openFds.push(fs.openSync(__filename, 'r')); } catch (err) { assert(err.code === 'EMFILE' || err.code === 'ENFILE'); break; @@ -27,3 +29,8 @@ proc.on('error', common.mustCall(function(err) { // 'exit' should not be emitted, the process was never spawned. proc.on('exit', assert.fail); + +// close one fd for LSan +if (openFds.length >= 1) { + fs.closeSync(openFds.pop()); +} diff --git a/tools/lsan_suppressions.txt b/tools/lsan_suppressions.txt new file mode 100644 index 00000000000..46887b62ae5 --- /dev/null +++ b/tools/lsan_suppressions.txt @@ -0,0 +1,4 @@ +# Usage: LSAN_OPTIONS=suppressions=`pwd`/tools/lsan_suppressions.txt make check + +# Suppress small (intentional) leaks in glibc +leak:libc.so From daf6c533ccc49a0ac503491339b830edcf3c28b4 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Wed, 2 Sep 2015 12:23:49 -0400 Subject: [PATCH 167/214] events,lib: don't require EE#listenerCount() Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: https://github.com/nodejs/node/issues/2655 Refs: 8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e PR-URL: https://github.com/nodejs/node/pull/2661 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/_http_server.js | 4 ++-- lib/_stream_readable.js | 4 ++-- lib/events.js | 9 +++++++-- lib/stream.js | 2 +- .../test-stream-pipe-without-listenerCount.js | 19 +++++++++++++++++++ 5 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 test/parallel/test-stream-pipe-without-listenerCount.js diff --git a/lib/_http_server.js b/lib/_http_server.js index dd787fa2f7a..16460fca357 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -374,7 +374,7 @@ function connectionListener(socket) { parser = null; var eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade'; - if (self.listenerCount(eventName) > 0) { + if (EventEmitter.listenerCount(self, eventName) > 0) { debug('SERVER have listener for %s', eventName); var bodyHead = d.slice(bytesParsed, d.length); @@ -497,7 +497,7 @@ function connectionListener(socket) { (req.httpVersionMajor == 1 && req.httpVersionMinor == 1) && continueExpression.test(req.headers['expect'])) { res._expect_continue = true; - if (self.listenerCount('checkContinue') > 0) { + if (EventEmitter.listenerCount(self, 'checkContinue') > 0) { self.emit('checkContinue', req, res); } else { res.writeContinue(); diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 681c3eaec24..c6bd0c16659 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -537,7 +537,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { debug('onerror', er); unpipe(); dest.removeListener('error', onerror); - if (dest.listenerCount('error') === 0) + if (EE.listenerCount(dest, 'error') === 0) dest.emit('error', er); } // This is a brutally ugly hack to make sure that our error handler @@ -586,7 +586,7 @@ function pipeOnDrain(src) { debug('pipeOnDrain', state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && src.listenerCount('data')) { + if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { state.flowing = true; flow(src); } diff --git a/lib/events.js b/lib/events.js index 722b64537e1..ea3f2831eb3 100644 --- a/lib/events.js +++ b/lib/events.js @@ -395,10 +395,15 @@ EventEmitter.prototype.listeners = function listeners(type) { }; EventEmitter.listenerCount = function(emitter, type) { - return emitter.listenerCount(type); + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } }; -EventEmitter.prototype.listenerCount = function listenerCount(type) { +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { const events = this._events; if (events) { diff --git a/lib/stream.js b/lib/stream.js index 2e0cdfc3134..8d3535dc4d2 100644 --- a/lib/stream.js +++ b/lib/stream.js @@ -70,7 +70,7 @@ Stream.prototype.pipe = function(dest, options) { // don't leave dangling pipes when there are errors. function onerror(er) { cleanup(); - if (this.listenerCount('error') === 0) { + if (EE.listenerCount(this, 'error') === 0) { throw er; // Unhandled stream error in pipe. } } diff --git a/test/parallel/test-stream-pipe-without-listenerCount.js b/test/parallel/test-stream-pipe-without-listenerCount.js new file mode 100644 index 00000000000..d7a6a6b653a --- /dev/null +++ b/test/parallel/test-stream-pipe-without-listenerCount.js @@ -0,0 +1,19 @@ +'use strict'; +const common = require('../common'); +const stream = require('stream'); + +const r = new stream.Stream(); +r.listenerCount = undefined; + +const w = new stream.Stream(); +w.listenerCount = undefined; + +w.on('pipe', function() { + r.emit('error', new Error('Readable Error')); + w.emit('error', new Error('Writable Error')); +}); +r.on('error', common.mustCall(noop)); +w.on('error', common.mustCall(noop)); +r.pipe(w); + +function noop() {}; From e68c7ec49864b5adf58f4cc21d37e0428e8c2efc Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 7 Jul 2015 15:27:14 -0700 Subject: [PATCH 168/214] contextify: ignore getters during initialization The `context_` is not initialized until the `CreateV8Context` will return. Make sure that it will be empty (by moving away initialization from constructor) at start, and ignore getter callbacks until it will have some value. PR-URL: https://github.com/nodejs/io.js/pull/2091 Reviewed-By: Trevor Norris --- src/node_contextify.cc | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index ae043eb376a..2c52e7f0f8b 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -65,9 +65,10 @@ class ContextifyContext { explicit ContextifyContext(Environment* env, Local sandbox) : env_(env), sandbox_(env->isolate(), sandbox), - context_(env->isolate(), CreateV8Context(env)), // Wait for sandbox_, proxy_global_, and context_ to die references_(0) { + context_.Reset(env->isolate(), CreateV8Context(env)); + sandbox_.SetWeak(this, WeakCallback); sandbox_.MarkIndependent(); references_++; @@ -355,6 +356,10 @@ class ContextifyContext { ContextifyContext* ctx = Unwrap(args.Data().As()); + // Stil initializing + if (ctx->context_.IsEmpty()) + return; + Local sandbox = PersistentToLocal(isolate, ctx->sandbox_); MaybeLocal maybe_rv = sandbox->GetRealNamedProperty(ctx->context(), property); @@ -383,6 +388,10 @@ class ContextifyContext { ContextifyContext* ctx = Unwrap(args.Data().As()); + // Stil initializing + if (ctx->context_.IsEmpty()) + return; + PersistentToLocal(isolate, ctx->sandbox_)->Set(property, value); } @@ -395,6 +404,10 @@ class ContextifyContext { ContextifyContext* ctx = Unwrap(args.Data().As()); + // Stil initializing + if (ctx->context_.IsEmpty()) + return; + Local sandbox = PersistentToLocal(isolate, ctx->sandbox_); Maybe maybe_prop_attr = sandbox->GetRealNamedPropertyAttributes(ctx->context(), property); @@ -422,6 +435,11 @@ class ContextifyContext { ContextifyContext* ctx = Unwrap(args.Data().As()); + + // Stil initializing + if (ctx->context_.IsEmpty()) + return; + Local sandbox = PersistentToLocal(isolate, ctx->sandbox_); Maybe success = sandbox->Delete(ctx->context(), property); @@ -436,6 +454,10 @@ class ContextifyContext { ContextifyContext* ctx = Unwrap(args.Data().As()); + // Stil initializing + if (ctx->context_.IsEmpty()) + return; + Local sandbox = PersistentToLocal(args.GetIsolate(), ctx->sandbox_); args.GetReturnValue().Set(sandbox->GetPropertyNames()); } From 2ffb21baf18b6a32821b8d54a7fd721f683ceb0f Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 4 Sep 2015 12:25:31 +1000 Subject: [PATCH 169/214] test: fix use of `common` before required PR-URL: https://github.com/nodejs/node/pull/2685 Reviewed-By: Sakthipriyan Vairamani --- test/pummel/test-keep-alive.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/pummel/test-keep-alive.js b/test/pummel/test-keep-alive.js index d396042fde8..c2ec7fd81f1 100644 --- a/test/pummel/test-keep-alive.js +++ b/test/pummel/test-keep-alive.js @@ -1,8 +1,4 @@ 'use strict'; -if (common.isWindows) { - console.log('1..0 # Skipped: no `wrk` on windows'); - return; -} // This test requires the program 'wrk' var common = require('../common'); @@ -12,6 +8,11 @@ var http = require('http'); var path = require('path'); var url = require('url'); +if (common.isWindows) { + console.log('1..0 # Skipped: no `wrk` on windows'); + return; +} + var body = 'hello world\n'; var server = http.createServer(function(req, res) { res.writeHead(200, { From aa1140e59a7e8891dedacdfbd796547dd156ff7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 1 Sep 2015 10:51:17 +0200 Subject: [PATCH 170/214] buffer: SlowBuffer only accept valid numeric values Fixes a regression that appeared with the new Buffer implementation in v3. Without this change, calling the SlowBuffer constructor with something else than a number would abort on the C++ side. This makes sure that the length argument is coerced to number or is 0. Fixes: https://github.com/nodejs/node/issues/2634 PR-URL: https://github.com/nodejs/node/pull/2635 Reviewed-By: trevnorris - Trevor Norris Reviewed-By: cjihrig - Colin Ihrig --- lib/buffer.js | 4 +-- test/parallel/test-buffer-slow.js | 55 +++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-buffer-slow.js diff --git a/lib/buffer.js b/lib/buffer.js index 13933001e83..39cd5f9e58b 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -58,9 +58,9 @@ createPool(); function SlowBuffer(length) { - if (length < 0) + if (+length != length) length = 0; - return binding.create(length); + return binding.create(+length); }; SlowBuffer.prototype.__proto__ = Buffer.prototype; diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js new file mode 100644 index 00000000000..e652a6a0f95 --- /dev/null +++ b/test/parallel/test-buffer-slow.js @@ -0,0 +1,55 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const buffer = require('buffer'); +const Buffer = buffer.Buffer; +const SlowBuffer = buffer.SlowBuffer; + +const ones = [1, 1, 1, 1]; + +// should create a Buffer +let sb = new SlowBuffer(4); +assert(sb instanceof Buffer); +assert.strictEqual(sb.length, 4); +sb.fill(1); +assert.deepEqual(sb, ones); + +// underlying ArrayBuffer should have the same length +assert.strictEqual(sb.buffer.byteLength, 4); + +// should work without new +sb = SlowBuffer(4); +assert(sb instanceof Buffer); +assert.strictEqual(sb.length, 4); +sb.fill(1); +assert.deepEqual(sb, ones); + +// should work with edge cases +assert.strictEqual(SlowBuffer(0).length, 0); +try { + assert.strictEqual(SlowBuffer(buffer.kMaxLength).length, buffer.kMaxLength); +} catch (e) { + assert.equal(e.message, 'Buffer allocation failed - process out of memory'); +} + +// should work with number-coercible values +assert.strictEqual(SlowBuffer('6').length, 6); +assert.strictEqual(SlowBuffer(true).length, 1); + +// should create zero-length buffer if parameter is not a number +assert.strictEqual(SlowBuffer().length, 0); +assert.strictEqual(SlowBuffer(NaN).length, 0); +assert.strictEqual(SlowBuffer({}).length, 0); +assert.strictEqual(SlowBuffer('string').length, 0); + +// should throw with invalid length +assert.throws(function() { + new SlowBuffer(Infinity); +}, 'invalid Buffer length'); +assert.throws(function() { + new SlowBuffer(-1); +}, 'invalid Buffer length'); +assert.throws(function() { + new SlowBuffer(buffer.kMaxLength + 1); +}, 'invalid Buffer length'); From 8372ea2ca5c35230566ec0c1c25318ad63a19f83 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Wed, 2 Sep 2015 14:54:24 +0530 Subject: [PATCH 171/214] doc,test: enable recursive file watching in Windows Recursive file watching is supported by libuv since 1.7.0. Refer https://github.com/nodejs/node/blob/master/deps/uv/ChangeLog#L126. This patch notes that in the docs and enables testing this feature. It also adds proper TAP plugin parsable message for other platforms. PR-URL: https://github.com/nodejs/node/pull/2649 Fixes: https://github.com/nodejs/node/issues/375 Reviewed-By: rvagg - Rod Vagg Reviewed-By: silverwind - Roman Reiss --- doc/api/fs.markdown | 6 +++--- test/sequential/test-fs-watch-recursive.js | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 9027d5f04fc..6ef64d5e74a 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -625,9 +625,9 @@ the event. The `fs.watch` API is not 100% consistent across platforms, and is unavailable in some situations. -The recursive option is currently supported on OS X. Only FSEvents supports this -type of file watching so it is unlikely any additional platforms will be added -soon. +The recursive option is currently supported on OS X and Windows. Only FSEvents + supports this type of file watching so it is unlikely any additional platforms + will be added soon. #### Availability diff --git a/test/sequential/test-fs-watch-recursive.js b/test/sequential/test-fs-watch-recursive.js index 0a18b94f56b..3e6e4b44f4e 100644 --- a/test/sequential/test-fs-watch-recursive.js +++ b/test/sequential/test-fs-watch-recursive.js @@ -4,7 +4,7 @@ var assert = require('assert'); var path = require('path'); var fs = require('fs'); -if (process.platform === 'darwin') { +if (process.platform === 'darwin' || common.isWindows) { var watchSeenOne = 0; var testDir = common.tmpDir; @@ -46,4 +46,6 @@ if (process.platform === 'darwin') { setTimeout(function() { fs.writeFileSync(filepathOne, 'world'); }, 10); +} else { + console.log('1..0 # Skipped: recursive option is darwin/windows specific'); } From b028978a53f3b9e4e59e8e60092570233b1cf28a Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Thu, 3 Sep 2015 10:10:29 +0200 Subject: [PATCH 172/214] src: fix buffer overflow for long exception lines Long exception lines resulted in a stack buffer overflow or assertion because it was assumed snprintf not counts discarded chars or the assertion itself was incorrect: `(off) >= sizeof(arrow)` PR-URL: https://github.com/nodejs/node/pull/2404 Reviewed-By: Trevor Norris Reviewed-By: Fedor Indutny --- src/node.cc | 24 +++++++++++++----------- test/fixtures/throws_error5.js | 1 + test/parallel/test-error-reporting.js | 6 +++++- 3 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 test/fixtures/throws_error5.js diff --git a/src/node.cc b/src/node.cc index da10722e03b..e6e29b8f001 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1321,8 +1321,6 @@ void AppendExceptionLine(Environment* env, err_obj->SetHiddenValue(env->processed_string(), True(env->isolate())); } - char arrow[1024]; - // Print (filename):(line number): (message). node::Utf8Value filename(env->isolate(), message->GetScriptResourceName()); const char* filename_string = *filename; @@ -1355,6 +1353,9 @@ void AppendExceptionLine(Environment* env, int start = message->GetStartColumn(); int end = message->GetEndColumn(); + char arrow[1024]; + int max_off = sizeof(arrow) - 2; + int off = snprintf(arrow, sizeof(arrow), "%s:%i\n%s\n", @@ -1362,27 +1363,28 @@ void AppendExceptionLine(Environment* env, linenum, sourceline_string); CHECK_GE(off, 0); + if (off > max_off) { + off = max_off; + } // Print wavy underline (GetUnderline is deprecated). for (int i = 0; i < start; i++) { - if (sourceline_string[i] == '\0' || - static_cast(off) >= sizeof(arrow)) { + if (sourceline_string[i] == '\0' || off >= max_off) { break; } - CHECK_LT(static_cast(off), sizeof(arrow)); + CHECK_LT(off, max_off); arrow[off++] = (sourceline_string[i] == '\t') ? '\t' : ' '; } for (int i = start; i < end; i++) { - if (sourceline_string[i] == '\0' || - static_cast(off) >= sizeof(arrow)) { + if (sourceline_string[i] == '\0' || off >= max_off) { break; } - CHECK_LT(static_cast(off), sizeof(arrow)); + CHECK_LT(off, max_off); arrow[off++] = '^'; } - CHECK_LE(static_cast(off - 1), sizeof(arrow) - 1); - arrow[off++] = '\n'; - arrow[off] = '\0'; + CHECK_LE(off, max_off); + arrow[off] = '\n'; + arrow[off + 1] = '\0'; Local arrow_str = String::NewFromUtf8(env->isolate(), arrow); Local msg; diff --git a/test/fixtures/throws_error5.js b/test/fixtures/throws_error5.js new file mode 100644 index 00000000000..a0eba5d8b2f --- /dev/null +++ b/test/fixtures/throws_error5.js @@ -0,0 +1 @@ +0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000k0000000000000000000 diff --git a/test/parallel/test-error-reporting.js b/test/parallel/test-error-reporting.js index 0b5c7652871..cea60cf90f9 100644 --- a/test/parallel/test-error-reporting.js +++ b/test/parallel/test-error-reporting.js @@ -54,7 +54,11 @@ errExec('throws_error4.js', function(err, stdout, stderr) { assert.ok(/SyntaxError/.test(stderr)); }); +// Long exception line doesn't result in stack overflow +errExec('throws_error5.js', function(err, stdout, stderr) { + assert.ok(/SyntaxError/.test(stderr)); +}); process.on('exit', function() { - assert.equal(4, exits); + assert.equal(5, exits); }); From ca6c3223e13aa884041b1e92916faa3ac0744526 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Thu, 3 Sep 2015 10:10:30 +0200 Subject: [PATCH 173/214] src: use standard conform snprintf on windows The version used before returned -1 on truncation which does not conform to the standard. PR-URL: https://github.com/nodejs/node/pull/2404 Reviewed-By: Trevor Norris Reviewed-By: Fedor Indutny --- src/node_internals.h | 18 ++++++++++-------- test/fixtures/throws_error6.js | 1 + test/parallel/test-error-reporting.js | 11 ++++++++--- 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 test/fixtures/throws_error6.js diff --git a/src/node_internals.h b/src/node_internals.h index aa198666b62..463fca9b79b 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -95,17 +95,19 @@ void GetSockOrPeerName(const v8::FunctionCallbackInfo& args) { #ifdef _WIN32 // emulate snprintf() on windows, _snprintf() doesn't zero-terminate the buffer // on overflow... +// VS 2015 added a standard conform snprintf +#if defined( _MSC_VER ) && (_MSC_VER < 1900) #include -inline static int snprintf(char* buf, unsigned int len, const char* fmt, ...) { - va_list ap; - va_start(ap, fmt); - int n = _vsprintf_p(buf, len, fmt, ap); - if (len) - buf[len - 1] = '\0'; - va_end(ap); - return n; +inline static int snprintf(char *buffer, size_t n, const char *format, ...) { + va_list argp; + va_start(argp, format); + int ret = _vscprintf(format, argp); + vsnprintf_s(buffer, n, _TRUNCATE, format, argp); + va_end(argp); + return ret; } #endif +#endif #if defined(__x86_64__) # define BITS_PER_LONG 64 diff --git a/test/fixtures/throws_error6.js b/test/fixtures/throws_error6.js new file mode 100644 index 00000000000..8e650d4bf4f --- /dev/null +++ b/test/fixtures/throws_error6.js @@ -0,0 +1 @@ +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000k000000000 diff --git a/test/parallel/test-error-reporting.js b/test/parallel/test-error-reporting.js index cea60cf90f9..88ef5d306e3 100644 --- a/test/parallel/test-error-reporting.js +++ b/test/parallel/test-error-reporting.js @@ -54,11 +54,16 @@ errExec('throws_error4.js', function(err, stdout, stderr) { assert.ok(/SyntaxError/.test(stderr)); }); -// Long exception line doesn't result in stack overflow +// Specific long exception line doesn't result in stack overflow errExec('throws_error5.js', function(err, stdout, stderr) { assert.ok(/SyntaxError/.test(stderr)); }); -process.on('exit', function() { - assert.equal(5, exits); +// Long exception line with length > errorBuffer doesn't result in assertion +errExec('throws_error6.js', function(err, stdout, stderr) { + assert.ok(/SyntaxError/.test(stderr)); +}); + +process.on('exit', function() { + assert.equal(6, exits); }); From 324c073fb986e6ed257c4036e80d1ab80293d84f Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 3 Sep 2015 16:22:57 +1000 Subject: [PATCH 174/214] doc: add TSC meeting minutes 2015-09-02 PR-URL: https://github.com/nodejs/node/pull/2674 Reviewed-By: Colin Ihrig --- doc/tsc-meetings/2015-09-02.md | 418 +++++++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) create mode 100644 doc/tsc-meetings/2015-09-02.md diff --git a/doc/tsc-meetings/2015-09-02.md b/doc/tsc-meetings/2015-09-02.md new file mode 100644 index 00000000000..36f3a9efb7a --- /dev/null +++ b/doc/tsc-meetings/2015-09-02.md @@ -0,0 +1,418 @@ +# Node Foundation TSC Meeting 2015-09-02 + +## Links + +* **Audio Recording**: https://soundcloud.com/node-foundation/tsc-meeting-2015-09-02 +* **GitHub Issue**: https://github.com/nodejs/node/issues/2654 +* **Minutes Google Doc**: https://docs.google.com/document/d/1rXBdtsD9PJTExNXgzNZ9bez9oOjW45kLPjun4zdt0dY +* _Previous Minutes Google Doc: _ + +## Agenda + +Extracted from **tsc-agenda** labelled issues and pull requests in the nodejs org prior to meeting. + +### nodejs/node + +* deps: update v8 to 4.5.103.30 [#2632](https://github.com/nodejs/node/pull/2632) +* Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) +* Node.js v4 Release Timeline [#2522](https://github.com/nodejs/node/issues/2522) +* doc: update COLLABORATOR_GUIDE.md [#2638](https://github.com/nodejs/node/pull/2638) + +### nodejs/build + +* Merge job overwrites metadata [#179](https://github.com/nodejs/build/issues/179) + +## Minutes + + +### Present + +* Rod Vagg (TSC) +* Brian White (TSC) +* Steven R Loomis (TSC) +* Fedor Indutny (TSC) +* Bert Belder (TSC) +* Colin Ihrig (TSC) +* Trevor Norris (TSC) +* James M Snell (TSC) +* Chris Dickinson (TSC) +* Jeremiah Senkpiel (TSC) + +### Standup + +* Rod Vagg (TSC): node v4 prep, new website +* Brian White (TSC): issue/PR reviewing, working on JS DNS implementation some more +* Steven R Loomis (TSC): syncing with james, creating text for renaming of language groups (#2525), intl triaging, commenting on joyent/node issues +* Bert Belder (TSC): indisposed until end of october +* Colin Ihrig (TSC): reviewing issues/prs +* Trevor Norris (TSC): prs/issues, finagling the new build pr landing tool +* James M Snell (TSC): old prs in joyent/node cleaned up (64 remaining, wow), citgm tool updates, child process arguments pr, nodeconf.eu +* Michael Dawson (TSC): AIX support PR, some triage with Devin, preparing for NodeConfEU +* Chris Dickinson (TSC): Static analysis work (ongoing), docs (slowly), npm +* Jeremiah Senkpiel (TSC): v4 release prep +* Fedor Indutny (TSC): v8 arraybuffer perf, patch landed on v8; reviewing PRs + + +### Jenkins merge jobs always overwrites PR-URL and Reviewed-By [#179](https://github.com/nodejs/build/issues/179) + +Trevor: currently if you submit a job to land a pr, it will always remove all existing metadata and re-apply it based on the info passed to the jenkins build. from convo, good fix is to let old metadata persist & only append new metadata if it’s entered, if no metadata entered, nothing appended +Issue with current state: current system does not work for cherry-picks onto release branch — will wipe metadata and replace it +Goal: solidify with TSC that this is a good path forward + +James: absolutely, +1 + +Jeremiah: clarification on which branches this applies to + +Rod: cherry-picks are becoming increasingly difficult on iojs anyway, so the pr landing job may be master-specific + +James: no mixing of “with pr tool” and “manually”, things go bad quickly that way + +Trevor: cherry-pick PRs are accumulating too many cherry-picks; runnin it through the system manually doesn’t add useful info + +Domenic: description of chromium + - tests are run after landing + - no one is allowed to land commits if the build is broken on a branch + - sheriff of the day is responsible for fixing the issue + - in practice it’s painful, but it’s important for keeping things sane + +Trevor: this would make us better about flaky tests, also, admiration for how sporadically our flaky tests break + +Jeremiah: trying to do this now before v4 seems like a bad idea + +Rod: we’re smoothing out a little bit; circle back to original topic, we’re kind of talking about the larger issue, let the trial of the tool continue and come back to the discussion later. specifically: ask that metadata not be overridden in a github issue + +Domenic: addressing jeremiah’s concern: should we not run the trial while releasing v4? + +Trevor: agreement — have felt pain from this as we march to v4 + +Jeremiah: stuff that gets released to people is in the release branches, if we’re not using the pr tool on that branch, what is the point of using this tool? + +Rod: this will become more of a problem as we have more extended and LTS + +Domenic: clarification: intent of ci is to make sure tests pass everywhere + +Trevor: this tool only runs a subset + +Rod: since we branched 3.x there’s 4 commits in the tree that have faulty/missing metadata — like that the pr tool is enforcing this metadata, maybe move to using github status api for telling us whether the metadata is OK + +Trevor: clarify: contributors have landed commits that lack metadata? + +Rod: yep + +Trevor: argh + +Jeremiah: github suggested we use the status api + +Trevor: status api autoruns? + +Rod: you hook it up to webhooks, has in-progress and pass/fail + +Trevor: TJ can verify that devs destroy jenkins (multiple force pushes explode the jenkins box with so many jobs) + +Rod: we can cancel on force push (or add a “trevor is pushing, wait half an hour to run the tests” exception, har har) + +Jeremiah: you can tell if it’s been run on the last commits + +Rod: multiple statuses — up to 100? — “this pr is passing on these platforms! this pr has the right metadata. this pr lints well.” + +Rod: let’s move on! + +James: what’s the action item? + +Rod: don’t feel that we should cancel the trial + +Trevor: two prs that prevent segfaults because of other flaky tests that have to be reapplied + +James: in the 4.x branch do we need to use test-pr job to land commits? + +Rod: nope, cherry-pick onto those branches, only use the tool on master + +Jeremiah: it’s weird to use it on the unstable branch. I guess we could make it better for release branches in the meantime +* ci-run middle of hte night us time this has a + +Rod: vote for who whether we’d like to put this on hold + +Jeremiah: +0 put on hold + +Rod: who would like to continue it? + +...crickets... + +Trevor: give me another day + +James: one PR took 8 hours to land last friday + +Jeremiah: they take about an hour to land right now + +Rod: they are getting quicker, adding raspberrypis to the cluster. good incentive to make node startup time quicker! arm startup times have gone down over the last month or so + +Rod: let’s move on + +### doc: update COLLABORATOR_GUIDE [#2638](https://github.com/nodejs/node/pull/2638) + +Jeremiah: Alexis wanted to put the pr tool into the collaborator guide should punt on this right now notifying collaborators on issues is more effective messaging than the docs + +Rod: let’s hold off + +### deps: update v8 to 4.5.103.30 [#2632](https://github.com/nodejs/node/pull/2632) + +Rod: looking at the possibility of jumping to 4.5 for the v4 release it’s ready to merge. ofrobots has been doing the work, it’s good to go, there are pros and cons whether we stick with 4.4 or 4.5 for this release & associated LTS has anyone done any work on testing NAN? + +Bert: what breaks? what are the cons? + +Domenic: looking at v8 by code inspection, there are no breakages, just new deprecations — should *in theory* work — I don’t think anyone’s been testing it though + +Bert: can this v8 release be supported for LTS? we don’t know if this is better or worse than 4.4? maybe ask goog eng + +Trevor: they will say “Stay current” + +Bert: I think I agree with them — with no other info, picking the latest version seems best + +Michael: Z targets 4.4 — just recently got it fully clean — a move to 4.5 would cause a delay on getting release to community + +James: that’s just Z, not PPC, yes? + +Rod: how much work? + +Michael: going 4.3->4.4 took about a month + +Jeremiah: 4.3->4.4 breakage delta was much bigger + +Rod: that’s the external API though + +Michael: 7-8 patches/week? if we have to upgrade it will be extra work + delay for us + +James: if we’re sitll looking at LTS in early-mid oct, it’s going to give us a month to prove out v8 4.5 + +Domenic: we’ve been proving out 4.5 for 12 weeks + +Rod: we’re talking node here, though we’d have google support for an extra month. my concern is: we need v4 out now, latest by monday, this is a quick change and there’s potential for breakage + +James: we decided before that we weren’t going to make such a big change so quickly before a release. i agree with rod, but such a big change makes me nervous — making sure that nan et al works with 4.5 is a concern + +Jeremiah: we’re not going to be the ones to find the flaws in 4.5; want clarification on nan major/minor/patch? + +Rod: minor + +Domenic: should require no changes + +Rod: benjamin (kkoopa) is on the positive side of this, he wants to see us move to 4.5, and is willing to put in the work to do this + +Trevor: not that it matters much, but node has taken a hit from v8 in terms of perf recently, 4.5 has some improvements, fedor wrote an easily backportable patch as well, there are perf advantages + +James: it makes me nervous that we’ll have enough time to test things on the node side before LTS — if we’re comfortable saying we have a plan that we think exercises this before going LTS, I’m more ok + +Jeremiah: technically we have over a month + +Rod: vote + +who is leaning sticking to 4.4 + +James + michael + steven + +4.5: + +fedor, colin, jeremiah, brian, chris + +Rod: clarifying concerns + +Michael: share concerns with james, but also Z + +Rod: longer we have to support our own V8, the harder it is, and another 6 weeks of support would be great great + +James: I’m -0 + +Rod: spending some time today testing some existing addons taht have upgraded to nan@2. if there’s breakage, that tells me nan’s not ready, and that should be taken into account + +Domenic: if nan’s not ready, we don’t upgrade + +Rod: heading for 4.5, but with final go/no-go coming from nan testing; where are you at on this bert? + +Bert: I am happy to upgrade if you land it and nothing changes — which sounds like it might be the case (sans deprecation warnings) + +Rod: want ben’s opinion, but there may be no chance of that? + +Bert: it seems silly to go with a version that is almost already out of support, but OTOH, on the scale of LTS lifetime, 6 weeks is not really significant + +I wouldn’t worry too much about actual bugs in v8, about as likely in 4.5 as in 4.4; LTS is not about “no bugs”, it’s about “We support it” + +Rod: we want a **solid** release, though + +Bert: the LTS will also have a beta for a while, yes? + +Rod: the beta period for LTS is the stable line + +James: first LTS will have a beta of a little over a month, in the future 6 months + +Bert: realistically a month is a longer beta than we’ve ever had before + +Rod: 0.12 had a beta of 2 years + +{zing} :trollface: + +Bert: a beta with a lot of api changes, which is explicitly what we’re not going to do + +Bert: we need to move on + +Jeremiah: 4.5 brings arrow functions and that will make many people very happy + +Rod: it’s a good sales pitch! + +Rod: I’ll make the call. + +### Node.js v4 Release Timeline [#2522](https://github.com/nodejs/node/issues/2522) + +Rod: status update: v4 was to get out by Thurs, slipping on that, monday is the release date, cannot afford to slip any further + +Jeremiah: what’s actually slipping other than mdb? + +Rod: we’re not going to get mdb into v4, encourage before LTS, but that’s the best we can do, child process argument type checking where are we at on that? + +Trevor: it’s not ready + +James: working on that PR right now + +Rod: great, that feels like a fairly light one, process.send is the other one; ben’s on holiday, where are we at with that pr of his + +Jeremiah: multiple people have soft signed off on it + +Colin: weren’t there some strange ci failures with it? + +Rod: do not know, does someone want to put their hand up for that? + +Trevor: what’s the PR number? + +Jeremiah: #2620 + +Jeremiah: Trevor +1’d it + +Jeremiah: OH! that’s the one with the weird test failures we could not reproduce the breakage + +Rod: this seems like it can be run again and it won’t show flaky tests: maybe we should just re-run it + +Trevor: that really sucks when you’re trying to land 3 tests + +Rod: test runner should auto-rerun to make sure + +Trevor: oh, gotcha + +Rod: that’d be really quick for flaky tests + +Trevor: I’ve already reviewed and LGTM’d it, I’ll look at running it through the land-ci job + +James: looked at it earlier today, nothing concerning stood out + +Rod: no RC’s are out! that’s a problem! we’ve renamed the executable. I wanted to have a period of time where folks could download (with a working node-gyp) — we need this period of time. I’ve been working on that, some bits and pieces to get things to the right place on the server. first build had a broken OS X installer. there are a few yaks yet to shave, so that’s why we can’t get this out by thursday + +Rod: steven: could you confirm that 3.x has INTL enabled? + +Steven: will look into, take as action item (confirmed!) + +Rod: not going to tick that off till we confirm, but I _think_ that one’s done + +Rod: how’s everyone with the timeline? rcs ASAP + release on monday + +James: sounds reasonable, yes. will take as much time as possible on monday. several of us will be at nodeconf, so that complicates + +Rod: I’m using monday in airquotes, it’ll be tuesday for me. other thing: smoke testing, citgm, I’ve been using it, and there are a lot of weird failures, after v4 we’re going to have to switch modes to make the ecosystem happy with it + +Rod: let’s move ahead with that plan; nodeconf.eu is going to take up a lot of time for a lot of folk. congrats to everyone that contributed to new website, it seems really smooth + +### Inspecting Node.js with Chrome DevTools [#2546](https://github.com/nodejs/node/issues/2546) + +Rod: opened by member of v8 team, extracting debugger code from blink and making it so all embedded v8 projects can use it + +Trevor: gist is: devtools team is considering pulling inspector out of blink into its own project so we could consume it; domenic can correct me wherever I’m wrong here, + +Domenic: “making node work the same as android” able to point chrome dev tools at node processes to debug ‘em + +???: only works with chrome + +Trevor: OTW API we consume have remained fairly stable, even if the API does change, chrome dev tools is capable of pulling in a previous version, making sure it’s possible to use with LTS releases + +OTW wire is generic, consumable by anyone, chrome dev tools is a key consumer, but anyone can consume (new consoles can compete!) + +cons: + +APIs going to need to be tightly integrated — needs to know about all async events + add conditionals to e.g. nextTick + timers + +Domenic: add something to MakeCallback? + +Trevor: we have to add it to that + on the way back in + +Domenic: this is for async stack traces + +Trevor: we don’t have to have it + +Bert: that’s awesome, because we have to grow a single entry point (opposite MakeCallback) + +Trevor: not going touch nextTick/timers, though — need to wrap each (because those APIs don’t roundtrip to C++ for each callback) + +Bert: we don’t have to do that immediately though, but eventually it’d be a good idea + +Domenic: could also move to microtask for nexttick — integrating with domains sounds hard, then we get those events for us + +Trevor: would you be able to do unhandledRejections? + +Domenic: we already have this for promises + +Rod: if we could use this as a good justification for removing domains, that’d be awesome + +Trevor: next point is pro and con: importantly, we’d have to support websockets natively in node + +Jeremiah: we could just keep ‘em private + +Trevor: that would just anger people + +Domenic: you could bundle them and hide them while you’re not clear on the api, iterate and expose later + +Rod: that’s a good point + +Trevor: the interesting flip to this: they need to be running off the main thread, in a debugger thread — it can all be written in C++ + +mscdex: any way to avoid websockets? + +Trevor: no + +Bert: is the protocol really that complicated? I don’t think so — especially sans full HTTP and WSS — just websockets though is probably not difficult + +Trevor: necessary because it’s the protocol that chrome dev tools uses + +Rod: decision points: are we being asked to get on board? + +Trevor: them removing the inspector from blink depends on whether we’ll use it if they do it. + +Rod: debugging in node sucks, we are shipping with substandard debugging in v4, we don’t have the contributors + collaborators to make this better, so if we can lean on v8 to do this, I’m +1 + +debugging is important enough to override “small core” + +Bert: we’re not adding the full inspector, _just_ the protocol + +Trevor: wasn’t completely clear on how much API we’d need to implement + +Domenic: we should get clarification on this + +Trevor: if we can implement this in segments — if we’re all +1 on this, we need to create a new isolate, but … + +Domenic: would the workers pr solve this? + +Trevor: probably overkill. I’m +1 on the debugger + +Bert: I propose we don’t vote + +{broad assent} + +Rod: trevor + domenic: you’ve got enough input + +Domenic: only worry is finding someone to devote some of their daytime hours to implement websockets + +Rod: nodesource could contribute, related to our interests + +Trevor: even if we don’t say yes today, taking inspector out of blink is a complicated process and will take time + +Rod: anything else? + +### Next Meeting + +September 9th From b3fee8e6a6d074629c32761b4e78e30780cf0901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Fri, 4 Sep 2015 14:47:14 -0700 Subject: [PATCH 175/214] deps: upgrade to npm 2.14.2 PR-URL: https://github.com/nodejs/node/pull/2696 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Rod Vagg --- deps/npm/.npmrc | 2 - deps/npm/AUTHORS | 7 + deps/npm/CHANGELOG.md | 276 ++- deps/npm/Makefile | 88 +- deps/npm/README.md | 2 +- deps/npm/bin/npm | 21 +- deps/npm/bin/npm.cmd | 25 +- deps/npm/doc/api/npm-view.md | 2 +- deps/npm/doc/cli/npm-access.md | 23 +- deps/npm/doc/cli/npm-team.md | 55 + deps/npm/doc/files/package.json.md | 2 +- deps/npm/doc/misc/npm-developers.md | 6 +- deps/npm/doc/misc/npm-index.md | 4 + deps/npm/html/doc/README.html | 14 +- deps/npm/html/doc/api/npm-bin.html | 2 +- deps/npm/html/doc/api/npm-bugs.html | 2 +- deps/npm/html/doc/api/npm-cache.html | 4 +- deps/npm/html/doc/api/npm-commands.html | 4 +- deps/npm/html/doc/api/npm-config.html | 4 +- deps/npm/html/doc/api/npm-deprecate.html | 8 +- deps/npm/html/doc/api/npm-docs.html | 2 +- deps/npm/html/doc/api/npm-edit.html | 2 +- deps/npm/html/doc/api/npm-explore.html | 2 +- deps/npm/html/doc/api/npm-help-search.html | 2 +- deps/npm/html/doc/api/npm-init.html | 4 +- deps/npm/html/doc/api/npm-install.html | 2 +- deps/npm/html/doc/api/npm-link.html | 2 +- deps/npm/html/doc/api/npm-load.html | 2 +- deps/npm/html/doc/api/npm-ls.html | 2 +- deps/npm/html/doc/api/npm-outdated.html | 2 +- deps/npm/html/doc/api/npm-owner.html | 6 +- deps/npm/html/doc/api/npm-pack.html | 2 +- deps/npm/html/doc/api/npm-ping.html | 2 +- deps/npm/html/doc/api/npm-prefix.html | 2 +- deps/npm/html/doc/api/npm-prune.html | 2 +- deps/npm/html/doc/api/npm-publish.html | 8 +- deps/npm/html/doc/api/npm-rebuild.html | 2 +- deps/npm/html/doc/api/npm-repo.html | 2 +- deps/npm/html/doc/api/npm-restart.html | 6 +- deps/npm/html/doc/api/npm-root.html | 2 +- deps/npm/html/doc/api/npm-run-script.html | 12 +- deps/npm/html/doc/api/npm-search.html | 2 +- deps/npm/html/doc/api/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/api/npm-start.html | 2 +- deps/npm/html/doc/api/npm-stop.html | 2 +- deps/npm/html/doc/api/npm-tag.html | 2 +- deps/npm/html/doc/api/npm-test.html | 2 +- deps/npm/html/doc/api/npm-uninstall.html | 2 +- deps/npm/html/doc/api/npm-unpublish.html | 2 +- deps/npm/html/doc/api/npm-update.html | 4 +- deps/npm/html/doc/api/npm-version.html | 2 +- deps/npm/html/doc/api/npm-view.html | 4 +- deps/npm/html/doc/api/npm-whoami.html | 2 +- deps/npm/html/doc/api/npm.html | 10 +- deps/npm/html/doc/cli/npm-access.html | 29 +- deps/npm/html/doc/cli/npm-adduser.html | 22 +- deps/npm/html/doc/cli/npm-bin.html | 14 +- deps/npm/html/doc/cli/npm-bugs.html | 18 +- deps/npm/html/doc/cli/npm-build.html | 10 +- deps/npm/html/doc/cli/npm-bundle.html | 4 +- deps/npm/html/doc/cli/npm-cache.html | 16 +- deps/npm/html/doc/cli/npm-completion.html | 8 +- deps/npm/html/doc/cli/npm-config.html | 16 +- deps/npm/html/doc/cli/npm-dedupe.html | 10 +- deps/npm/html/doc/cli/npm-deprecate.html | 6 +- deps/npm/html/doc/cli/npm-dist-tag.html | 20 +- deps/npm/html/doc/cli/npm-docs.html | 16 +- deps/npm/html/doc/cli/npm-edit.html | 16 +- deps/npm/html/doc/cli/npm-explore.html | 12 +- deps/npm/html/doc/cli/npm-help-search.html | 8 +- deps/npm/html/doc/cli/npm-help.html | 22 +- deps/npm/html/doc/cli/npm-init.html | 8 +- deps/npm/html/doc/cli/npm-install.html | 44 +- deps/npm/html/doc/cli/npm-link.html | 24 +- deps/npm/html/doc/cli/npm-logout.html | 16 +- deps/npm/html/doc/cli/npm-ls.html | 22 +- deps/npm/html/doc/cli/npm-outdated.html | 8 +- deps/npm/html/doc/cli/npm-owner.html | 10 +- deps/npm/html/doc/cli/npm-pack.html | 12 +- deps/npm/html/doc/cli/npm-ping.html | 8 +- deps/npm/html/doc/cli/npm-prefix.html | 16 +- deps/npm/html/doc/cli/npm-prune.html | 8 +- deps/npm/html/doc/cli/npm-publish.html | 22 +- deps/npm/html/doc/cli/npm-rebuild.html | 6 +- deps/npm/html/doc/cli/npm-repo.html | 6 +- deps/npm/html/doc/cli/npm-restart.html | 14 +- deps/npm/html/doc/cli/npm-rm.html | 14 +- deps/npm/html/doc/cli/npm-root.html | 14 +- deps/npm/html/doc/cli/npm-run-script.html | 12 +- deps/npm/html/doc/cli/npm-search.html | 12 +- deps/npm/html/doc/cli/npm-shrinkwrap.html | 10 +- deps/npm/html/doc/cli/npm-star.html | 8 +- deps/npm/html/doc/cli/npm-stars.html | 10 +- deps/npm/html/doc/cli/npm-start.html | 12 +- deps/npm/html/doc/cli/npm-stop.html | 12 +- deps/npm/html/doc/cli/npm-tag.html | 20 +- deps/npm/html/doc/cli/npm-team.html | 70 + deps/npm/html/doc/cli/npm-test.html | 12 +- deps/npm/html/doc/cli/npm-uninstall.html | 16 +- deps/npm/html/doc/cli/npm-unpublish.html | 14 +- deps/npm/html/doc/cli/npm-update.html | 14 +- deps/npm/html/doc/cli/npm-version.html | 14 +- deps/npm/html/doc/cli/npm-view.html | 16 +- deps/npm/html/doc/cli/npm-whoami.html | 10 +- deps/npm/html/doc/cli/npm.html | 40 +- deps/npm/html/doc/files/npm-folders.html | 26 +- deps/npm/html/doc/files/npm-global.html | 30 +- deps/npm/html/doc/files/npm-json.html | 52 +- deps/npm/html/doc/files/npmrc.html | 14 +- deps/npm/html/doc/files/package.json.html | 48 +- deps/npm/html/doc/index.html | 216 +- deps/npm/html/doc/misc/npm-coding-style.html | 10 +- deps/npm/html/doc/misc/npm-config.html | 28 +- deps/npm/html/doc/misc/npm-developers.html | 34 +- deps/npm/html/doc/misc/npm-disputes.html | 12 +- deps/npm/html/doc/misc/npm-faq.html | 32 +- deps/npm/html/doc/misc/npm-index.html | 214 +- deps/npm/html/doc/misc/npm-registry.html | 20 +- deps/npm/html/doc/misc/npm-scope.html | 10 +- deps/npm/html/doc/misc/npm-scripts.html | 12 +- deps/npm/html/doc/misc/removing-npm.html | 10 +- deps/npm/html/doc/misc/semver.html | 2 +- deps/npm/html/partial/doc/README.html | 163 -- deps/npm/html/partial/doc/api/npm-bin.html | 8 - deps/npm/html/partial/doc/api/npm-bugs.html | 13 - deps/npm/html/partial/doc/api/npm-cache.html | 22 - .../html/partial/doc/api/npm-commands.html | 16 - deps/npm/html/partial/doc/api/npm-config.html | 37 - .../html/partial/doc/api/npm-deprecate.html | 27 - deps/npm/html/partial/doc/api/npm-docs.html | 13 - deps/npm/html/partial/doc/api/npm-edit.html | 16 - .../npm/html/partial/doc/api/npm-explore.html | 11 - .../html/partial/doc/api/npm-help-search.html | 24 - deps/npm/html/partial/doc/api/npm-init.html | 19 - .../npm/html/partial/doc/api/npm-install.html | 12 - deps/npm/html/partial/doc/api/npm-link.html | 22 - deps/npm/html/partial/doc/api/npm-load.html | 17 - deps/npm/html/partial/doc/api/npm-ls.html | 43 - .../html/partial/doc/api/npm-outdated.html | 8 - deps/npm/html/partial/doc/api/npm-owner.html | 27 - deps/npm/html/partial/doc/api/npm-pack.html | 13 - deps/npm/html/partial/doc/api/npm-ping.html | 8 - deps/npm/html/partial/doc/api/npm-prefix.html | 9 - deps/npm/html/partial/doc/api/npm-prune.html | 10 - .../npm/html/partial/doc/api/npm-publish.html | 26 - .../npm/html/partial/doc/api/npm-rebuild.html | 10 - deps/npm/html/partial/doc/api/npm-repo.html | 13 - .../npm/html/partial/doc/api/npm-restart.html | 32 - deps/npm/html/partial/doc/api/npm-root.html | 9 - .../html/partial/doc/api/npm-run-script.html | 21 - deps/npm/html/partial/doc/api/npm-search.html | 33 - .../html/partial/doc/api/npm-shrinkwrap.html | 13 - deps/npm/html/partial/doc/api/npm-start.html | 8 - deps/npm/html/partial/doc/api/npm-stop.html | 8 - deps/npm/html/partial/doc/api/npm-tag.html | 16 - deps/npm/html/partial/doc/api/npm-test.html | 10 - .../html/partial/doc/api/npm-uninstall.html | 10 - .../html/partial/doc/api/npm-unpublish.html | 13 - deps/npm/html/partial/doc/api/npm-update.html | 13 - .../npm/html/partial/doc/api/npm-version.html | 12 - deps/npm/html/partial/doc/api/npm-view.html | 61 - deps/npm/html/partial/doc/api/npm-whoami.html | 9 - deps/npm/html/partial/doc/api/npm.html | 89 - deps/npm/html/partial/doc/cli/npm-access.html | 55 - .../npm/html/partial/doc/cli/npm-adduser.html | 48 - deps/npm/html/partial/doc/cli/npm-bin.html | 15 - deps/npm/html/partial/doc/cli/npm-bugs.html | 34 - deps/npm/html/partial/doc/cli/npm-build.html | 20 - deps/npm/html/partial/doc/cli/npm-bundle.html | 11 - deps/npm/html/partial/doc/cli/npm-cache.html | 61 - .../html/partial/doc/cli/npm-completion.html | 22 - deps/npm/html/partial/doc/cli/npm-config.html | 46 - deps/npm/html/partial/doc/cli/npm-dedupe.html | 43 - .../html/partial/doc/cli/npm-deprecate.html | 18 - .../html/partial/doc/cli/npm-dist-tag.html | 57 - deps/npm/html/partial/doc/cli/npm-docs.html | 36 - deps/npm/html/partial/doc/cli/npm-edit.html | 29 - .../npm/html/partial/doc/cli/npm-explore.html | 29 - .../html/partial/doc/cli/npm-help-search.html | 26 - deps/npm/html/partial/doc/cli/npm-help.html | 32 - deps/npm/html/partial/doc/cli/npm-init.html | 28 - .../npm/html/partial/doc/cli/npm-install.html | 257 --- deps/npm/html/partial/doc/cli/npm-link.html | 52 - deps/npm/html/partial/doc/cli/npm-logout.html | 35 - deps/npm/html/partial/doc/cli/npm-ls.html | 77 - .../html/partial/doc/cli/npm-outdated.html | 47 - deps/npm/html/partial/doc/cli/npm-owner.html | 29 - deps/npm/html/partial/doc/cli/npm-pack.html | 21 - deps/npm/html/partial/doc/cli/npm-ping.html | 11 - deps/npm/html/partial/doc/cli/npm-prefix.html | 18 - deps/npm/html/partial/doc/cli/npm-prune.html | 21 - .../npm/html/partial/doc/cli/npm-publish.html | 46 - .../npm/html/partial/doc/cli/npm-rebuild.html | 18 - deps/npm/html/partial/doc/cli/npm-repo.html | 22 - .../npm/html/partial/doc/cli/npm-restart.html | 33 - deps/npm/html/partial/doc/cli/npm-rm.html | 19 - deps/npm/html/partial/doc/cli/npm-root.html | 15 - .../html/partial/doc/cli/npm-run-script.html | 37 - deps/npm/html/partial/doc/cli/npm-search.html | 29 - .../html/partial/doc/cli/npm-shrinkwrap.html | 144 -- deps/npm/html/partial/doc/cli/npm-star.html | 16 - deps/npm/html/partial/doc/cli/npm-stars.html | 17 - deps/npm/html/partial/doc/cli/npm-start.html | 14 - deps/npm/html/partial/doc/cli/npm-stop.html | 14 - deps/npm/html/partial/doc/cli/npm-tag.html | 42 - deps/npm/html/partial/doc/cli/npm-test.html | 17 - .../html/partial/doc/cli/npm-uninstall.html | 37 - .../html/partial/doc/cli/npm-unpublish.html | 27 - deps/npm/html/partial/doc/cli/npm-update.html | 99 - .../npm/html/partial/doc/cli/npm-version.html | 75 - deps/npm/html/partial/doc/cli/npm-view.html | 62 - deps/npm/html/partial/doc/cli/npm-whoami.html | 13 - deps/npm/html/partial/doc/cli/npm.html | 134 -- .../html/partial/doc/files/npm-folders.html | 164 -- .../html/partial/doc/files/npm-global.html | 164 -- deps/npm/html/partial/doc/files/npm-json.html | 545 ----- deps/npm/html/partial/doc/files/npmrc.html | 63 - .../html/partial/doc/files/package.json.html | 545 ----- deps/npm/html/partial/doc/index.html | 220 -- .../partial/doc/misc/npm-coding-style.html | 127 -- .../npm/html/partial/doc/misc/npm-config.html | 779 ------- .../html/partial/doc/misc/npm-developers.html | 169 -- .../html/partial/doc/misc/npm-disputes.html | 92 - deps/npm/html/partial/doc/misc/npm-faq.html | 288 --- deps/npm/html/partial/doc/misc/npm-index.html | 220 -- .../html/partial/doc/misc/npm-registry.html | 50 - deps/npm/html/partial/doc/misc/npm-scope.html | 71 - .../html/partial/doc/misc/npm-scripts.html | 187 -- .../html/partial/doc/misc/removing-npm.html | 37 - deps/npm/html/partial/doc/misc/semver.html | 262 --- deps/npm/lib/access.js | 179 +- deps/npm/lib/build.js | 6 +- deps/npm/lib/link.js | 7 +- deps/npm/lib/npm.js | 1 + deps/npm/lib/run-script.js | 2 +- deps/npm/lib/team.js | 54 + deps/npm/lib/utils/completion.sh | 16 +- deps/npm/lib/utils/error-handler.js | 8 + deps/npm/lib/utils/lifecycle.js | 14 +- deps/npm/lib/version.js | 2 +- deps/npm/lib/whoami.js | 2 +- deps/npm/man/man1/npm-README.1 | 4 +- deps/npm/man/man1/npm-access.1 | 25 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-build.1 | 2 +- deps/npm/man/man1/npm-bundle.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-rm.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-tag.1 | 2 +- deps/npm/man/man1/npm-team.1 | 63 + deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man3/npm-bin.3 | 2 +- deps/npm/man/man3/npm-bugs.3 | 2 +- deps/npm/man/man3/npm-cache.3 | 2 +- deps/npm/man/man3/npm-commands.3 | 2 +- deps/npm/man/man3/npm-config.3 | 2 +- deps/npm/man/man3/npm-deprecate.3 | 2 +- deps/npm/man/man3/npm-docs.3 | 2 +- deps/npm/man/man3/npm-edit.3 | 2 +- deps/npm/man/man3/npm-explore.3 | 2 +- deps/npm/man/man3/npm-help-search.3 | 2 +- deps/npm/man/man3/npm-init.3 | 2 +- deps/npm/man/man3/npm-install.3 | 2 +- deps/npm/man/man3/npm-link.3 | 2 +- deps/npm/man/man3/npm-load.3 | 2 +- deps/npm/man/man3/npm-ls.3 | 2 +- deps/npm/man/man3/npm-outdated.3 | 2 +- deps/npm/man/man3/npm-owner.3 | 2 +- deps/npm/man/man3/npm-pack.3 | 2 +- deps/npm/man/man3/npm-ping.3 | 2 +- deps/npm/man/man3/npm-prefix.3 | 2 +- deps/npm/man/man3/npm-prune.3 | 2 +- deps/npm/man/man3/npm-publish.3 | 2 +- deps/npm/man/man3/npm-rebuild.3 | 2 +- deps/npm/man/man3/npm-repo.3 | 2 +- deps/npm/man/man3/npm-restart.3 | 2 +- deps/npm/man/man3/npm-root.3 | 2 +- deps/npm/man/man3/npm-run-script.3 | 2 +- deps/npm/man/man3/npm-search.3 | 2 +- deps/npm/man/man3/npm-shrinkwrap.3 | 2 +- deps/npm/man/man3/npm-start.3 | 2 +- deps/npm/man/man3/npm-stop.3 | 2 +- deps/npm/man/man3/npm-tag.3 | 2 +- deps/npm/man/man3/npm-test.3 | 2 +- deps/npm/man/man3/npm-uninstall.3 | 2 +- deps/npm/man/man3/npm-unpublish.3 | 2 +- deps/npm/man/man3/npm-update.3 | 4 +- deps/npm/man/man3/npm-version.3 | 2 +- deps/npm/man/man3/npm-view.3 | 4 +- deps/npm/man/man3/npm-whoami.3 | 2 +- deps/npm/man/man3/npm.3 | 4 +- deps/npm/man/man5/npm-folders.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 4 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package.json.5 | 4 +- deps/npm/man/man7/npm-coding-style.7 | 2 +- deps/npm/man/man7/npm-config.7 | 2 +- deps/npm/man/man7/npm-developers.7 | 12 +- deps/npm/man/man7/npm-disputes.7 | 2 +- deps/npm/man/man7/npm-faq.7 | 2 +- deps/npm/man/man7/npm-index.7 | 5 +- deps/npm/man/man7/npm-registry.7 | 2 +- deps/npm/man/man7/npm-scope.7 | 2 +- deps/npm/man/man7/npm-scripts.7 | 2 +- deps/npm/man/man7/removing-npm.7 | 2 +- deps/npm/man/man7/semver.7 | 2 +- deps/npm/node_modules/chmodr/chmodr.js | 15 +- deps/npm/node_modules/chmodr/package.json | 27 +- deps/npm/node_modules/chmodr/test/basic.js | 63 - deps/npm/node_modules/chmodr/test/sync.js | 58 - deps/npm/node_modules/chownr/LICENCE | 25 - deps/npm/node_modules/chownr/chownr.js | 15 +- deps/npm/node_modules/chownr/package.json | 28 +- deps/npm/node_modules/chownr/test/basic.js | 84 - deps/npm/node_modules/chownr/test/sync.js | 79 - deps/npm/node_modules/columnify/columnify.js | 26 +- .../columnify/node_modules/strip-ansi/cli.js | 47 - .../columnify/node_modules/strip-ansi/license | 21 + .../node_modules/ansi-regex/index.js | 2 +- .../node_modules/ansi-regex/package.json | 39 +- .../node_modules/ansi-regex/readme.md | 4 +- .../node_modules/strip-ansi/package.json | 52 +- .../node_modules/strip-ansi/readme.md | 22 +- .../defaults/node_modules/clone/package.json | 3 +- .../node_modules/defaults/package.json | 3 +- .../node_modules/wcwidth/package.json | 3 +- deps/npm/node_modules/columnify/package.json | 33 +- deps/npm/node_modules/fstream-npm/.travis.yml | 13 + .../node_modules/fstream-npm/fstream-npm.js | 11 +- .../npm/node_modules/fstream-npm/package.json | 18 +- .../node_modules/fstream-npm/test/ignores.js | 95 + .../init-package-json/default-input.js | 3 + .../init-package-json/init-package-json.js | 4 +- .../init-package-json/package.json | 44 +- .../init-package-json/test/silent.js | 23 + deps/npm/node_modules/node-gyp/addon.gypi | 5 +- deps/npm/node_modules/node-gyp/lib/build.js | 8 +- .../node_modules/node-gyp/lib/configure.js | 6 +- deps/npm/node_modules/node-gyp/lib/install.js | 69 +- .../normalize-package-data/package.json | 12 +- .../npm-registry-client/lib/access.js | 173 +- .../npm-registry-client/lib/request.js | 31 +- .../npm-registry-client/lib/team.js | 105 + .../node_modules/chownr/LICENSE | 15 + .../node_modules/chownr/README.md | 3 + .../node_modules/chownr/chownr.js | 52 + .../node_modules/chownr/package.json | 54 + .../node_modules/core-util-is/package.json | 22 +- .../node_modules/isarray/package.json | 27 +- .../node_modules/string_decoder/package.json | 26 +- .../npm-registry-client/package.json | 44 +- .../npm-registry-client/test/access.js | 341 +++- .../npm-registry-client/test/fetch-404.js | 27 +- .../@npm/npm-registry-client/cache.json | 1 + .../test/fixtures/underscore/1.3.3/cache.json | 1 + .../fixtures/underscore/1.3.3/package.tgz | Bin 0 -> 58692 bytes .../test/fixtures/underscore/cache.json | 1 + .../npm-registry-client/test/request.js | 17 +- .../npm-registry-client/test/team.js | 210 ++ deps/npm/node_modules/npmlog/.npmrc | 2 - deps/npm/node_modules/read/.npmignore | 2 - deps/npm/node_modules/read/LICENCE | 25 - deps/npm/node_modules/read/example/example.js | 13 - deps/npm/node_modules/read/package.json | 25 +- deps/npm/node_modules/read/rs.js | 4 - deps/npm/node_modules/read/test/basic.js | 60 - deps/npm/node_modules/read/test/defaults.js | 60 - deps/npm/node_modules/read/test/many.js | 83 - deps/npm/node_modules/request/CHANGELOG.md | 10 + deps/npm/node_modules/request/README.md | 46 +- deps/npm/node_modules/request/index.js | 2 + .../node_modules/aws-sign2/package.json | 20 +- .../node_modules/core-util-is/package.json | 22 +- .../node_modules/isarray/package.json | 27 +- .../node_modules/string_decoder/package.json | 26 +- .../node_modules/forever-agent/package.json | 33 +- .../request/node_modules/form-data/Readme.md | 53 +- .../node_modules/form-data/lib/form_data.js | 75 +- .../form-data/node_modules/async/.jscsrc | 3 - .../form-data/node_modules/async/CHANGELOG.md | 23 + .../form-data/node_modules/async/README.md | 1789 ----------------- .../form-data/node_modules/async/lib/async.js | 20 +- .../form-data/node_modules/async/package.json | 36 +- .../async/support/sync-package-managers.js | 53 - .../node_modules/form-data/package.json | 49 +- .../har-validator/node_modules/chalk/index.js | 4 +- .../escape-string-regexp/package.json | 29 +- .../node_modules/chalk/package.json | 35 +- .../node_modules/chalk/readme.md | 5 +- .../graceful-readlink/package.json | 23 +- .../node_modules/is-my-json-valid/index.js | 4 + .../generate-function/package.json | 22 +- .../node_modules/is-property/package.json | 23 +- .../node_modules/jsonpointer/package.json | 23 +- .../node_modules/xtend/package.json | 22 +- .../is-my-json-valid/package.json | 22 +- .../json-schema-draft4/nullAndObject.json | 18 + .../hawk/node_modules/cryptiles/package.json | 24 +- .../hawk/node_modules/sntp/package.json | 24 +- .../node_modules/asn1/package.json | 32 +- .../node_modules/assert-plus/package.json | 23 +- .../node_modules/ctype/package.json | 27 +- .../node_modules/isstream/package.json | 23 +- .../node_modules/mime-types/HISTORY.md | 12 + .../request/node_modules/mime-types/index.js | 2 +- .../node_modules/mime-db/HISTORY.md | 13 + .../mime-types/node_modules/mime-db/db.json | 12 + .../node_modules/mime-db/package.json | 20 +- .../node_modules/mime-types/package.json | 21 +- .../node_modules/stringstream/package.json | 26 +- deps/npm/node_modules/request/package.json | 16 +- deps/npm/node_modules/request/request.js | 42 +- deps/npm/node_modules/rimraf/package.json | 19 +- deps/npm/node_modules/rimraf/rimraf.js | 2 +- deps/npm/node_modules/tar/lib/entry.js | 7 + deps/npm/node_modules/tar/lib/parse.js | 6 +- deps/npm/node_modules/tar/package.json | 38 +- .../node_modules/tar/test/parse-discard.js | 29 + .../validate-npm-package-license/README.md | 126 +- .../validate-npm-package-license/index.js | 34 +- .../node_modules/spdx-correct/LICENSE | 174 -- .../node_modules/spdx-correct/README.md | 23 +- .../{spdx-correct.js => index.js} | 6 +- .../node_modules/spdx-license-ids/LICENSE | 24 + .../node_modules/spdx-license-ids/README.md | 55 + .../spdx-license-ids/package.json | 77 + .../spdx-license-ids/spdx-license-ids.json | 303 +++ .../node_modules/spdx-correct/package.json | 50 +- .../spdx-expression-parse/LICENSE | 24 + .../spdx-expression-parse/README.md | 34 + .../spdx-expression-parse/index.js | 4 + .../node_modules/spdx-exceptions/.npmignore | 2 + .../node_modules/spdx-exceptions/LICENSE.md | 9 + .../node_modules/spdx-exceptions/README.md | 13 + .../node_modules/spdx-exceptions/index.json | 24 + .../node_modules/spdx-exceptions/package.json | 52 + .../node_modules/spdx-license-ids/LICENSE | 24 + .../node_modules/spdx-license-ids/README.md | 55 + .../spdx-license-ids/package.json | 77 + .../spdx-license-ids/spdx-license-ids.json | 303 +++ .../spdx-expression-parse/package.json | 65 + .../spdx-expression-parse/parser.generated.js | 1289 ++++++++++++ .../validate-npm-package-license/package.json | 46 +- deps/npm/package.json | 40 +- deps/npm/scripts/doc-build.sh | 11 +- deps/npm/test/fixtures/config/.npmrc | 1 - .../0.0.0/package.tgz | Bin 180 -> 0 bytes .../0.0.0/package/package.json | 1 - .../registry.npmjs.org/jshint/.cache.json | 1 - deps/npm/test/tap/access.js | 418 +++- deps/npm/test/tap/install-link-scripts.js | 131 ++ .../test/tap/install-preferglobal-warnings.js | 131 ++ .../npm/test/tap/run-script-filter-private.js | 52 + deps/npm/test/tap/run-script.js | 29 +- deps/npm/test/tap/tag-version-prefix.js | 101 +- deps/npm/test/tap/team.js | 136 ++ 499 files changed, 7149 insertions(+), 11998 deletions(-) delete mode 100644 deps/npm/.npmrc create mode 100644 deps/npm/doc/cli/npm-team.md create mode 100644 deps/npm/html/doc/cli/npm-team.html delete mode 100644 deps/npm/html/partial/doc/README.html delete mode 100644 deps/npm/html/partial/doc/api/npm-bin.html delete mode 100644 deps/npm/html/partial/doc/api/npm-bugs.html delete mode 100644 deps/npm/html/partial/doc/api/npm-cache.html delete mode 100644 deps/npm/html/partial/doc/api/npm-commands.html delete mode 100644 deps/npm/html/partial/doc/api/npm-config.html delete mode 100644 deps/npm/html/partial/doc/api/npm-deprecate.html delete mode 100644 deps/npm/html/partial/doc/api/npm-docs.html delete mode 100644 deps/npm/html/partial/doc/api/npm-edit.html delete mode 100644 deps/npm/html/partial/doc/api/npm-explore.html delete mode 100644 deps/npm/html/partial/doc/api/npm-help-search.html delete mode 100644 deps/npm/html/partial/doc/api/npm-init.html delete mode 100644 deps/npm/html/partial/doc/api/npm-install.html delete mode 100644 deps/npm/html/partial/doc/api/npm-link.html delete mode 100644 deps/npm/html/partial/doc/api/npm-load.html delete mode 100644 deps/npm/html/partial/doc/api/npm-ls.html delete mode 100644 deps/npm/html/partial/doc/api/npm-outdated.html delete mode 100644 deps/npm/html/partial/doc/api/npm-owner.html delete mode 100644 deps/npm/html/partial/doc/api/npm-pack.html delete mode 100644 deps/npm/html/partial/doc/api/npm-ping.html delete mode 100644 deps/npm/html/partial/doc/api/npm-prefix.html delete mode 100644 deps/npm/html/partial/doc/api/npm-prune.html delete mode 100644 deps/npm/html/partial/doc/api/npm-publish.html delete mode 100644 deps/npm/html/partial/doc/api/npm-rebuild.html delete mode 100644 deps/npm/html/partial/doc/api/npm-repo.html delete mode 100644 deps/npm/html/partial/doc/api/npm-restart.html delete mode 100644 deps/npm/html/partial/doc/api/npm-root.html delete mode 100644 deps/npm/html/partial/doc/api/npm-run-script.html delete mode 100644 deps/npm/html/partial/doc/api/npm-search.html delete mode 100644 deps/npm/html/partial/doc/api/npm-shrinkwrap.html delete mode 100644 deps/npm/html/partial/doc/api/npm-start.html delete mode 100644 deps/npm/html/partial/doc/api/npm-stop.html delete mode 100644 deps/npm/html/partial/doc/api/npm-tag.html delete mode 100644 deps/npm/html/partial/doc/api/npm-test.html delete mode 100644 deps/npm/html/partial/doc/api/npm-uninstall.html delete mode 100644 deps/npm/html/partial/doc/api/npm-unpublish.html delete mode 100644 deps/npm/html/partial/doc/api/npm-update.html delete mode 100644 deps/npm/html/partial/doc/api/npm-version.html delete mode 100644 deps/npm/html/partial/doc/api/npm-view.html delete mode 100644 deps/npm/html/partial/doc/api/npm-whoami.html delete mode 100644 deps/npm/html/partial/doc/api/npm.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-access.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-adduser.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-bin.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-bugs.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-build.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-bundle.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-cache.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-completion.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-config.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-dedupe.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-deprecate.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-dist-tag.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-docs.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-edit.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-explore.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-help-search.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-help.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-init.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-install.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-link.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-logout.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-ls.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-outdated.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-owner.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-pack.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-ping.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-prefix.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-prune.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-publish.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-rebuild.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-repo.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-restart.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-rm.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-root.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-run-script.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-search.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-shrinkwrap.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-star.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-stars.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-start.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-stop.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-tag.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-test.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-uninstall.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-unpublish.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-update.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-version.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-view.html delete mode 100644 deps/npm/html/partial/doc/cli/npm-whoami.html delete mode 100644 deps/npm/html/partial/doc/cli/npm.html delete mode 100644 deps/npm/html/partial/doc/files/npm-folders.html delete mode 100644 deps/npm/html/partial/doc/files/npm-global.html delete mode 100644 deps/npm/html/partial/doc/files/npm-json.html delete mode 100644 deps/npm/html/partial/doc/files/npmrc.html delete mode 100644 deps/npm/html/partial/doc/files/package.json.html delete mode 100644 deps/npm/html/partial/doc/index.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-coding-style.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-config.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-developers.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-disputes.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-faq.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-index.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-registry.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-scope.html delete mode 100644 deps/npm/html/partial/doc/misc/npm-scripts.html delete mode 100644 deps/npm/html/partial/doc/misc/removing-npm.html delete mode 100644 deps/npm/html/partial/doc/misc/semver.html create mode 100644 deps/npm/lib/team.js create mode 100644 deps/npm/man/man1/npm-team.1 delete mode 100644 deps/npm/node_modules/chmodr/test/basic.js delete mode 100644 deps/npm/node_modules/chmodr/test/sync.js delete mode 100644 deps/npm/node_modules/chownr/LICENCE delete mode 100644 deps/npm/node_modules/chownr/test/basic.js delete mode 100644 deps/npm/node_modules/chownr/test/sync.js delete mode 100755 deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js create mode 100644 deps/npm/node_modules/columnify/node_modules/strip-ansi/license create mode 100644 deps/npm/node_modules/fstream-npm/.travis.yml create mode 100644 deps/npm/node_modules/fstream-npm/test/ignores.js create mode 100644 deps/npm/node_modules/init-package-json/test/silent.js create mode 100644 deps/npm/node_modules/npm-registry-client/lib/team.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/chownr/LICENSE create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/chownr/README.md create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/chownr/chownr.js create mode 100644 deps/npm/node_modules/npm-registry-client/node_modules/chownr/package.json create mode 100644 deps/npm/node_modules/npm-registry-client/test/fixtures/@npm/npm-registry-client/cache.json create mode 100644 deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json create mode 100644 deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/package.tgz create mode 100644 deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json create mode 100644 deps/npm/node_modules/npm-registry-client/test/team.js delete mode 100644 deps/npm/node_modules/npmlog/.npmrc delete mode 100644 deps/npm/node_modules/read/.npmignore delete mode 100644 deps/npm/node_modules/read/LICENCE delete mode 100644 deps/npm/node_modules/read/example/example.js delete mode 100644 deps/npm/node_modules/read/rs.js delete mode 100644 deps/npm/node_modules/read/test/basic.js delete mode 100644 deps/npm/node_modules/read/test/defaults.js delete mode 100644 deps/npm/node_modules/read/test/many.js delete mode 100644 deps/npm/node_modules/request/node_modules/form-data/node_modules/async/.jscsrc delete mode 100644 deps/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md delete mode 100755 deps/npm/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndObject.json create mode 100644 deps/npm/node_modules/tar/test/parse-discard.js delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/LICENSE rename deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/{spdx-correct.js => index.js} (98%) create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/node_modules/spdx-license-ids/LICENSE create mode 100755 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/node_modules/spdx-license-ids/README.md create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/node_modules/spdx-license-ids/package.json create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct/node_modules/spdx-license-ids/spdx-license-ids.json create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/README.md create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/.npmignore create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/LICENSE.md create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/README.md create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/index.json create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions/package.json create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-license-ids/LICENSE create mode 100755 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-license-ids/README.md create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-license-ids/package.json create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-license-ids/spdx-license-ids.json create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json create mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.generated.js delete mode 100644 deps/npm/test/fixtures/config/.npmrc delete mode 100644 deps/npm/test/npm_cache/npm-test-preferglobal-dep/0.0.0/package.tgz delete mode 100644 deps/npm/test/npm_cache/npm-test-preferglobal-dep/0.0.0/package/package.json delete mode 100644 deps/npm/test/npm_cache/registry.npmjs.org/jshint/.cache.json create mode 100644 deps/npm/test/tap/install-link-scripts.js create mode 100644 deps/npm/test/tap/install-preferglobal-warnings.js create mode 100644 deps/npm/test/tap/run-script-filter-private.js create mode 100644 deps/npm/test/tap/team.js diff --git a/deps/npm/.npmrc b/deps/npm/.npmrc deleted file mode 100644 index ca0bc48dd55..00000000000 --- a/deps/npm/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -save-prefix = ~ -proprietary-attribs = false diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 9f48c3b5fbd..1c7dcb845cc 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -301,3 +301,10 @@ Thaddee Tyl Steve Klabnik Andrew Murray Stephan Bönnemann +Kyle M. Tarplee +Derek Peterson +Greg Whiteley +murgatroid99 +Marcin Cieslak +João Reis +Matthew Hasbach diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 3db382ca343..bd87c24e3f8 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,277 @@ +### v2.14.2 (2015-08-27): + +#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT + +So apparently the `preferGlobal` option hasn't quite been warning correctly for +some time. But now it should be all better! tl;dr: if you try and install a +dependency with `preferGlobal: true`, and it's _not already_ in your +`package.json`, you'll get a warning that the author would really rather you +install it with `--global`. :) + +* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) + [#8841](https://github.com/npm/npm/issues/8841) + [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` + warning shouldn't happen if the dependency being installed is listed in + `devDependencies`. ([@saper](https://github.com/saper)) +* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) + [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a + warning when there are no dependencies for the current package. + ([@zkat](https://github.com/zkat)) +* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) + [#9409](https://github.com/npm/npm/issues/9409) Verify that + `preferGlobal` is warning as expected (when a `preferGlobal` dependency is + installed, but isn't listed in either `dependencies` or `devDependencies`). + ([@zkat](https://github.com/zkat)) + +#### BUMP +1 + +* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) + `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, + useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) +* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) + `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. + ([@othiym23](https://github.com/othiym23)) +* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) + `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the + generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. + ([@zkat](https://github.com/zkat)) +* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) + `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) +* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) + `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws + this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) +* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) + `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) + +#### OTHER STUFF THAT'S RELEVANT + +* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) + [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in + documentation. + ([@mjhasbach](https://github.com/mjhasbach)) +* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) + [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error + message returned by npm's error-handling code to give users a better hint of + what's most likely going on. Usually, error reports with this error code are + about people trying to install things without a `package.json`. + ([@KenanY](https://github.com/KenanY)) +* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) + [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run + only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. + ([@iarna](https://github.com/iarna)) + +### v2.14.1 (2015-08-20): + +#### SECURITY FIX + +There are patches for two information leaks of moderate severity in `npm@2.14.1`: + +1. In some cases, npm was leaking sensitive credential information into the + child environment when running package and lifecycle scripts. This could + lead to packages being published with files (most notably `config.gypi`, a + file created by `node-gyp` that is a cache of environmental information + regenerated on every run) containing the bearer tokens used to authenticate + users to the registry. Users with affected packages have been notified (and + the affected tokens invalidated), and now npm has been modified to not + upload files that could contain this information, as well as scrubbing the + sensitive information out of the environment passed to child scripts. +2. Per-package `.npmrc` files are used by some maintainers as a way to scope + those packages to a specific registry and its credentials. This is a + reasonable use case, but by default `.npmrc` was packed into packages, + leaking those credentials. npm will no longer include `.npmrc` when packing + tarballs. + +If you maintain packages and believe you may be affected by either +of the above scenarios (especially if you've received a security +notification from npm recently), please upgrade to `npm@2.14.1` as +soon as possible. If you believe you may have inadvertently leaked +your credentials, upgrade to `npm@2.14.1` on the affected machine, +and run `npm logout` and then `npm login`. Your access tokens will be +invalidated, which will eliminate any risk posed by tokens inadvertently +included in published packages. We apologize for the inconvenience this +causes, as well as the oversight that led to the existence of this issue +in the first place. + +Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these +issues to our attention, and for helping us identify affected packages +and maintainers. Thanks also to the Node.js security working group for +their coördination with the team in our response to this issue. We +appreciate everybody's patience and understanding tremendously. + +* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) + `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project + `.npmrc` files to keep local configuration out of published packages. + ([@othiym23](https://github.com/othiym23)) +* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) + [#9348](https://github.com/npm/npm/issues/9348) Filter "private" + (underscore-prefixed, even when scoped to a registry) configuration values + out of child environments. ([@othiym23](https://github.com/othiym23)) + +#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME + +* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) + [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy + used by the npm shims for Windows to prioritize your own local npm installs. + npm has really needed this tweak for a long time, so hammer on it and let us + know if you run into issues, but with luck it will Just Work. + ([@joaocgreis](https://github.com/joaocgreis)) +* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) + [#8751](https://github.com/npm/npm/issues/8751) + [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun + scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from + interfering with npm package and lifecycle script execution on Windows by + adding `/d` and `/s` when invoking `cmd.exe`. + ([@saper](https://github.com/saper)) + +#### IT SEEMED LIKE AN IDEA AT THE TIME + +* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) + [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building + HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we + weren't actually using them. Stop building them, which makes running the full + test suite and installation process around a third faster. + ([@isaacs](https://github.com/isaacs)) + +#### A SINGLE LONELY DEPENDENCY UPGRADE + +* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) + `request@2.61.0`: Bug fixes and keep-alive tweaks. + ([@simov](https://github.com/simov)) + +### v2.14.0 (2015-08-13): + +#### IT'S HERE! KINDA! + +This release adds support for teens and orcs (err, teams and organizations) to +the npm CLI! Note that the web site and registry-side features of this are +still not ready for public consumption. + +A beta should be starting in the next couple of weeks, and the features +themselves will become public once all that's done. Keep an eye out for more +news! + +All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): + +* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) + Added new `npm team` command and subcommands. + ([@zkat](https://github.com/zkat)) +* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) + Added documentation for new `npm team` command. + ([@zkat](https://github.com/zkat)) +* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) + Updated `npm access` to support teams and organizations. + ([@zkat](https://github.com/zkat)) +* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) + Gussied up docs for `npm access` with new commands. + ([@zkat](https://github.com/zkat)) +* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) + Fix up `npm whoami` to make the underlying API usable elsewhere. + ([@zkat](https://github.com/zkat)) +* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) + `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support + `team` and `access` calls against the registry. + ([@zkat](https://github.com/zkat)) + +#### A FEW EXTRA VERSION BUMPS + +* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) + `init-package-json@1.8.0`: Checks for some `npm@3` metadata. + ([@iarna](https://github.com/iarna)) +* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) + `columnify@1.5.2`: Updated some dependencies. + ([@timoxley](https://github.com/timoxley)) +* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) + `chownr@1.0.1`: Tests, docs, and minor style nits. + ([@isaacs](https://github.com/isaacs)) + +#### ALSO A DOC FIX + +* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) + [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes + around semver range, thus making it valid semver. + ([@KenanY](https://github.com/KenanY)) + +### v2.13.5 (2015-08-07): + +This is another quiet week for the `npm@2` release. +[@zkat](https://github.com/zkat) has been working hard on polishing the CLI +bits of the registry's new feature to support direct management of teams and +organizations, and [@iarna](https://github.com/iarna) continues to work through +the list of issues blocking the general release of `npm@3`, which is looking +more and more solid all the time. + +[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) +have also been at this week's Node.js / io.js [collaborator +summit](https://github.com/nodejs/summit/tree/master), both as facilitators and +participants. This is a valuable opportunity to get some face time with other +contributors and to work through a bunch of important discussions, but it does +leave us feeling kind of sleepy. Running meetings is hard! + +What does that leave for this release? A few of the more tricky bug fixes that +have been sitting around for a little while now, and a couple dependency +upgrades. Nothing too fancy, but most of these were contributed by developers +like _you_, which we think is swell. Thanks! + +#### BUG FIXES + +* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) + [#4530](https://github.com/npm/npm/issues/4530) The bash completion script + for npm no longer alters global completion behavior around word breaks. + ([@whitty](https://github.com/whitty)) +* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) + [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies + to be shared via `npm link `, only run the lifecycle scripts during + the original link, not when running `npm link ` or `npm install + --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) +* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) + [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion + around wording in `bundledDependencies` section of `package.json` docs. + ([@derekpeterson](https://github.com/derekpeterson)) +* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) + [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for + `preversion`, `version`, and `postversion` in the section for lifecycle + scripts rather than the generic `npm run-script` output. + ([@othiym23](https://github.com/othiym23)) + +#### NOPE, NOT DONE WITH DEPENDENCY UPDATES + +* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) + `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just + like the Unix command. ([@isaacs](https://github.com/isaacs)) +* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) + +### v2.13.4 (2015-07-30): + +#### JULY ENDS ON A FAIRLY QUIET NOTE + +Hey everyone! I hope you've had a great week. We're having a fairly small +release this week while we wrap up Teams and Orgs (or, as we've taken to calling +it internally, _Teens and Orcs_). + +In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator +Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at +[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some +of you there. :) + +#### THE PATCH!!! + +So here it is. The patch. Hope it helps. (Thanks, +[@ktarplee](https://github.com/ktarplee)!) + +* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) + [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git + submodules + ([@ktarplee](https://github.com/ktarplee)) + +#### OH AND THERE'S A DEV DEPENDENCIES UPDATE + +Hooray. + +* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) + nock@2.9.1 + ([@pgte](https://github.com/pgte)) + ### v2.13.3 (2015-07-23): #### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES @@ -29,12 +303,10 @@ There's a couple of doc updates! The last one might be interesting. settings. ([@SimenB](https://github.com/SimenB)) * [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) - [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field in `"publishConfig"`. Did you know you don't need to use `--access=public` when publishing scoped packages?! Just put it in your `package.json`! Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. - ([@boennemann](https://github.com/boennemann)) * [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog diff --git a/deps/npm/Makefile b/deps/npm/Makefile index d935edfefe6..34e40624b5a 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -31,28 +31,6 @@ misc_mandocs = $(shell find doc/misc -name '*.md' \ |sed 's|doc/misc/|man/man7/|g' ) \ man/man7/npm-index.7 - -cli_partdocs = $(shell find doc/cli -name '*.md' \ - |sed 's|.md|.html|g' \ - |sed 's|doc/cli/|html/partial/doc/cli/|g' ) \ - html/partial/doc/README.html - -api_partdocs = $(shell find doc/api -name '*.md' \ - |sed 's|.md|.html|g' \ - |sed 's|doc/api/|html/partial/doc/api/|g' ) - -files_partdocs = $(shell find doc/files -name '*.md' \ - |sed 's|.md|.html|g' \ - |sed 's|doc/files/|html/partial/doc/files/|g' ) \ - html/partial/doc/files/npm-json.html \ - html/partial/doc/files/npm-global.html - -misc_partdocs = $(shell find doc/misc -name '*.md' \ - |sed 's|.md|.html|g' \ - |sed 's|doc/misc/|html/partial/doc/misc/|g' ) \ - html/partial/doc/index.html - - cli_htmldocs = $(shell find doc/cli -name '*.md' \ |sed 's|.md|.html|g' \ |sed 's|doc/cli/|html/doc/cli/|g' ) \ @@ -75,8 +53,6 @@ misc_htmldocs = $(shell find doc/misc -name '*.md' \ mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs) -partdocs = $(api_partdocs) $(cli_partdocs) $(files_partdocs) $(misc_partdocs) - htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs) all: doc @@ -103,7 +79,7 @@ clean: markedclean marked-manclean doc-clean uninstall uninstall: node cli.js rm npm -g -f -doc: $(mandocs) $(htmldocs) $(partdocs) +doc: $(mandocs) $(htmldocs) markedclean: rm -rf node_modules/marked node_modules/.bin/marked .building_marked @@ -143,73 +119,43 @@ man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json @[ -d man/man5 ] || mkdir -p man/man5 scripts/doc-build.sh $< $@ +doc/misc/npm-index.md: scripts/index-build.js package.json + node scripts/index-build.js > $@ + +html/doc/index.html: doc/misc/npm-index.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json @[ -d man/man7 ] || mkdir -p man/man7 scripts/doc-build.sh $< $@ - -doc/misc/npm-index.md: scripts/index-build.js package.json - node scripts/index-build.js > $@ - - -# html/doc depends on html/partial/doc -html/doc/%.html: html/partial/doc/%.html +html/doc/README.html: README.md $(html_docdeps) @[ -d html/doc ] || mkdir -p html/doc scripts/doc-build.sh $< $@ -html/doc/README.html: html/partial/doc/README.html - @[ -d html/doc ] || mkdir -p html/doc - scripts/doc-build.sh $< $@ - -html/doc/cli/%.html: html/partial/doc/cli/%.html +html/doc/cli/%.html: doc/cli/%.md $(html_docdeps) @[ -d html/doc/cli ] || mkdir -p html/doc/cli scripts/doc-build.sh $< $@ -html/doc/misc/%.html: html/partial/doc/misc/%.html - @[ -d html/doc/misc ] || mkdir -p html/doc/misc - scripts/doc-build.sh $< $@ - -html/doc/files/%.html: html/partial/doc/files/%.html - @[ -d html/doc/files ] || mkdir -p html/doc/files - scripts/doc-build.sh $< $@ - -html/doc/api/%.html: html/partial/doc/api/%.html +html/doc/api/%.html: doc/api/%.md $(html_docdeps) @[ -d html/doc/api ] || mkdir -p html/doc/api scripts/doc-build.sh $< $@ - -html/partial/doc/index.html: doc/misc/npm-index.md $(html_docdeps) - @[ -d html/partial/doc ] || mkdir -p html/partial/doc - scripts/doc-build.sh $< $@ - -html/partial/doc/README.html: README.md $(html_docdeps) - @[ -d html/partial/doc ] || mkdir -p html/partial/doc - scripts/doc-build.sh $< $@ - -html/partial/doc/cli/%.html: doc/cli/%.md $(html_docdeps) - @[ -d html/partial/doc/cli ] || mkdir -p html/partial/doc/cli - scripts/doc-build.sh $< $@ - -html/partial/doc/api/%.html: doc/api/%.md $(html_docdeps) - @[ -d html/partial/doc/api ] || mkdir -p html/partial/doc/api - scripts/doc-build.sh $< $@ - -html/partial/doc/files/npm-json.html: html/partial/doc/files/package.json.html +html/doc/files/npm-json.html: html/doc/files/package.json.html cp $< $@ -html/partial/doc/files/npm-global.html: html/partial/doc/files/npm-folders.html +html/doc/files/npm-global.html: html/doc/files/npm-folders.html cp $< $@ -html/partial/doc/files/%.html: doc/files/%.md $(html_docdeps) - @[ -d html/partial/doc/files ] || mkdir -p html/partial/doc/files +html/doc/files/%.html: doc/files/%.md $(html_docdeps) + @[ -d html/doc/files ] || mkdir -p html/doc/files scripts/doc-build.sh $< $@ -html/partial/doc/misc/%.html: doc/misc/%.md $(html_docdeps) - @[ -d html/partial/doc/misc ] || mkdir -p html/partial/doc/misc +html/doc/misc/%.html: doc/misc/%.md $(html_docdeps) + @[ -d html/doc/misc ] || mkdir -p html/doc/misc scripts/doc-build.sh $< $@ - - marked: node_modules/.bin/marked node_modules/.bin/marked: diff --git a/deps/npm/README.md b/deps/npm/README.md index dcd06b50dbc..ceaefb8f6c3 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -16,7 +16,7 @@ and prior, clone the git repo and dig through the old tags and branches. ## Super Easy Install -npm comes with [node](http://nodejs.org/download/) now. +npm is bundled with [node](http://nodejs.org/download/). ### Windows Computers diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm index d020ccfe7cb..45e8e41031c 100755 --- a/deps/npm/bin/npm +++ b/deps/npm/bin/npm @@ -7,8 +7,21 @@ case `uname` in *CYGWIN*) basedir=`cygpath -w "$basedir"`;; esac -if [ -x "$basedir/node.exe" ]; then - "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" -else - node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/deps/npm/bin/npm.cmd b/deps/npm/bin/npm.cmd index 7720e20529c..880554dcdd6 100644 --- a/deps/npm/bin/npm.cmd +++ b/deps/npm/bin/npm.cmd @@ -1,6 +1,19 @@ -:: Created by npm, please don't edit manually. -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* -) ELSE ( - node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* -) +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/deps/npm/doc/api/npm-view.md b/deps/npm/doc/api/npm-view.md index fd0076c9674..0c110f52ed1 100644 --- a/deps/npm/doc/api/npm-view.md +++ b/deps/npm/doc/api/npm-view.md @@ -65,7 +65,7 @@ If a version range is provided, then data will be printed for every matching version of the package. This will show which version of jsdom was required by each matching version of yui3: - npm.commands.view(["yui3@'>0.5.4'", "dependencies.jsdom"], callback) + npm.commands.view(["yui3@>0.5.4", "dependencies.jsdom"], callback) ## OUTPUT diff --git a/deps/npm/doc/cli/npm-access.md b/deps/npm/doc/cli/npm-access.md index 85db7e65418..aabdbe03ca0 100644 --- a/deps/npm/doc/cli/npm-access.md +++ b/deps/npm/doc/cli/npm-access.md @@ -6,10 +6,11 @@ npm-access(1) -- Set access level on published packages npm access public [] npm access restricted [] - npm access add [] - npm access rm [] + npm access grant [] + npm access revoke [] - npm access ls [] + npm access ls-packages [||] + npm access ls-collaborators [ []] npm access edit [] ## DESCRIPTION @@ -23,13 +24,20 @@ subcommand. * public / restricted: Set a package to be either publicly accessible or restricted. -* add / rm: +* grant / revoke: Add or remove the ability of users and teams to have read-only or read-write access to a package. -* ls: +* ls-packages: + + Show all of the packages a user or a team is able to access, along with the + access level, except for read-only public packages (it won't print the whole + registry listing) + +* ls-collaborators: Show all of the access privileges for a package. Will only show permissions - for packages to which you have at least read access. + for packages to which you have at least read access. If `` is passed in, + the list is filtered only to teams _that_ user happens to belong to. * edit: Set the access privileges for a package at once using `$EDITOR`. @@ -56,8 +64,11 @@ If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use `--access=public`. +Management of teams and team memberships is done with the `npm team` command. + ## SEE ALSO +* npm-team(1) * npm-publish(1) * npm-config(7) * npm-registry(7) diff --git a/deps/npm/doc/cli/npm-team.md b/deps/npm/doc/cli/npm-team.md new file mode 100644 index 00000000000..2ed9b367b56 --- /dev/null +++ b/deps/npm/doc/cli/npm-team.md @@ -0,0 +1,55 @@ +npm-team(1) -- Manage organization teams and team memberships +============================================================= + +## SYNOPSIS + + npm team create + npm team destroy + + npm team add + npm team rm + + npm team ls | + + npm team edit + +## DESCRIPTION + +Used to manage teams in organizations, and change team memberships. Does not +handle permissions for packages. + +Teams must always be fully qualified with the organization/scope they belond to +when operating on them, separated by a colon (`:`). That is, if you have a +`developers` team on a `foo` organization, you must always refer to that team as +`developers:foo` in these commands. + +* create / destroy: + Create a new team, or destroy an existing one. + +* add / rm: + Add a user to an existing team, or remove a user from a team they belong to. + +* ls: + If performed on an organization name, will return a list of existing teams + under that organization. If performed on a team, it will instead return a list + of all users belonging to that particular team. + +## DETAILS + +`npm team` always operates directly on the current registry, configurable from +the command line using `--registry=`. + +In order to create teams and manage team membership, you must be a *team admin* +under the given organization. Listing teams and team memberships may be done by +any member of the organizations. + +Organization creation and management of team admins and *organization* members +is done through the website, not the npm CLI. + +To use teams to manage permissions on packages belonging to your organization, +use the `npm access` command to grant or revoke the appropriate permissions. + +## SEE ALSO + +* npm-access(1) +* npm-registr(7) diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index b0d86d9492f..3942670878b 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -571,7 +571,7 @@ this. If you depend on features introduced in 1.5.2, use `">= 1.5.2 < 2"`. Array of package names that will be bundled when publishing the package. -If this is spelled `"bundleDependencies"`, then that is also honorable. +If this is spelled `"bundleDependencies"`, then that is also honored. ## optionalDependencies diff --git a/deps/npm/doc/misc/npm-developers.md b/deps/npm/doc/misc/npm-developers.md index 2b025034f85..75474f956ac 100644 --- a/deps/npm/doc/misc/npm-developers.md +++ b/deps/npm/doc/misc/npm-developers.md @@ -118,9 +118,11 @@ need to add them to `.npmignore` explicitly: * `.DS_Store` * `.git` * `.hg` +* `.npmrc` * `.lock-wscript` * `.svn` * `.wafpickle-*` +* `config.gypi` * `CVS` * `npm-debug.log` @@ -132,7 +134,9 @@ The following paths and files are never ignored, so adding them to `.npmignore` is pointless: * `package.json` -* `README.*` +* `README` (and its variants) +* `CHANGELOG` (and its variants) +* `LICENSE` / `LICENCE` ## Link Packages diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md index 837ef26ba01..ac725e1ed8b 100644 --- a/deps/npm/doc/misc/npm-index.md +++ b/deps/npm/doc/misc/npm-index.md @@ -181,6 +181,10 @@ Stop a package Tag a published version +### npm-team(1) + +Manage organization teams and team memberships + ### npm-test(1) Test a package diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 0ad6f04cf55..887d336e5da 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -19,7 +19,7 @@

To install an old and unsupported version of npm that works on node 0.3 and prior, clone the git repo and dig through the old tags and branches.

Super Easy Install

-

npm comes with node now.

+

npm is bundled with node.

Windows Computers

Get the MSI. npm is in it.

Apple Macintosh Computers

@@ -140,7 +140,7 @@ specific purpose, or lack of malice in any given npm package.

If you have a complaint about a package in the public npm registry, and cannot resolve it with the package owner, please email -support@npmjs.com and explain the situation.

+support@npmjs.com and explain the situation.

Any data published to The npm Registry (including user account information) may be removed or modified at the sole discretion of the npm server administrators.

@@ -166,10 +166,10 @@ as expected. The npm-debug.log file is also helpful to provide.

SEE ALSO

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

       - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index 5dbec20a88b..763bc70322e 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@ to the npm.bin property.

       - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index e86f3841929..afae207a4b0 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@ friendly for programmatic use.

       - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 5419551c0a2..28ff03c1909 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -18,7 +18,7 @@ npm.commands.cache.clean([args], callback) npm.commands.cache.add([args], callback) npm.commands.cache.read(name, version, forceBypass, callback)

DESCRIPTION

-

This acts much the same ways as the npm-cache(1) command line +

This acts much the same ways as the npm-cache(1) command line functionality.

The callback is called with the package.json data of the thing that is eventually added to or read from the cache.

@@ -42,5 +42,5 @@ incrementation.

       - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index bdff581012b..91f30817d59 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -22,7 +22,7 @@ commands are special and take other optional arguments.

usage, or man 3 npm-<command> for programmatic usage.

SEE ALSO

@@ -36,5 +36,5 @@ usage, or man 3 npm-<command> for programmatic usage.

       - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index 5185aa8a64d..c9d8b6e985f 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -43,7 +43,7 @@ the duration of a program, use the npm.config.set and npm.con functions instead.

SEE ALSO

@@ -57,5 +57,5 @@ functions instead.

       - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index 965d4689958..cdeb3e8198d 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -31,9 +31,9 @@ a deprecation warning to all who attempt to install it.

To un-deprecate a package, specify an empty string ("") for the message argument.

SEE ALSO

@@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.

       - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index b3d061aad49..1590c667f61 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@ friendly for programmatic use.

       - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 7de61851879..b929a9989d7 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@ and how this is used.

       - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index a7645373cef..25d4c789cc6 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@ sure to use npm rebuild <pkg> if you make any changes.

       - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index 550240f942c..9673e4b793a 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -44,5 +44,5 @@ Name of the file that matched        - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 899e8776e76..c78eb0c8786 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -26,7 +26,7 @@ JavaScript makes it stupid simple to output formatted JSON, that is the preferred method. If you're sure you want to handle command-line prompting, then go ahead and use this programmatically.

SEE ALSO

-

package.json(5)

+

package.json(5)

@@ -39,5 +39,5 @@ then go ahead and use this programmatically.

       - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index 1bb1043c3f1..2689d777c54 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@ installed or when an error has been encountered.

       - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 7eac566fd2d..e6944161e64 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@ the package in the current working directory

       - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 320d1d3fd0f..dbf3521c720 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@ config object.

       - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index e65c1925746..d349c6866fd 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@ dependency will only be output once.

       - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 3327649c261..8c46256a1c2 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@ currently outdated.

       - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index aeea03091df..d9252226002 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -32,8 +32,8 @@ or you can't. Future versions may contain more fine-grained access levels, that is not implemented at this time.

SEE ALSO

@@ -47,5 +47,5 @@ that is not implemented at this time.

       - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index 4518abfac0a..7a127667ab4 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@ overwritten the second time.

       - + diff --git a/deps/npm/html/doc/api/npm-ping.html b/deps/npm/html/doc/api/npm-ping.html index f3a4e7a775c..9d17c978db2 100644 --- a/deps/npm/html/doc/api/npm-ping.html +++ b/deps/npm/html/doc/api/npm-ping.html @@ -29,4 +29,4 @@ to npm registries.

       - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 45f4bdb6efa..78bc4d21ad8 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 9a240664b84..bb3b648c0b9 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@ package's dependencies list.

       - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index 92302a1ecdb..7c9b007d05c 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -30,9 +30,9 @@ current working directory.

the registry. Overwrites when the "force" environment variable is set.

SEE ALSO

@@ -46,5 +46,5 @@ the registry. Overwrites when the "force" environment variable is set        - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index 65d10c50ba4..6c0886b18d5 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@ the new binary. If no 'packages' parameter is specify, every package wil        - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 84956f12a66..c2ba1597cf2 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@ friendly for programmatic use.

       - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index fdbcdfa57ff..87fef3260da 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -37,8 +37,8 @@ and "start" scripts, not instead of them.

behavior will be accompanied by an increase in major version number

SEE ALSO

@@ -52,5 +52,5 @@ behavior will be accompanied by an increase in major version number

       - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 7c6223fa707..5b7089996e4 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index fdd705d444b..499a76adcb8 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -23,11 +23,11 @@ one element, then the first is assumed to be the package and the second is assumed to be the command to run. All other elements are ignored.

SEE ALSO

@@ -41,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.

       - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 55b50b974b4..6fda50eee0e 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@ like).

       - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index eb115481c77..f09e3db2e1b 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@ been saved.

       - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index e885248d202..777a7a162b8 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index 222c23b8875..73833ad2c60 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@ in the packages parameter.

       - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 6d2e6571c1b..d5e6759a95f 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@ used. For more information about how to set this config, check        - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index a41cf64cb38..1ef9031bdae 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@ in the packages parameter.

       - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 193ba1211d2..29a28545ead 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@ uninstalled or when an error has been encountered.

       - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 5ee64a910f6..9ca52fb2bff 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@ the root package entry is removed from the registry entirely.

       - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 6e964f04456..fbfc7c44308 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -19,7 +19,7 @@ missing packages.

parameter will be called when done or when an error occurs.

SEE ALSO

@@ -33,5 +33,5 @@ parameter will be called when done or when an error occurs.

       - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index 12e4c941482..a2998af6595 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@ not have exactly one element. The only element should be a version number.

       - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 4c515ff4377..77aaa43ea97 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -52,7 +52,7 @@ the shortened string format. (See npm help json for more on this.)

If a version range is provided, then data will be printed for every matching version of the package. This will show which version of jsdom was required by each matching version of yui3:

-
npm.commands.view(["yui3@'>0.5.4'", "dependencies.jsdom"], callback)
+
npm.commands.view(["yui3@>0.5.4", "dependencies.jsdom"], callback)
 

OUTPUT

If only a single string field for a single version is output, then it will not be colorized or quoted, so as to enable piping the output to @@ -81,5 +81,5 @@ the field name.

       - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index 5d347fbe7cd..ad2a67b8147 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index 1d17da12f43..71b2826a5a5 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,19 +23,19 @@ npm.load([configObject, ]function (er, npm) { npm.commands.install(["package"], cb) })

VERSION

-

2.13.3

+

2.14.2

DESCRIPTION

This is the API documentation for npm. To find documentation of the command line -client, see npm(1).

+client, see npm(1).

Prior to using npm's commands, npm.load() must be called. If you provide configObject as an object map of top-level configs, they override the values stored in the various config locations. In the npm command line client, this set of configs is parsed from the command line options. Additional configuration params are loaded from two configuration files. See -npm-config(1), npm-config(7), and npmrc(5) for more information.

+npm-config(1), npm-config(7), and npmrc(5) for more information.

After that, each of the functions are accessible in the -commands object: npm.commands.<cmd>. See npm-index(7) for a list of +commands object: npm.commands.<cmd>. See npm-index(7) for a list of all possible commands.

All commands on the command object take an array of positional argument strings. The last argument to any function is a callback. Some @@ -109,5 +109,5 @@ method names. Use the npm.deref method to find the real name.

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 7588c311362..933e59baa8d 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -14,10 +14,11 @@
npm access public [<package>]
 npm access restricted [<package>]
 
-npm access add <read-only|read-write> <entity> [<package>]
-npm access rm <entity> [<package>]
+npm access grant <read-only|read-write> <scope:team> [<package>]
+npm access revoke <scope:team> [<package>]
 
-npm access ls [<package>]
+npm access ls-packages [<user>|<scope>|<scope:team>]
+npm access ls-collaborators [<package> [<user>]]
 npm access edit [<package>]
 

DESCRIPTION

Used to set access controls on private packages.

@@ -28,13 +29,19 @@ subcommand.

  • public / restricted: Set a package to be either publicly accessible or restricted.

  • -
  • add / rm: +

  • grant / revoke: Add or remove the ability of users and teams to have read-only or read-write access to a package.

  • -
  • ls: +

  • ls-packages:

    +

    Show all of the packages a user or a team is able to access, along with the +access level, except for read-only public packages (it won't print the whole +registry listing)

    +
  • +
  • ls-collaborators: Show all of the access privileges for a package. Will only show permissions -for packages to which you have at least read access.

    +for packages to which you have at least read access. If <user> is passed in, +the list is filtered only to teams that user happens to belong to.

  • edit: Set the access privileges for a package at once using $EDITOR.

    @@ -57,11 +64,13 @@ of a team or directly as an owner.
  • If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use --access=public.

    +

    Management of teams and team memberships is done with the npm team command.

    SEE ALSO

    @@ -75,5 +84,5 @@ with an HTTP 402 status code (logically enough), unless you use        - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 1fd0b1ccac9..7dbc6d071e8 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -15,7 +15,7 @@

    DESCRIPTION

    Create or verify a user named <username> in the specified registry, and save the credentials to the .npmrc file. If no registry is specified, -the default registry will be used (see npm-config(7)).

    +the default registry will be used (see npm-config(7)).

    The username, password, and email are read in from prompts.

    To reset your password, go to https://www.npmjs.com/forgot

    To change your email address, go to https://www.npmjs.com/email-edit

    @@ -28,11 +28,11 @@ your existing record.

    registry

    Default: http://registry.npmjs.org/

    The base URL of the npm package registry. If scope is also specified, -this registry will only be used for packages with that scope. See npm-scope(7).

    +this registry will only be used for packages with that scope. See npm-scope(7).

    scope

    Default: none

    If specified, the user and login credentials given will be associated -with the specified scope. See npm-scope(7). You can use both at the same time, +with the specified scope. See npm-scope(7). You can use both at the same time, e.g.

    npm adduser --registry=http://myregistry.example.com --scope=@myco
     

    This will set a registry for the given scope and login or create a user for @@ -44,17 +44,17 @@ registry should include authorization information. Useful for private registries. Can be used with --registry and / or --scope, e.g.

    npm adduser --registry=http://private-registry.example.com --always-auth
     

    This will ensure that all requests to that registry (including for tarballs) -include an authorization header. See always-auth in npm-config(7) for more +include an authorization header. See always-auth in npm-config(7) for more details on always-auth. Registry-specific configuration of always-auth takes precedence over any global configuration.

    SEE ALSO

    @@ -68,5 +68,5 @@ precedence over any global configuration.

           - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 345188c7f96..8c5505f0299 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -16,12 +16,12 @@

    Print the folder where npm will install executables.

    SEE ALSO

    @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index db8b253800c..468c250d94c 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -33,14 +33,14 @@ a package.json in the current folder and use the name

    The base URL of the npm package registry.

    SEE ALSO

    @@ -54,5 +54,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 03169c7377d..65c2cbc33c0 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -23,10 +23,10 @@ directly, run:

    npm run-script build
     

    SEE ALSO

    @@ -40,5 +40,5 @@ directly, run:

           - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 4cbf952f3d6..24c581ec579 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -17,7 +17,7 @@ install packages into the local space.

    Just use npm install now to do what npm bundle used to do.

    SEE ALSO

    @@ -31,5 +31,5 @@ install packages into the local space.

           - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index 1bfe9a7f2cf..311e4595a78 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -61,13 +61,13 @@ they do not make an HTTP request to the registry.

    The root cache folder.

    SEE ALSO

    @@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.

           - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 458e2f8ddda..d7628af53a5 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -26,9 +26,9 @@ environment, npm completion acts in "plumbing mode", and completions based on the arguments.

    SEE ALSO

    @@ -42,5 +42,5 @@ completions based on the arguments.

           - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 1a887e2d0c1..1556954e55e 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -22,8 +22,8 @@ npm set <key> <value> [--global]

    DESCRIPTION

    npm gets its config settings from the command line, environment variables, npmrc files, and in some cases, the package.json file.

    -

    See npmrc(5) for more information about the npmrc files.

    -

    See npm-config(7) for a more thorough discussion of the mechanisms +

    See npmrc(5) for more information about the npmrc files.

    +

    See npm-config(7) for a more thorough discussion of the mechanisms involved.

    The npm config command can be used to update and edit the contents of the user and global npmrc files.

    @@ -48,11 +48,11 @@ of the user and global npmrc files.

    global config.

    SEE ALSO

    @@ -66,5 +66,5 @@ global config.

           - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 7d1653ed936..23a353fb28c 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -23,7 +23,7 @@ be more effectively shared by multiple dependent packages.

    | `-- c@1.0.3 `-- d <-- depends on c@~1.0.9 `-- c@1.0.10 -

    In this case, npm-dedupe(1) will transform the tree to:

    +

    In this case, npm-dedupe(1) will transform the tree to:

    a
     +-- b
     +-- d
    @@ -47,9 +47,9 @@ tag with the given name exists, the tagged version is preferred over newer
     versions.

    SEE ALSO

    @@ -63,5 +63,5 @@ versions.

           - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index cd2bc564815..1c9786f7e7b 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -23,8 +23,8 @@ something like this:

    To un-deprecate a package, specify an empty string ("") for the message argument.

    SEE ALSO

    @@ -38,5 +38,5 @@ something like this:

           - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index c910e081a9a..47d278a6aa2 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -55,15 +55,15 @@ example, v1.4 cannot be used as a tag, because it is interpreted by begin with a number or the letter v.

    SEE ALSO

    @@ -77,5 +77,5 @@ begin with a number or the letter v.

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 95fdcd7ad9d..c57e37b51d8 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -36,13 +36,13 @@ the current folder and use the name property.

    The base URL of the npm package registry.

    SEE ALSO

    @@ -56,5 +56,5 @@ the current folder and use the name property.

           - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 60622185dae..6c55f92b27f 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -14,7 +14,7 @@
    npm edit <name>[@<version>]
     

    DESCRIPTION

    Opens the package folder in the default editor (or whatever you've -configured as the npm editor config -- see npm-config(7).)

    +configured as the npm editor config -- see npm-config(7).)

    After it has been edited, the package is rebuilt so as to pick up any changes in compiled packages.

    For instance, you can do npm install connect to install connect @@ -30,12 +30,12 @@ or "notepad" on Windows.

    The command to run for npm edit or npm config edit.

    SEE ALSO

    @@ -49,5 +49,5 @@ or "notepad" on Windows.        - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 08848c044a3..a1d6f4d6c83 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -31,11 +31,11 @@ Windows

    The shell to run for the npm explore command.

    SEE ALSO

    @@ -49,5 +49,5 @@ Windows        - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index b50aa666bfc..b3744eaa8a5 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -30,9 +30,9 @@ where the terms were found in the documentation.

    If false, then help-search will just list out the help topics found.

    SEE ALSO

    @@ -46,5 +46,5 @@ where the terms were found in the documentation.

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index a8598ca7e9f..5ae2faa0704 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -29,16 +29,16 @@ matches are equivalent to specifying a topic name.

    Set to "browser" to view html help content in the default web browser.

    SEE ALSO

    @@ -52,5 +52,5 @@ matches are equivalent to specifying a topic name.

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 6387d82de4b..43ce15338d0 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -32,9 +32,9 @@ defaults and not prompt you for any options.

    SEE ALSO

    @@ -48,5 +48,5 @@ defaults and not prompt you for any options.

           - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index cb01884a43a..1eaf5655b20 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -23,13 +23,13 @@ npm i (with any of the previous argument usage)

    DESCRIPTION

    This command installs a package, and any packages that it depends on. If the package has a shrinkwrap file, the installation of dependencies will be driven -by that. See npm-shrinkwrap(1).

    +by that. See npm-shrinkwrap(1).

    A package is:

    • a) a folder containing a program described by a package.json file
    • b) a gzipped tarball containing (a)
    • c) a url that resolves to (b)
    • -
    • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
    • +
    • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
    • e) a <name>@<tag> that points to (d)
    • f) a <name> that has a "latest" tag satisfying (e)
    • g) a <git remote url> that resolves to (b)
    • @@ -67,7 +67,7 @@ after packing it up into a tarball (b).

    • npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]:

      Do a <name>@<tag> install, where <tag> is the "tag" config. (See - npm-config(7).)

      + npm-config(7).)

      In most cases, this will install the latest version of the module published on npm.

      Example:

      @@ -88,7 +88,7 @@ exact version rather than using npm's default semver range operator.

      <scope> is optional. The package will be downloaded from the registry associated with the specified scope. If no registry is associated with -the given scope the default registry is assumed. See npm-scope(7).

      +the given scope the default registry is assumed. See npm-scope(7).

      Note: if you do not include the @-symbol on your scope name, npm will interpret this as a GitHub repository instead, see below. Scopes names must also be followed by a slash.

      @@ -124,7 +124,7 @@ fetch the package by name if it is not valid.
    • npm install [@<scope>/]<name>@<version range>:

      Install a version of the package matching the specified version range. This - will follow the same rules for resolving dependencies described in package.json(5).

      + will follow the same rules for resolving dependencies described in package.json(5).

      Note that most version ranges must be put in quotes so that your shell will treat it as a single argument.

      Example:

      @@ -199,7 +199,7 @@ versions.

      local copy exists on disk.

      npm install sax --force
       

      The --global argument will cause npm to install the package globally -rather than locally. See npm-folders(5).

      +rather than locally. See npm-folders(5).

      The --link argument will cause npm to link global installs into the local space in some cases.

      The --no-bin-links argument will prevent npm from creating symlinks for @@ -210,7 +210,7 @@ being installed.

      shrinkwrap file and use the package.json instead.

      The --nodedir=/path/to/node/source argument will allow npm to find the node source code so that npm can compile native modules.

      -

      See npm-config(7). Many of the configuration params have some +

      See npm-config(7). Many of the configuration params have some effect on installation, since that's most of what npm does.

      ALGORITHM

      To install a package, npm uses the following algorithm:

      @@ -231,7 +231,7 @@ this algorithm produces:

      `-- D

      That is, the dependency from B to C is satisfied by the fact that A already caused C to be installed at a higher level.

      -

      See npm-folders(5) for a more detailed description of the specific +

      See npm-folders(5) for a more detailed description of the specific folder structures that npm creates.

      Limitations of npm's Install Algorithm

      There are some very rare and pathological edge-cases where a cycle can @@ -251,19 +251,19 @@ to symlink the existing version into the new location. If this ever affects a real use-case, it will be investigated.

      SEE ALSO

      @@ -277,5 +277,5 @@ affects a real use-case, it will be investigated.

             - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index ca622a583d1..50ead8400eb 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -18,12 +18,12 @@ npm ln (with any of the previous argument usage)

      Package linking is a two-step process.

      First, npm link in a package folder will create a globally-installed symbolic link from prefix/package-name to the current folder (see -npm-config(7) for the value of prefix).

      +npm-config(7) for the value of prefix).

      Next, in some other location, npm link package-name will create a symlink from the local node_modules folder to the global symlink.

      Note that package-name is taken from package.json, not from directory name.

      -

      The package name can be optionally prefixed with a scope. See npm-scope(7). +

      The package name can be optionally prefixed with a scope. See npm-scope(7). The scope must be preceded by an @-symbol and followed by a slash.

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

      @@ -46,19 +46,19 @@ npm link ../node-redis # link the dir of your dependency npm link node-redis

      That is, it first creates a global link, and then links the global installation target into your project's node_modules folder.

      -

      If your linked package is scoped (see npm-scope(7)) your link command must +

      If your linked package is scoped (see npm-scope(7)) your link command must include that scope, e.g.

      npm link @myorg/privatepackage
       

      SEE ALSO

      @@ -72,5 +72,5 @@ include that scope, e.g.

             - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index d538a93080c..00b97bfe487 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -29,19 +29,19 @@ it takes precedence.

      scope

      Default: none

      If specified, the user and login credentials given will be associated -with the specified scope. See npm-scope(7). You can use both at the same time, +with the specified scope. See npm-scope(7). You can use both at the same time, e.g.

      npm adduser --registry=http://myregistry.example.com --scope=@myco
       

      This will set a registry for the given scope and login or create a user for that registry at the same time.

      SEE ALSO

      @@ -55,5 +55,5 @@ that registry at the same time.

             - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 399d6a96739..4976b661643 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,7 @@ installed, as well as their dependencies, in a tree-structure.

      limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

      -
      npm@2.13.3 /path/to/npm
      +
      npm@2.14.2 /path/to/npm
       └─┬ init-package-json@0.0.4
         └── promzard@0.1.5
       

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

      @@ -75,15 +75,15 @@ project.

      Display only the dependency tree for packages in devDependencies.

      SEE ALSO

      @@ -97,5 +97,5 @@ project.

             - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index cc4c2392fd1..f37d944a15b 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -51,9 +51,9 @@ project.

      Max depth for checking dependency tree.

      SEE ALSO

      @@ -67,5 +67,5 @@ project.

             - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index ab8336925c3..f50a1558e93 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -32,10 +32,10 @@ or you can't. Future versions may contain more fine-grained access levels, that is not implemented at this time.

      SEE ALSO

      @@ -49,5 +49,5 @@ that is not implemented at this time.

             - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 2df3394ff31..cbaf59aa374 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -23,11 +23,11 @@ overwritten the second time.

      If no arguments are supplied, then npm packs the current package folder.

      SEE ALSO

      @@ -41,5 +41,5 @@ overwritten the second time.

             - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index c4865c01e8a..6eccdef0b1d 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -16,9 +16,9 @@

      Ping the configured or given npm registry and verify authentication.

      SEE ALSO

      @@ -32,4 +32,4 @@        - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index c999e7d928b..4720e23608a 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -16,15 +16,15 @@

      Print the local prefix to standard out. This is the closest parent directory to contain a package.json file unless -g is also specified.

      If -g is specified, this will be the value of the global prefix. See -npm-config(7) for more detail.

      +npm-config(7) for more detail.

      SEE ALSO

      @@ -38,5 +38,5 @@ to contain a package.json file unless -g is also specified.

             - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 9a130e583eb..7d771e7b2ef 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -25,9 +25,9 @@ specified in your devDependencies. Setting --production=false negate NODE_ENV being set to production.

      SEE ALSO

      @@ -41,5 +41,5 @@ negate NODE_ENV being set to production.

             - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 61d10cc4f8f..3c42d256b98 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -15,11 +15,11 @@ npm publish <folder> [--tag <tag>] [--access <public|restricted>]

      DESCRIPTION

      Publishes a package to the registry so that it can be installed by name. See -npm-developers(7) for details on what's included in the published package, as +npm-developers(7) for details on what's included in the published package, as well as details on how the package is built.

      By default npm will publish to the public registry. This can be overridden by -specifying a different default registry or using a npm-scope(7) in the name -(see package.json(5)).

      +specifying a different default registry or using a npm-scope(7) in the name +(see package.json(5)).

      -

      Scope is optional and follows the usual rules for npm-scope(7).

      +

      Scope is optional and follows the usual rules for npm-scope(7).

      Examples:

      npm uninstall sax --save
       npm uninstall @myorg/privatepackage --save
      @@ -38,12 +38,12 @@ npm uninstall node-tap --save-dev
       npm uninstall dtrace-provider --save-optional
       

      SEE ALSO

      @@ -57,5 +57,5 @@ npm uninstall dtrace-provider --save-optional        - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index ecf13ea2515..19f65b3c231 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -26,14 +26,14 @@ the root package entry is removed from the registry entirely.

      Even if a package version is unpublished, that specific name and version combination can never be reused. In order to publish the package again, a new version number must be used.

      -

      The scope is optional and follows the usual rules for npm-scope(7).

      +

      The scope is optional and follows the usual rules for npm-scope(7).

      SEE ALSO

      @@ -47,5 +47,5 @@ package again, a new version number must be used.

             - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 3285f6ece50..0ea0e70b905 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -100,12 +100,12 @@ package that is outdated -- that is, has a version that is differen be downgraded.

      SEE ALSO

      @@ -119,5 +119,5 @@ be downgraded.

             - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index fbbe2b98299..d819bbbcd1b 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -76,12 +76,12 @@ and tag up to the server, and deletes the build/temp directory.

      Commit and tag the version change.

      SEE ALSO

      @@ -95,5 +95,5 @@ and tag up to the server, and deletes the build/temp directory.

             - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 8ad404d9d3c..b9264d04662 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -46,7 +46,7 @@ can do this:

      npm view express contributors.name contributors.email
       

      "Person" fields are shown as a string if they would be shown as an object. So, for example, this will show the list of npm contributors in -the shortened string format. (See package.json(5) for more on this.)

      +the shortened string format. (See package.json(5) for more on this.)

      npm view npm contributors
       

      If a version range is provided, then data will be printed for every matching version of the package. This will show which version of jsdom @@ -63,12 +63,12 @@ will be prefixed with the version it applies to.

      the field name.

      SEE ALSO

      @@ -82,5 +82,5 @@ the field name.

             - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index bfb6e8c0552..440d0227b87 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -16,10 +16,10 @@

      Print the username config to standard output.

      SEE ALSO

      @@ -33,5 +33,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 5dd95b874fe..f641eefe395 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

      SYNOPSIS

      npm <command> [args]
       

      VERSION

      -

      2.13.3

      +

      2.14.2

      DESCRIPTION

      npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -25,7 +25,7 @@ programs.

      INTRODUCTION

      You probably got npm because you want to install stuff.

      Use npm install blerg to install the latest version of "blerg". Check out -npm-install(1) for more info. It can do a lot of stuff.

      +npm-install(1) for more info. It can do a lot of stuff.

      Use the npm search command to show everything that's available. Use npm ls to show everything you've installed.

      DEPENDENCIES

      @@ -42,7 +42,7 @@ For more information visit the node-gyp repository and the node-gyp Wiki.

      DIRECTORIES

      -

      See npm-folders(5) to learn about where npm puts stuff.

      +

      See npm-folders(5) to learn about where npm puts stuff.

      In particular, npm has two modes of operation:

      A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -npm-scope(7) for more detail.

      +npm-scope(7) for more detail.

      version

      The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without @@ -53,7 +53,7 @@ changes to the version.

      Version must be parseable by node-semver, which is bundled with npm as a dependency. (npm install semver to use it yourself.)

      -

      More on version numbers and ranges at semver(7).

      +

      More on version numbers and ranges at semver(7).

      description

      Put a description in it. It's a string. This helps people discover your package, as it's listed in npm search.

      @@ -143,7 +143,7 @@ up by the files array. The ".npmignore" file works just like a

      Certain files are always included, regardless of settings:

      • package.json
      • -
      • README (and its variants)
      • +
      • README (and its variants)
      • CHANGELOG (and its variants)
      • LICENSE / LICENCE
      @@ -272,7 +272,7 @@ shortcut syntax you use for npm install:

      The "scripts" property is a dictionary containing script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point.

      -

      See npm-scripts(7) to find out more about writing package scripts.

      +

      See npm-scripts(7) to find out more about writing package scripts.

      config

      A "config" object can be used to set configuration parameters used in package scripts that persist across upgrades. For instance, if a package had the @@ -282,7 +282,7 @@ following:

      and then had a "start" command that then referenced the npm_package_config_port environment variable, then the user could override that by doing npm config set foo:port 8001.

      -

      See npm-config(7) and npm-scripts(7) for more on package +

      See npm-config(7) and npm-scripts(7) for more on package configs.

      dependencies

      Dependencies are specified in a simple object that maps a package name to a @@ -291,15 +291,15 @@ space-separated descriptors. Dependencies can also be identified with a tarball or git URL.

      Please do not put test harnesses or transpilers in your dependencies object. See devDependencies, below.

      -

      See semver(7) for more details about specifying version ranges.

      +

      See semver(7) for more details about specifying version ranges.

      • version Must match version exactly
      • >version Must be greater than version
      • >=version etc
      • <version
      • <=version
      • -
      • ~version "Approximately equivalent to version" See semver(7)
      • -
      • ^version "Compatible with version" See semver(7)
      • +
      • ~version "Approximately equivalent to version" See semver(7)
      • +
      • ^version "Compatible with version" See semver(7)
      • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
      • http://... See 'URLs as Dependencies' below
      • * Matches any version
      • @@ -308,7 +308,7 @@ tarball or git URL.

      • range1 || range2 Passes if either range1 or range2 are satisfied.
      • git... See 'Git URLs as Dependencies' below
      • user/repo See 'GitHub URLs' below
      • -
      • tag A specific version tagged and published as tag See npm-tag(1)
      • +
      • tag A specific version tagged and published as tag See npm-tag(1)
      • path/path/path See Local Paths below

      For example, these are all valid:

      @@ -380,7 +380,7 @@ the external test or documentation framework that you use.

      object.

      These things will be installed when doing npm link or npm install from the root of a package, and can be managed like any other npm -configuration param. See npm-config(7) for more on the topic.

      +configuration param. See npm-config(7) for more on the topic.

      For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the prepublish script to do this, and make the required package a devDependency.

      @@ -433,7 +433,7 @@ with every 1.x version of the host package, use "^1.0" or this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2".

      bundledDependencies

      Array of package names that will be bundled when publishing the package.

      -

      If this is spelled "bundleDependencies", then that is also honorable.

      +

      If this is spelled "bundleDependencies", then that is also honored.

      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 @@ -520,7 +520,7 @@ you can ensure that a given package is not tagged with "latest", publi to the global public registry or that a scoped module is private by default.

      Any config values can be overridden, but of course only "tag", "registry" and "access" probably matter for the purposes of publishing.

      -

      See npm-config(7) to see the list of config options that can be +

      See npm-config(7) to see the list of config options that can be overridden.

      DEFAULT VALUES

      npm will default some values based on package contents.

      @@ -542,16 +542,16 @@ ignored.

    SEE ALSO

    @@ -565,5 +565,5 @@ ignored.

           - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 42e23dce05e..fa1599f8728 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -15,7 +15,7 @@ variables, and npmrc files.

    The npm config command can be used to update and edit the contents of the user and global npmrc files.

    -

    For a list of available configuration options, see npm-config(7).

    +

    For a list of available configuration options, see npm-config(7).

    FILES

    The four relevant files are:

      @@ -65,11 +65,11 @@ maintainers to override default configs in a standard and consistent manner.

      SEE ALSO

      @@ -83,5 +83,5 @@ manner.

             - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 6b6d7b10cf4..15b40261499 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -14,7 +14,7 @@

      This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a JavaScript object literal.

      A lot of the behavior described in this document is affected by the config -settings described in npm-config(7).

      +settings described in npm-config(7).

      name

      The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without @@ -43,7 +43,7 @@ be something short, but also reasonably descriptive. already, before you get too attached to it. https://www.npmjs.com/

    A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -npm-scope(7) for more detail.

    +npm-scope(7) for more detail.

    version

    The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without @@ -53,7 +53,7 @@ changes to the version.

    Version must be parseable by node-semver, which is bundled with npm as a dependency. (npm install semver to use it yourself.)

    -

    More on version numbers and ranges at semver(7).

    +

    More on version numbers and ranges at semver(7).

    description

    Put a description in it. It's a string. This helps people discover your package, as it's listed in npm search.

    @@ -143,7 +143,7 @@ up by the files array. The ".npmignore" file works just like a

    Certain files are always included, regardless of settings:

    • package.json
    • -
    • README (and its variants)
    • +
    • README (and its variants)
    • CHANGELOG (and its variants)
    • LICENSE / LICENCE
    @@ -272,7 +272,7 @@ shortcut syntax you use for npm install:

    The "scripts" property is a dictionary containing script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point.

    -

    See npm-scripts(7) to find out more about writing package scripts.

    +

    See npm-scripts(7) to find out more about writing package scripts.

    config

    A "config" object can be used to set configuration parameters used in package scripts that persist across upgrades. For instance, if a package had the @@ -282,7 +282,7 @@ following:

    and then had a "start" command that then referenced the npm_package_config_port environment variable, then the user could override that by doing npm config set foo:port 8001.

    -

    See npm-config(7) and npm-scripts(7) for more on package +

    See npm-config(7) and npm-scripts(7) for more on package configs.

    dependencies

    Dependencies are specified in a simple object that maps a package name to a @@ -291,15 +291,15 @@ space-separated descriptors. Dependencies can also be identified with a tarball or git URL.

    Please do not put test harnesses or transpilers in your dependencies object. See devDependencies, below.

    -

    See semver(7) for more details about specifying version ranges.

    +

    See semver(7) for more details about specifying version ranges.

    • version Must match version exactly
    • >version Must be greater than version
    • >=version etc
    • <version
    • <=version
    • -
    • ~version "Approximately equivalent to version" See semver(7)
    • -
    • ^version "Compatible with version" See semver(7)
    • +
    • ~version "Approximately equivalent to version" See semver(7)
    • +
    • ^version "Compatible with version" See semver(7)
    • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
    • http://... See 'URLs as Dependencies' below
    • * Matches any version
    • @@ -308,7 +308,7 @@ tarball or git URL.

    • range1 || range2 Passes if either range1 or range2 are satisfied.
    • git... See 'Git URLs as Dependencies' below
    • user/repo See 'GitHub URLs' below
    • -
    • tag A specific version tagged and published as tag See npm-tag(1)
    • +
    • tag A specific version tagged and published as tag See npm-tag(1)
    • path/path/path See Local Paths below

    For example, these are all valid:

    @@ -380,7 +380,7 @@ the external test or documentation framework that you use.

    object.

    These things will be installed when doing npm link or npm install from the root of a package, and can be managed like any other npm -configuration param. See npm-config(7) for more on the topic.

    +configuration param. See npm-config(7) for more on the topic.

    For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the prepublish script to do this, and make the required package a devDependency.

    @@ -433,7 +433,7 @@ with every 1.x version of the host package, use "^1.0" or this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2".

    bundledDependencies

    Array of package names that will be bundled when publishing the package.

    -

    If this is spelled "bundleDependencies", then that is also honorable.

    +

    If this is spelled "bundleDependencies", then that is also honored.

    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 @@ -520,7 +520,7 @@ you can ensure that a given package is not tagged with "latest", publi to the global public registry or that a scoped module is private by default.

    Any config values can be overridden, but of course only "tag", "registry" and "access" probably matter for the purposes of publishing.

    -

    See npm-config(7) to see the list of config options that can be +

    See npm-config(7) to see the list of config options that can be overridden.

    DEFAULT VALUES

    npm will default some values based on package contents.

    @@ -542,16 +542,16 @@ ignored.

    SEE ALSO

    @@ -565,5 +565,5 @@ ignored.

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index aec8a7773fb..f1cc3367ac3 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -1,6 +1,6 @@ - index + npm-index @@ -10,223 +10,225 @@

    npm-index

    Index of all npm documentation

    -

    README

    +

    README

    a JavaScript package manager

    Command Line Documentation

    Using npm on the command line

    -

    npm(1)

    +

    npm(1)

    javascript package manager

    -

    npm-access(1)

    +

    npm-access(1)

    Set access level on published packages

    -

    npm-adduser(1)

    +

    npm-adduser(1)

    Add a registry user account

    -

    npm-bin(1)

    +

    npm-bin(1)

    Display npm bin folder

    -

    npm-bugs(1)

    +

    npm-bugs(1)

    Bugs for a package in a web browser maybe

    -

    npm-build(1)

    +

    npm-build(1)

    Build a package

    -

    npm-bundle(1)

    +

    npm-bundle(1)

    REMOVED

    -

    npm-cache(1)

    +

    npm-cache(1)

    Manipulates packages cache

    -

    npm-completion(1)

    +

    npm-completion(1)

    Tab Completion for npm

    -

    npm-config(1)

    +

    npm-config(1)

    Manage the npm configuration files

    -

    npm-dedupe(1)

    +

    npm-dedupe(1)

    Reduce duplication

    -

    npm-deprecate(1)

    +

    npm-deprecate(1)

    Deprecate a version of a package

    -

    npm-dist-tag(1)

    +

    npm-dist-tag(1)

    Modify package distribution tags

    -

    npm-docs(1)

    +

    npm-docs(1)

    Docs for a package in a web browser maybe

    -

    npm-edit(1)

    +

    npm-edit(1)

    Edit an installed package

    -

    npm-explore(1)

    +

    npm-explore(1)

    Browse an installed package

    -

    npm-help-search(1)

    +

    npm-help-search(1)

    Search npm help documentation

    -

    npm-help(1)

    +

    npm-help(1)

    Get help on npm

    -

    npm-init(1)

    +

    npm-init(1)

    Interactively create a package.json file

    -

    npm-install(1)

    +

    npm-install(1)

    Install a package

    - +

    Symlink a package folder

    -

    npm-logout(1)

    +

    npm-logout(1)

    Log out of the registry

    -

    npm-ls(1)

    +

    npm-ls(1)

    List installed packages

    -

    npm-outdated(1)

    +

    npm-outdated(1)

    Check for outdated packages

    -

    npm-owner(1)

    +

    npm-owner(1)

    Manage package owners

    -

    npm-pack(1)

    +

    npm-pack(1)

    Create a tarball from a package

    -

    npm-ping(1)

    +

    npm-ping(1)

    Ping npm registry

    -

    npm-prefix(1)

    +

    npm-prefix(1)

    Display prefix

    -

    npm-prune(1)

    +

    npm-prune(1)

    Remove extraneous packages

    -

    npm-publish(1)

    +

    npm-publish(1)

    Publish a package

    -

    npm-rebuild(1)

    +

    npm-rebuild(1)

    Rebuild a package

    -

    npm-repo(1)

    +

    npm-repo(1)

    Open package repository page in the browser

    -

    npm-restart(1)

    +

    npm-restart(1)

    Restart a package

    -

    npm-rm(1)

    +

    npm-rm(1)

    Remove a package

    -

    npm-root(1)

    +

    npm-root(1)

    Display npm root

    -

    npm-run-script(1)

    +

    npm-run-script(1)

    Run arbitrary package scripts

    -

    npm-search(1)

    +

    npm-search(1)

    Search for packages

    -

    npm-shrinkwrap(1)

    +

    npm-shrinkwrap(1)

    Lock down dependency versions

    -

    npm-star(1)

    +

    npm-star(1)

    Mark your favorite packages

    -

    npm-stars(1)

    +

    npm-stars(1)

    View packages marked as favorites

    -

    npm-start(1)

    +

    npm-start(1)

    Start a package

    -

    npm-stop(1)

    +

    npm-stop(1)

    Stop a package

    -

    npm-tag(1)

    +

    npm-tag(1)

    Tag a published version

    -

    npm-test(1)

    +

    npm-team(1)

    +

    Manage organization teams and team memberships

    +

    npm-test(1)

    Test a package

    -

    npm-uninstall(1)

    +

    npm-uninstall(1)

    Remove a package

    -

    npm-unpublish(1)

    +

    npm-unpublish(1)

    Remove a package from the registry

    -

    npm-update(1)

    +

    npm-update(1)

    Update a package

    -

    npm-version(1)

    +

    npm-version(1)

    Bump a package version

    -

    npm-view(1)

    +

    npm-view(1)

    View registry info

    -

    npm-whoami(1)

    +

    npm-whoami(1)

    Display npm username

    API Documentation

    Using npm in your Node programs

    -

    npm(3)

    +

    npm(3)

    javascript package manager

    -

    npm-bin(3)

    +

    npm-bin(3)

    Display npm bin folder

    -

    npm-bugs(3)

    +

    npm-bugs(3)

    Bugs for a package in a web browser maybe

    -

    npm-cache(3)

    +

    npm-cache(3)

    manage the npm cache programmatically

    -

    npm-commands(3)

    +

    npm-commands(3)

    npm commands

    -

    npm-config(3)

    +

    npm-config(3)

    Manage the npm configuration files

    -

    npm-deprecate(3)

    +

    npm-deprecate(3)

    Deprecate a version of a package

    -

    npm-docs(3)

    +

    npm-docs(3)

    Docs for a package in a web browser maybe

    -

    npm-edit(3)

    +

    npm-edit(3)

    Edit an installed package

    -

    npm-explore(3)

    +

    npm-explore(3)

    Browse an installed package

    -

    npm-help-search(3)

    +

    npm-help-search(3)

    Search the help pages

    -

    npm-init(3)

    +

    npm-init(3)

    Interactively create a package.json file

    -

    npm-install(3)

    +

    npm-install(3)

    install a package programmatically

    - +

    Symlink a package folder

    -

    npm-load(3)

    +

    npm-load(3)

    Load config settings

    -

    npm-ls(3)

    +

    npm-ls(3)

    List installed packages

    -

    npm-outdated(3)

    +

    npm-outdated(3)

    Check for outdated packages

    -

    npm-owner(3)

    +

    npm-owner(3)

    Manage package owners

    -

    npm-pack(3)

    +

    npm-pack(3)

    Create a tarball from a package

    -

    npm-ping(3)

    +

    npm-ping(3)

    Ping npm registry

    -

    npm-prefix(3)

    +

    npm-prefix(3)

    Display prefix

    -

    npm-prune(3)

    +

    npm-prune(3)

    Remove extraneous packages

    -

    npm-publish(3)

    +

    npm-publish(3)

    Publish a package

    -

    npm-rebuild(3)

    +

    npm-rebuild(3)

    Rebuild a package

    -

    npm-repo(3)

    +

    npm-repo(3)

    Open package repository page in the browser

    -

    npm-restart(3)

    +

    npm-restart(3)

    Restart a package

    -

    npm-root(3)

    +

    npm-root(3)

    Display npm root

    -

    npm-run-script(3)

    +

    npm-run-script(3)

    Run arbitrary package scripts

    -

    npm-search(3)

    +

    npm-search(3)

    Search for packages

    -

    npm-shrinkwrap(3)

    +

    npm-shrinkwrap(3)

    programmatically generate package shrinkwrap file

    -

    npm-start(3)

    +

    npm-start(3)

    Start a package

    -

    npm-stop(3)

    +

    npm-stop(3)

    Stop a package

    -

    npm-tag(3)

    +

    npm-tag(3)

    Tag a published version

    -

    npm-test(3)

    +

    npm-test(3)

    Test a package

    -

    npm-uninstall(3)

    +

    npm-uninstall(3)

    uninstall a package programmatically

    -

    npm-unpublish(3)

    +

    npm-unpublish(3)

    Remove a package from the registry

    -

    npm-update(3)

    +

    npm-update(3)

    Update a package

    -

    npm-version(3)

    +

    npm-version(3)

    Bump a package version

    -

    npm-view(3)

    +

    npm-view(3)

    View registry info

    -

    npm-whoami(3)

    +

    npm-whoami(3)

    Display npm username

    Files

    File system structures npm uses

    -

    npm-folders(5)

    +

    npm-folders(5)

    Folder Structures Used by npm

    -

    npmrc(5)

    +

    npmrc(5)

    The npm config files

    -

    package.json(5)

    +

    package.json(5)

    Specifics of npm's package.json handling

    Misc

    Various other bits and bobs

    -

    npm-coding-style(7)

    +

    npm-coding-style(7)

    npm's "funny" coding style

    -

    npm-config(7)

    +

    npm-config(7)

    More than you probably want to know about npm configuration

    -

    npm-developers(7)

    +

    npm-developers(7)

    Developer Guide

    -

    npm-disputes(7)

    +

    npm-disputes(7)

    Handling Module Name Disputes

    -

    npm-faq(7)

    +

    npm-faq(7)

    Frequently Asked Questions

    -

    npm-index(7)

    +

    npm-index(7)

    Index of all npm documentation

    -

    npm-registry(7)

    +

    npm-registry(7)

    The JavaScript Package Registry

    -

    npm-scope(7)

    +

    npm-scope(7)

    Scoped packages

    -

    npm-scripts(7)

    +

    npm-scripts(7)

    How npm handles the "scripts" field

    -

    removing-npm(7)

    +

    removing-npm(7)

    Cleaning the Slate

    -

    semver(7)

    +

    semver(7)

    The semantic versioner for npm

    @@ -240,5 +242,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index e1fc4ba8247..461d3c24c43 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -109,7 +109,7 @@ utility.

    logging the same object over and over again is not helpful. Logs should report what's happening so that it's easier to track down where a fault occurs.

    -

    Use appropriate log levels. See npm-config(7) and search for +

    Use appropriate log levels. See npm-config(7) and search for "loglevel".

    Case, naming, etc.

    Use lowerCamelCase for multiword identifiers when they refer to objects, @@ -131,9 +131,9 @@ set to anything."

    Boolean objects are verboten.

    SEE ALSO

    @@ -147,5 +147,5 @@ set to anything."

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index abd1fcec9f7..a6650b8dace 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -33,7 +33,7 @@ same.

  • global config file ($PREFIX/npmrc)
  • npm builtin config file (/path/to/npm/npmrc)
  • -

    See npmrc(5) for more details.

    +

    See npmrc(5) for more details.

    Default Configs

    A set of configuration parameters that are internal to npm, and are defaults if nothing else is specified.

    @@ -78,7 +78,7 @@ example:

    # same as: npm ls --global --parseable --long --loglevel info

    Per-Package Config Settings

    -

    When running scripts (see npm-scripts(7)) the package.json "config" +

    When running scripts (see npm-scripts(7)) the package.json "config" keys are overwritten in the environment if there is a config param of <name>[@<version>]:<key>. For example, if the package.json has this:

    @@ -89,7 +89,7 @@ this:

    http.createServer(...).listen(process.env.npm_package_config_port)
     

    then the user could change the behavior by doing:

    npm config set foo:port 80
    -

    See package.json(5) for more information.

    +

    See package.json(5) for more information.

    Config Settings

    access

      @@ -151,7 +151,7 @@ well as for the CA information to be stored in a file on disk.

    • Default: Windows: %AppData%\npm-cache, Posix: ~/.npm
    • Type: path
    -

    The location of npm's cache directory. See npm-cache(1)

    +

    The location of npm's cache directory. See npm-cache(1)

    cache-lock-stale

    • Default: 60000 (1 minute)
    • @@ -302,7 +302,7 @@ the git binary.

    Operates in "global" mode, so that packages are installed into the prefix folder instead of the current working directory. See -npm-folders(5) for more on the differences in behavior.

    +npm-folders(5) for more on the differences in behavior.

    SEE ALSO

    @@ -207,5 +207,5 @@ scripts is for compilation which must be done on the target architecture.        - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 64aaefcdfc7..f66fb5c34b7 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -38,12 +38,12 @@ around:

    Prior to version 0.3, npm used shim files for executables and node modules. To track those down, you can do the following:

    find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
    -

    (This is also in the README file.)

    +

    (This is also in the README file.)

    SEE ALSO

    @@ -57,5 +57,5 @@ modules. To track those down, you can do the following:

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 3dd74b37af3..374df55df18 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -282,5 +282,5 @@ range, use the satisfies(version, range) function.

           - + diff --git a/deps/npm/html/partial/doc/README.html b/deps/npm/html/partial/doc/README.html deleted file mode 100644 index 265dc198be3..00000000000 --- a/deps/npm/html/partial/doc/README.html +++ /dev/null @@ -1,163 +0,0 @@ -

    npm

    a JavaScript package manager

    -

    Build Status

    -

    SYNOPSIS

    -

    This is just enough info to get you up and running.

    -

    Much more info available via npm help once it's installed.

    -

    IMPORTANT

    -

    You need node v0.8 or higher to run this program.

    -

    To install an old and unsupported version of npm that works on node 0.3 -and prior, clone the git repo and dig through the old tags and branches.

    -

    Super Easy Install

    -

    npm comes with node now.

    -

    Windows Computers

    -

    Get the MSI. npm is in it.

    -

    Apple Macintosh Computers

    -

    Get the pkg. npm is in it.

    -

    Other Sorts of Unices

    -

    Run make install. npm will be installed with node.

    -

    If you want a more fancy pants install (a different version, customized -paths, etc.) then read on.

    -

    Fancy Install (Unix)

    -

    There's a pretty robust install script at -https://www.npmjs.com/install.sh. You can download that and run it.

    -

    Here's an example using curl:

    -
    curl -L https://www.npmjs.com/install.sh | sh
    -
    -

    Slightly Fancier

    -

    You can set any npm configuration params with that script:

    -
    npm_config_prefix=/some/path sh install.sh
    -
    -

    Or, you can run it in uber-debuggery mode:

    -
    npm_debug=1 sh install.sh
    -
    -

    Even Fancier

    -

    Get the code with git. Use make to build the docs and do other stuff. -If you plan on hacking on npm, make link is your friend.

    -

    If you've got the npm source code, you can also semi-permanently set -arbitrary config keys using the ./configure --key=val ..., and then -run npm commands by doing node cli.js <cmd> <args>. (This is helpful -for testing, or running stuff without actually installing npm itself.)

    -

    Windows Install or Upgrade

    -

    You can download a zip file from https://github.com/npm/npm/releases, and -unpack it in the node_modules\npm\ folder inside node's installation folder.

    -

    To upgrade to npm 2, follow the Windows upgrade instructions in -the npm Troubleshooting Guide:

    -

    https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

    -

    If that's not fancy enough for you, then you can fetch the code with -git, and mess with it directly.

    -

    Installing on Cygwin

    -

    No.

    -

    Uninstalling

    -

    So sad to see you go.

    -
    sudo npm uninstall npm -g
    -
    -

    Or, if that fails,

    -
    sudo make uninstall
    -
    -

    More Severe Uninstalling

    -

    Usually, the above instructions are sufficient. That will remove -npm, but leave behind anything you've installed.

    -

    If you would like to remove all the packages that you have installed, -then you can use the npm ls command to find them, and then npm rm to -remove them.

    -

    To remove cruft left behind by npm 0.x, you can use the included -clean-old.sh script file. You can run it conveniently like this:

    -
    npm explore npm -g -- sh scripts/clean-old.sh
    -
    -

    npm uses two configuration files, one for per-user configs, and another -for global (every-user) configs. You can view them by doing:

    -
    npm config get userconfig   # defaults to ~/.npmrc
    -npm config get globalconfig # defaults to /usr/local/etc/npmrc
    -
    -

    Uninstalling npm does not remove configuration files by default. You -must remove them yourself manually if you want them gone. Note that -this means that future npm installs will not remember the settings that -you have chosen.

    -

    Using npm Programmatically

    -

    Although npm can be used programmatically, its API is meant for use by the CLI -only, and no guarantees are made regarding its fitness for any other purpose. -If you want to use npm to reliably perform some task, the safest thing to do is -to invoke the desired npm command with appropriate arguments.

    -

    The semantic version of npm refers to the CLI itself, rather than the -underlying API. The internal API is not guaranteed to remain stable even when -npm's version indicates no breaking changes have been made according to -semver.

    -

    If you still would like to use npm programmatically, it's possible. The API -isn't very well documented, but it is rather simple.

    -

    Eventually, npm will be just a thin CLI wrapper around the modules that it -depends on, but for now, there are some things that only the CLI can do. You -should try using one of npm's dependencies first, and only use the API if what -you're trying to do is only supported by npm itself.

    -
    var npm = require("npm")
    -npm.load(myConfigObject, function (er) {
    -  if (er) return handlError(er)
    -  npm.commands.install(["some", "args"], function (er, data) {
    -    if (er) return commandFailed(er)
    -    // command succeeded, and data might have some info
    -  })
    -  npm.registry.log.on("log", function (message) { .... })
    -})
    -
    -

    The load function takes an object hash of the command-line configs. -The various npm.commands.<cmd> functions take an array of -positional argument strings. The last argument to any -npm.commands.<cmd> function is a callback. Some commands take other -optional arguments. Read the source.

    -

    You cannot set configs individually for any single npm function at this -time. Since npm is a singleton, any call to npm.config.set will -change the value for all npm commands in that process.

    -

    See ./bin/npm-cli.js for an example of pulling config values off of the -command line arguments using nopt. You may also want to check out npm -help config to learn about all the options you can set there.

    -

    More Docs

    -

    Check out the docs, -especially the faq.

    -

    You can use the npm help command to read any of them.

    -

    If you're a developer, and you want to use npm to publish your program, -you should read this

    - -

    "npm" and "The npm Registry" are owned by npm, Inc. -All rights reserved. See the included LICENSE file for more details.

    -

    "Node.js" and "node" are trademarks owned by Joyent, Inc.

    -

    Modules published on the npm registry are not officially endorsed by -npm, Inc. or the Node.js project.

    -

    Data published to the npm registry is not part of npm itself, and is -the sole property of the publisher. While every effort is made to -ensure accountability, there is absolutely no guarantee, warranty, or -assertion expressed or implied as to the quality, fitness for a -specific purpose, or lack of malice in any given npm package.

    -

    If you have a complaint about a package in the public npm registry, -and cannot resolve it with the package -owner, please email -support@npmjs.com and explain the situation.

    -

    Any data published to The npm Registry (including user account -information) may be removed or modified at the sole discretion of the -npm server administrators.

    -

    In plainer english

    -

    npm is the property of npm, Inc.

    -

    If you publish something, it's yours, and you are solely accountable -for it.

    -

    If other people publish something, it's theirs.

    -

    Users can publish Bad Stuff. It will be removed promptly if reported. -But there is no vetting process for published modules, and you use -them at your own risk. Please inspect the source.

    -

    If you publish Bad Stuff, we may delete it from the registry, or even -ban your account in extreme cases. So don't do that.

    -

    BUGS

    -

    When you find issues, please report them:

    - -

    Be sure to include all of the output from the npm command that didn't work -as expected. The npm-debug.log file is also helpful to provide.

    -

    You can also look for isaacs in #node.js on irc://irc.freenode.net. He -will no doubt tell you to put the output in a gist or email.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/api/npm-bin.html b/deps/npm/html/partial/doc/api/npm-bin.html deleted file mode 100644 index 54f895518ab..00000000000 --- a/deps/npm/html/partial/doc/api/npm-bin.html +++ /dev/null @@ -1,8 +0,0 @@ -

    npm-bin

    Display npm bin folder

    -

    SYNOPSIS

    -
    npm.commands.bin(args, cb)
    -

    DESCRIPTION

    -

    Print the folder where npm will install executables.

    -

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

    - diff --git a/deps/npm/html/partial/doc/api/npm-bugs.html b/deps/npm/html/partial/doc/api/npm-bugs.html deleted file mode 100644 index e9ff2a58aa5..00000000000 --- a/deps/npm/html/partial/doc/api/npm-bugs.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-bugs

    Bugs for a package in a web browser maybe

    -

    SYNOPSIS

    -
    npm.commands.bugs(package, callback)
    -

    DESCRIPTION

    -

    This command tries to guess at the likely location of a package's -bug tracker URL, and then tries to open it using the --browser -config param.

    -

    Like other commands, the first parameter is an array. This command only -uses the first element, which is expected to be a package name with an -optional version number.

    -

    This command will launch a browser, so this command may not be the most -friendly for programmatic use.

    - diff --git a/deps/npm/html/partial/doc/api/npm-cache.html b/deps/npm/html/partial/doc/api/npm-cache.html deleted file mode 100644 index b837a688695..00000000000 --- a/deps/npm/html/partial/doc/api/npm-cache.html +++ /dev/null @@ -1,22 +0,0 @@ -

    npm-cache

    manage the npm cache programmatically

    -

    SYNOPSIS

    -
    npm.commands.cache([args], callback)
    -
    -// helpers
    -npm.commands.cache.clean([args], callback)
    -npm.commands.cache.add([args], callback)
    -npm.commands.cache.read(name, version, forceBypass, callback)
    -

    DESCRIPTION

    -

    This acts much the same ways as the npm-cache(1) command line -functionality.

    -

    The callback is called with the package.json data of the thing that is -eventually added to or read from the cache.

    -

    The top level npm.commands.cache(...) functionality is a public -interface, and like all commands on the npm.commands object, it will -match the command line behavior exactly.

    -

    However, the cache folder structure and the cache helper functions are -considered internal API surface, and as such, may change in future -releases of npm, potentially without warning or significant version -incrementation.

    -

    Use at your own risk.

    - diff --git a/deps/npm/html/partial/doc/api/npm-commands.html b/deps/npm/html/partial/doc/api/npm-commands.html deleted file mode 100644 index eaf57af4af0..00000000000 --- a/deps/npm/html/partial/doc/api/npm-commands.html +++ /dev/null @@ -1,16 +0,0 @@ -

    npm-commands

    npm commands

    -

    SYNOPSIS

    -
    npm.commands[<command>](args, callback)
    -

    DESCRIPTION

    -

    npm comes with a full set of commands, and each of the commands takes a -similar set of arguments.

    -

    In general, all commands on the command object take an array of positional -argument strings. The last argument to any function is a callback. Some -commands are special and take other optional arguments.

    -

    All commands have their own man page. See man npm-<command> for command-line -usage, or man 3 npm-<command> for programmatic usage.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/api/npm-config.html b/deps/npm/html/partial/doc/api/npm-config.html deleted file mode 100644 index b34c02182d3..00000000000 --- a/deps/npm/html/partial/doc/api/npm-config.html +++ /dev/null @@ -1,37 +0,0 @@ -

    npm-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/partial/doc/api/npm-deprecate.html b/deps/npm/html/partial/doc/api/npm-deprecate.html deleted file mode 100644 index f0ef298b2a2..00000000000 --- a/deps/npm/html/partial/doc/api/npm-deprecate.html +++ /dev/null @@ -1,27 +0,0 @@ -

    npm-deprecate

    Deprecate a version of a package

    -

    SYNOPSIS

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

    DESCRIPTION

    -

    This command will update the npm registry entry for a package, providing -a deprecation warning to all who attempt to install it.

    -

    The 'args' parameter must have exactly two elements:

    -
      -
    • package[@version]

      -

      The version portion is optional, and may be either a range, or a - specific version, or a tag.

      -
    • -
    • message

      -

      The warning message that will be printed whenever a user attempts to - install the package.

      -
    • -
    -

    Note that you must be the package owner to deprecate something. See the -owner and adduser help topics.

    -

    To un-deprecate a package, specify an empty string ("") for the message argument.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/api/npm-docs.html b/deps/npm/html/partial/doc/api/npm-docs.html deleted file mode 100644 index dde38920fd1..00000000000 --- a/deps/npm/html/partial/doc/api/npm-docs.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-docs

    Docs for a package in a web browser maybe

    -

    SYNOPSIS

    -
    npm.commands.docs(package, callback)
    -

    DESCRIPTION

    -

    This command tries to guess at the likely location of a package's -documentation URL, and then tries to open it using the --browser -config param.

    -

    Like other commands, the first parameter is an array. This command only -uses the first element, which is expected to be a package name with an -optional version number.

    -

    This command will launch a browser, so this command may not be the most -friendly for programmatic use.

    - diff --git a/deps/npm/html/partial/doc/api/npm-edit.html b/deps/npm/html/partial/doc/api/npm-edit.html deleted file mode 100644 index ef49f94e14e..00000000000 --- a/deps/npm/html/partial/doc/api/npm-edit.html +++ /dev/null @@ -1,16 +0,0 @@ -

    npm-edit

    Edit an installed package

    -

    SYNOPSIS

    -
    npm.commands.edit(package, callback)
    -

    DESCRIPTION

    -

    Opens the package folder in the default editor (or whatever you've -configured as the npm editor config -- see npm help config.)

    -

    After it has been edited, the package is rebuilt so as to pick up any -changes in compiled packages.

    -

    For instance, you can do npm install connect to install connect -into your package, and then npm.commands.edit(["connect"], callback) -to make a few changes to your locally installed copy.

    -

    The first parameter is a string array with a single element, the package -to open. The package can optionally have a version number attached.

    -

    Since this command opens an editor in a new process, be careful about where -and how this is used.

    - diff --git a/deps/npm/html/partial/doc/api/npm-explore.html b/deps/npm/html/partial/doc/api/npm-explore.html deleted file mode 100644 index 60f3ac17802..00000000000 --- a/deps/npm/html/partial/doc/api/npm-explore.html +++ /dev/null @@ -1,11 +0,0 @@ -

    npm-explore

    Browse an installed package

    -

    SYNOPSIS

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

    DESCRIPTION

    -

    Spawn a subshell in the directory of the installed package specified.

    -

    If a command is specified, then it is run in the subshell, which then -immediately terminates.

    -

    Note that the package is not automatically rebuilt afterwards, so be -sure to use npm rebuild <pkg> if you make any changes.

    -

    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.

    - diff --git a/deps/npm/html/partial/doc/api/npm-help-search.html b/deps/npm/html/partial/doc/api/npm-help-search.html deleted file mode 100644 index 7818b6b1e74..00000000000 --- a/deps/npm/html/partial/doc/api/npm-help-search.html +++ /dev/null @@ -1,24 +0,0 @@ -

    npm-help-search

    Search the help pages

    -

    SYNOPSIS

    -
    npm.commands.helpSearch(args, [silent,] callback)
    -

    DESCRIPTION

    -

    This command is rarely useful, but it exists in the rare case that it is.

    -

    This command takes an array of search terms and returns the help pages that -match in order of best match.

    -

    If there is only one match, then npm displays that help section. If there -are multiple results, the results are printed to the screen formatted and the -array of results is returned. Each result is an object with these properties:

    -
      -
    • hits: -A map of args to number of hits on that arg. For example, {"npm": 3}
    • -
    • found: -Total number of unique args that matched.
    • -
    • totalHits: -Total number of hits.
    • -
    • lines: -An array of all matching lines (and some adjacent lines).
    • -
    • file: -Name of the file that matched
    • -
    -

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

    - diff --git a/deps/npm/html/partial/doc/api/npm-init.html b/deps/npm/html/partial/doc/api/npm-init.html deleted file mode 100644 index 723fbdebedb..00000000000 --- a/deps/npm/html/partial/doc/api/npm-init.html +++ /dev/null @@ -1,19 +0,0 @@ -

    npm init

    Interactively create a package.json file

    -

    SYNOPSIS

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

    DESCRIPTION

    -

    This will ask you a bunch of questions, and then write a package.json for you.

    -

    It attempts to make reasonable guesses about what you want things to be set to, -and then writes a package.json file with the options you've selected.

    -

    If you already have a package.json file, it'll read that first, and default to -the options in there.

    -

    It is strictly additive, so it does not delete options from your package.json -without a really good reason to do so.

    -

    Since this function expects to be run on the command-line, it doesn't work very -well as a programmatically. The best option is to roll your own, and since -JavaScript makes it stupid simple to output formatted JSON, that is the -preferred method. If you're sure you want to handle command-line prompting, -then go ahead and use this programmatically.

    -

    SEE ALSO

    -

    package.json(5)

    - diff --git a/deps/npm/html/partial/doc/api/npm-install.html b/deps/npm/html/partial/doc/api/npm-install.html deleted file mode 100644 index bfbd5668877..00000000000 --- a/deps/npm/html/partial/doc/api/npm-install.html +++ /dev/null @@ -1,12 +0,0 @@ -

    npm-install

    install a package programmatically

    -

    SYNOPSIS

    -
    npm.commands.install([where,] packages, callback)
    -

    DESCRIPTION

    -

    This acts much the same ways as installing on the command-line.

    -

    The 'where' parameter is optional and only used internally, and it specifies -where the packages should be installed to.

    -

    The 'packages' parameter is an array of strings. Each element in the array is -the name of a package to be installed.

    -

    Finally, 'callback' is a function that will be called when all packages have been -installed or when an error has been encountered.

    - diff --git a/deps/npm/html/partial/doc/api/npm-link.html b/deps/npm/html/partial/doc/api/npm-link.html deleted file mode 100644 index e2efe3ebc1f..00000000000 --- a/deps/npm/html/partial/doc/api/npm-link.html +++ /dev/null @@ -1,22 +0,0 @@ -

    npm-link

    Symlink a package folder

    -

    SYNOPSIS

    -
    npm.commands.link(callback)
    -npm.commands.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/partial/doc/api/npm-load.html b/deps/npm/html/partial/doc/api/npm-load.html deleted file mode 100644 index 0796cacdab6..00000000000 --- a/deps/npm/html/partial/doc/api/npm-load.html +++ /dev/null @@ -1,17 +0,0 @@ -

    npm-load

    Load config settings

    -

    SYNOPSIS

    -
    npm.load(conf, cb)
    -

    DESCRIPTION

    -

    npm.load() must be called before any other function call. Both parameters are -optional, but the second is recommended.

    -

    The first parameter is an object containing command-line config params, and the -second parameter is a callback that will be called when npm is loaded and ready -to serve.

    -

    The first parameter should follow a similar structure as the package.json -config object.

    -

    For example, to emulate the --dev flag, pass an object that looks like this:

    -
    {
    -  "dev": true
    -}
    -

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

    - diff --git a/deps/npm/html/partial/doc/api/npm-ls.html b/deps/npm/html/partial/doc/api/npm-ls.html deleted file mode 100644 index 850955b8361..00000000000 --- a/deps/npm/html/partial/doc/api/npm-ls.html +++ /dev/null @@ -1,43 +0,0 @@ -

    npm-ls

    List installed packages

    -

    SYNOPSIS

    -
    npm.commands.ls(args, [silent,] callback)
    -

    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 will also -return that data using the callback.

    -

    This command does not take any arguments, but args must be defined. -Beyond that, if any arguments are passed in, npm will politely warn that it -does not take positional arguments, though you may set config flags -like with any other command, such as global to list global packages.

    -

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

    -

    If the silent parameter is set to true, nothing will be output to the screen, -but the data will still be returned.

    -

    Callback is provided an error if one occurred, the full data about which -packages are installed and which dependencies they will receive, and a -"lite" data object which just shows which versions are installed where. -Note that the full data object is a circular structure, so care must be -taken if it is serialized to JSON.

    -

    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.

    -

    Note, if parseable is set or long isn't set, then duplicates will be trimmed. -This means that if a submodule has the same dependency as a parent module, then the -dependency will only be output once.

    - diff --git a/deps/npm/html/partial/doc/api/npm-outdated.html b/deps/npm/html/partial/doc/api/npm-outdated.html deleted file mode 100644 index 16d3150d3f7..00000000000 --- a/deps/npm/html/partial/doc/api/npm-outdated.html +++ /dev/null @@ -1,8 +0,0 @@ -

    npm-outdated

    Check for outdated packages

    -

    SYNOPSIS

    -
    npm.commands.outdated([packages,] callback)
    -

    DESCRIPTION

    -

    This command will check the registry to see if the specified packages are -currently outdated.

    -

    If the 'packages' parameter is left out, npm will check all packages.

    - diff --git a/deps/npm/html/partial/doc/api/npm-owner.html b/deps/npm/html/partial/doc/api/npm-owner.html deleted file mode 100644 index 20e8b6840e4..00000000000 --- a/deps/npm/html/partial/doc/api/npm-owner.html +++ /dev/null @@ -1,27 +0,0 @@ -

    npm-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/partial/doc/api/npm-pack.html b/deps/npm/html/partial/doc/api/npm-pack.html deleted file mode 100644 index 6417688673c..00000000000 --- a/deps/npm/html/partial/doc/api/npm-pack.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-pack

    Create a tarball from a package

    -

    SYNOPSIS

    -
    npm.commands.pack([packages,] callback)
    -

    DESCRIPTION

    -

    For anything that's installable (that is, a package folder, tarball, -tarball url, name@tag, name@version, or name), this command will fetch -it to the cache, and then copy the tarball to the current working -directory as <name>-<version>.tgz, and then write the filenames out to -stdout.

    -

    If the same package is specified multiple times, then the file will be -overwritten the second time.

    -

    If no arguments are supplied, then npm packs the current package folder.

    - diff --git a/deps/npm/html/partial/doc/api/npm-ping.html b/deps/npm/html/partial/doc/api/npm-ping.html deleted file mode 100644 index ac8a29e185c..00000000000 --- a/deps/npm/html/partial/doc/api/npm-ping.html +++ /dev/null @@ -1,8 +0,0 @@ -

    npm-ping

    Ping npm registry

    -

    SYNOPSIS

    -
    npm.registry.ping(registry, options, function (er, pong))
    -

    DESCRIPTION

    -

    Attempts to connect to the given registry, returning a pong -object with various metadata if it succeeds.

    -

    This function is primarily useful for debugging connection issues -to npm registries.

    diff --git a/deps/npm/html/partial/doc/api/npm-prefix.html b/deps/npm/html/partial/doc/api/npm-prefix.html deleted file mode 100644 index e9904b18d9f..00000000000 --- a/deps/npm/html/partial/doc/api/npm-prefix.html +++ /dev/null @@ -1,9 +0,0 @@ -

    npm-prefix

    Display prefix

    -

    SYNOPSIS

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

    DESCRIPTION

    -

    Print the prefix to standard out.

    -

    'args' is never used and callback is never called with data. -'args' must be present or things will break.

    -

    This function is not useful programmatically

    - diff --git a/deps/npm/html/partial/doc/api/npm-prune.html b/deps/npm/html/partial/doc/api/npm-prune.html deleted file mode 100644 index 5835a9b6a79..00000000000 --- a/deps/npm/html/partial/doc/api/npm-prune.html +++ /dev/null @@ -1,10 +0,0 @@ -

    npm-prune

    Remove extraneous packages

    -

    SYNOPSIS

    -
    npm.commands.prune([packages,] callback)
    -

    DESCRIPTION

    -

    This command removes "extraneous" packages.

    -

    The first parameter is optional, and it specifies packages to be removed.

    -

    No packages are specified, then all packages will be checked.

    -

    Extraneous packages are packages that are not listed on the parent -package's dependencies list.

    - diff --git a/deps/npm/html/partial/doc/api/npm-publish.html b/deps/npm/html/partial/doc/api/npm-publish.html deleted file mode 100644 index f0e5da91ba3..00000000000 --- a/deps/npm/html/partial/doc/api/npm-publish.html +++ /dev/null @@ -1,26 +0,0 @@ -

    npm-publish

    Publish a package

    -

    SYNOPSIS

    -
    npm.commands.publish([packages,] callback)
    -

    DESCRIPTION

    -

    Publishes a package to the registry so that it can be installed by name. -Possible values in the 'packages' array are:

    -
      -
    • <folder>: -A folder containing a package.json file

      -
    • -
    • <tarball>: -A url or file path to a gzipped tar archive containing a single folder -with a package.json file inside.

      -
    • -
    -

    If the package array is empty, npm will try to publish something in the -current working directory.

    -

    This command could fails if one of the packages specified already exists in -the registry. Overwrites when the "force" environment variable is set.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/api/npm-rebuild.html b/deps/npm/html/partial/doc/api/npm-rebuild.html deleted file mode 100644 index e428728a617..00000000000 --- a/deps/npm/html/partial/doc/api/npm-rebuild.html +++ /dev/null @@ -1,10 +0,0 @@ -

    npm-rebuild

    Rebuild a package

    -

    SYNOPSIS

    -
    npm.commands.rebuild([packages,] callback)
    -

    DESCRIPTION

    -

    This command runs the npm build command on each of the matched packages. This is useful -when you install a new version of node, and must recompile all your C++ addons with -the new binary. If no 'packages' parameter is specify, every package will be rebuilt.

    -

    CONFIGURATION

    -

    See npm help build

    - diff --git a/deps/npm/html/partial/doc/api/npm-repo.html b/deps/npm/html/partial/doc/api/npm-repo.html deleted file mode 100644 index 9a18976cd41..00000000000 --- a/deps/npm/html/partial/doc/api/npm-repo.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-repo

    Open package repository page in the browser

    -

    SYNOPSIS

    -
    npm.commands.repo(package, callback)
    -

    DESCRIPTION

    -

    This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the --browser -config param.

    -

    Like other commands, the first parameter is an array. This command only -uses the first element, which is expected to be a package name with an -optional version number.

    -

    This command will launch a browser, so this command may not be the most -friendly for programmatic use.

    - diff --git a/deps/npm/html/partial/doc/api/npm-restart.html b/deps/npm/html/partial/doc/api/npm-restart.html deleted file mode 100644 index f0de7504a5b..00000000000 --- a/deps/npm/html/partial/doc/api/npm-restart.html +++ /dev/null @@ -1,32 +0,0 @@ -

    npm-restart

    Restart a package

    -

    SYNOPSIS

    -
    npm.commands.restart(packages, callback)
    -

    DESCRIPTION

    -

    This restarts a package (or multiple packages).

    -

    This runs a package's "stop", "restart", and "start" scripts, and associated -pre- and post- scripts, in the order given below:

    -
      -
    1. prerestart
    2. -
    3. prestop
    4. -
    5. stop
    6. -
    7. poststop
    8. -
    9. restart
    10. -
    11. prestart
    12. -
    13. start
    14. -
    15. poststart
    16. -
    17. postrestart
    18. -
    -

    If no version is specified, then it restarts the "active" version.

    -

    npm can restart multiple packages. Just specify multiple packages in -the packages parameter.

    -

    NOTE

    -

    Note that the "restart" script is run in addition to the "stop" -and "start" scripts, not instead of them.

    -

    This is the behavior as of npm major version 2. A change in this -behavior will be accompanied by an increase in major version number

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/api/npm-root.html b/deps/npm/html/partial/doc/api/npm-root.html deleted file mode 100644 index 1549515122e..00000000000 --- a/deps/npm/html/partial/doc/api/npm-root.html +++ /dev/null @@ -1,9 +0,0 @@ -

    npm-root

    Display npm root

    -

    SYNOPSIS

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

    DESCRIPTION

    -

    Print the effective node_modules folder to standard out.

    -

    'args' is never used and callback is never called with data. -'args' must be present or things will break.

    -

    This function is not useful programmatically.

    - diff --git a/deps/npm/html/partial/doc/api/npm-run-script.html b/deps/npm/html/partial/doc/api/npm-run-script.html deleted file mode 100644 index 7cc42b601ad..00000000000 --- a/deps/npm/html/partial/doc/api/npm-run-script.html +++ /dev/null @@ -1,21 +0,0 @@ -

    npm-run-script

    Run arbitrary package scripts

    -

    SYNOPSIS

    -
    npm.commands.run-script(args, callback)
    -

    DESCRIPTION

    -

    This runs an arbitrary command from a package's "scripts" object.

    -

    It is used by the test, start, restart, and stop commands, but can be -called directly, as well.

    -

    The 'args' parameter is an array of strings. Behavior depends on the number -of elements. If there is only one element, npm assumes that the element -represents a command to be run on the local repository. If there is more than -one element, then the first is assumed to be the package and the second is -assumed to be the command to run. All other elements are ignored.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/api/npm-search.html b/deps/npm/html/partial/doc/api/npm-search.html deleted file mode 100644 index 13cceb3d321..00000000000 --- a/deps/npm/html/partial/doc/api/npm-search.html +++ /dev/null @@ -1,33 +0,0 @@ -

    npm-search

    Search for packages

    -

    SYNOPSIS

    -
    npm.commands.search(searchTerms, [silent,] [staleness,] callback)
    -

    DESCRIPTION

    -

    Search the registry for packages matching the search terms. The available parameters are:

    -
      -
    • searchTerms: -Array of search terms. These terms are case-insensitive.
    • -
    • silent: -If true, npm will not log anything to the console.
    • -
    • staleness: -This is the threshold for stale packages. "Fresh" packages are not refreshed -from the registry. This value is measured in seconds.
    • -
    • callback: -Returns an object where each key is the name of a package, and the value -is information about that package along with a 'words' property, which is -a space-delimited string of all of the interesting words in that package. -The only properties included are those that are searched, which generally include:

      -
        -
      • name
      • -
      • description
      • -
      • maintainers
      • -
      • url
      • -
      • keywords
      • -
      -
    • -
    -

    A search on the registry excludes any result that does not match all of the -search terms. It also removes any items from the results that contain an -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).

    - diff --git a/deps/npm/html/partial/doc/api/npm-shrinkwrap.html b/deps/npm/html/partial/doc/api/npm-shrinkwrap.html deleted file mode 100644 index b5f33599989..00000000000 --- a/deps/npm/html/partial/doc/api/npm-shrinkwrap.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-shrinkwrap

    programmatically generate package shrinkwrap file

    -

    SYNOPSIS

    -
    npm.commands.shrinkwrap(args, [silent,] callback)
    -

    DESCRIPTION

    -

    This acts much the same ways as shrinkwrapping on the command-line.

    -

    This command does not take any arguments, but 'args' must be defined. -Beyond that, if any arguments are passed in, npm will politely warn that it -does not take positional arguments.

    -

    If the 'silent' parameter is set to true, nothing will be output to the screen, -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/partial/doc/api/npm-start.html b/deps/npm/html/partial/doc/api/npm-start.html deleted file mode 100644 index 98bd41f6b24..00000000000 --- a/deps/npm/html/partial/doc/api/npm-start.html +++ /dev/null @@ -1,8 +0,0 @@ -

    npm-start

    Start a package

    -

    SYNOPSIS

    -
    npm.commands.start(packages, callback)
    -

    DESCRIPTION

    -

    This runs a package's "start" script, if one was provided.

    -

    npm can start multiple packages. Just specify multiple packages in the -packages parameter.

    - diff --git a/deps/npm/html/partial/doc/api/npm-stop.html b/deps/npm/html/partial/doc/api/npm-stop.html deleted file mode 100644 index 5b58289ed84..00000000000 --- a/deps/npm/html/partial/doc/api/npm-stop.html +++ /dev/null @@ -1,8 +0,0 @@ -

    npm-stop

    Stop a package

    -

    SYNOPSIS

    -
    npm.commands.stop(packages, callback)
    -

    DESCRIPTION

    -

    This runs a package's "stop" script, if one was provided.

    -

    npm can run stop on multiple packages. Just specify multiple packages -in the packages parameter.

    - diff --git a/deps/npm/html/partial/doc/api/npm-tag.html b/deps/npm/html/partial/doc/api/npm-tag.html deleted file mode 100644 index 227c91b46ca..00000000000 --- a/deps/npm/html/partial/doc/api/npm-tag.html +++ /dev/null @@ -1,16 +0,0 @@ -

    npm-tag

    Tag a published version

    -

    SYNOPSIS

    -
    npm.commands.tag(package@version, tag, callback)
    -

    DESCRIPTION

    -

    Tags the specified version of the package with the specified tag, or the ---tag config if not specified.

    -

    The 'package@version' is an array of strings, but only the first two elements are -currently used.

    -

    The first element must be in the form package@version, where package -is the package name and version is the version number (much like installing a -specific version).

    -

    The second element is the name of the tag to tag this version with. If this -parameter is missing or falsey (empty), the default from the config will be -used. For more information about how to set this config, check -man 3 npm-config for programmatic usage or man npm-config for cli usage.

    - diff --git a/deps/npm/html/partial/doc/api/npm-test.html b/deps/npm/html/partial/doc/api/npm-test.html deleted file mode 100644 index 9c35bdcfdb8..00000000000 --- a/deps/npm/html/partial/doc/api/npm-test.html +++ /dev/null @@ -1,10 +0,0 @@ -

    npm-test

    Test a package

    -

    SYNOPSIS

    -
      npm.commands.test(packages, callback)
    -

    DESCRIPTION

    -

    This runs a package's "test" script, if one was provided.

    -

    To run tests as a condition of installation, set the npat config to -true.

    -

    npm can run tests on multiple packages. Just specify multiple packages -in the packages parameter.

    - diff --git a/deps/npm/html/partial/doc/api/npm-uninstall.html b/deps/npm/html/partial/doc/api/npm-uninstall.html deleted file mode 100644 index 62369e4c7c6..00000000000 --- a/deps/npm/html/partial/doc/api/npm-uninstall.html +++ /dev/null @@ -1,10 +0,0 @@ -

    npm-uninstall

    uninstall a package programmatically

    -

    SYNOPSIS

    -
    npm.commands.uninstall(packages, callback)
    -

    DESCRIPTION

    -

    This acts much the same ways as uninstalling on the command-line.

    -

    The 'packages' parameter is an array of strings. Each element in the array is -the name of a package to be uninstalled.

    -

    Finally, 'callback' is a function that will be called when all packages have been -uninstalled or when an error has been encountered.

    - diff --git a/deps/npm/html/partial/doc/api/npm-unpublish.html b/deps/npm/html/partial/doc/api/npm-unpublish.html deleted file mode 100644 index ed9948cd849..00000000000 --- a/deps/npm/html/partial/doc/api/npm-unpublish.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-unpublish

    Remove a package from the registry

    -

    SYNOPSIS

    -
    npm.commands.unpublish(package, callback)
    -

    DESCRIPTION

    -

    This removes a package version from the registry, deleting its -entry and removing the tarball.

    -

    The package parameter must be defined.

    -

    Only the first element in the package parameter is used. If there is no first -element, then npm assumes that the package at the current working directory -is what is meant.

    -

    If no version is specified, or if all versions are removed then -the root package entry is removed from the registry entirely.

    - diff --git a/deps/npm/html/partial/doc/api/npm-update.html b/deps/npm/html/partial/doc/api/npm-update.html deleted file mode 100644 index 5d48bc0d8ec..00000000000 --- a/deps/npm/html/partial/doc/api/npm-update.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-update

    Update a package

    -

    SYNOPSIS

    -
    npm.commands.update(packages, callback)
    -

    DESCRIPTION

    -

    Updates a package, upgrading it to the latest version. It also installs any -missing packages.

    -

    The packages argument is an array of packages to update. The callback -parameter will be called when done or when an error occurs.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/api/npm-version.html b/deps/npm/html/partial/doc/api/npm-version.html deleted file mode 100644 index c2b8d5eb8b9..00000000000 --- a/deps/npm/html/partial/doc/api/npm-version.html +++ /dev/null @@ -1,12 +0,0 @@ -

    npm-version

    Bump a package version

    -

    SYNOPSIS

    -
    npm.commands.version(newversion, callback)
    -

    DESCRIPTION

    -

    Run this in a package directory to bump the version and write the new -data back to the package.json file.

    -

    If run in a git repo, it will also create a version commit and tag, and -fail if the repo is not clean.

    -

    Like all other commands, this function takes a string array as its first -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.

    - diff --git a/deps/npm/html/partial/doc/api/npm-view.html b/deps/npm/html/partial/doc/api/npm-view.html deleted file mode 100644 index 4f5acf62439..00000000000 --- a/deps/npm/html/partial/doc/api/npm-view.html +++ /dev/null @@ -1,61 +0,0 @@ -

    npm-view

    View registry info

    -

    SYNOPSIS

    -
    npm.commands.view(args, [silent,] callback)
    -

    DESCRIPTION

    -

    This command shows data about a package and prints it to the stream -referenced by the outfd config, which defaults to stdout.

    -

    The "args" parameter is an ordered list that closely resembles the command-line -usage. The elements should be ordered such that the first element is -the package and version (package@version). The version is optional. After that, -the rest of the parameters are fields with optional subfields ("field.subfield") -which can be used to get only the information desired from the registry.

    -

    The callback will be passed all of the data returned by the query.

    -

    For example, to get the package registry entry for the connect package, -you can do this:

    -
    npm.commands.view(["connect"], callback)
    -

    If no version is specified, "latest" is assumed.

    -

    Field names can be specified after the package descriptor. -For example, to show the dependencies of the ronn package at version -0.3.5, you could do the following:

    -
    npm.commands.view(["ronn@0.3.5", "dependencies"], callback)
    -

    You can view child field by separating them with a period. -To view the git repository URL for the latest version of npm, you could -do this:

    -
    npm.commands.view(["npm", "repository.url"], callback)
    -

    For fields that are arrays, requesting a non-numeric field will return -all of the values from the objects in the list. For example, to get all -the contributor names for the "express" project, you can do this:

    -
    npm.commands.view(["express", "contributors.email"], callback)
    -

    You may also use numeric indices in square braces to specifically select -an item in an array field. To just get the email address of the first -contributor in the list, you can do this:

    -
    npm.commands.view(["express", "contributors[0].email"], callback)
    -

    Multiple fields may be specified, and will be printed one after another. -For exampls, to get all the contributor names and email addresses, you -can do this:

    -
    npm.commands.view(["express", "contributors.name", "contributors.email"], callback)
    -

    "Person" fields are shown as a string if they would be shown as an -object. So, for example, this will show the list of npm contributors in -the shortened string format. (See npm help json for more on this.)

    -
    npm.commands.view(["npm", "contributors"], callback)
    -

    If a version range is provided, then data will be printed for every -matching version of the package. This will show which version of jsdom -was required by each matching version of yui3:

    -
    npm.commands.view(["yui3@'>0.5.4'", "dependencies.jsdom"], callback)
    -

    OUTPUT

    -

    If only a single string field for a single version is output, then it -will not be colorized or quoted, so as to enable piping the output to -another command.

    -

    If the version range matches multiple versions, than each printed value -will be prefixed with the version it applies to.

    -

    If multiple fields are requested, than each of them are prefixed with -the field name.

    -

    Console output can be disabled by setting the 'silent' parameter to true.

    -

    RETURN VALUE

    -

    The data returned will be an object in this formation:

    -
    { <version>:
    -  { <field>: <value>
    -  , ... }
    -, ... }
    -

    corresponding to the list of fields selected.

    - diff --git a/deps/npm/html/partial/doc/api/npm-whoami.html b/deps/npm/html/partial/doc/api/npm-whoami.html deleted file mode 100644 index 3428a9e7677..00000000000 --- a/deps/npm/html/partial/doc/api/npm-whoami.html +++ /dev/null @@ -1,9 +0,0 @@ -

    npm-whoami

    Display npm username

    -

    SYNOPSIS

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

    DESCRIPTION

    -

    Print the username config to standard output.

    -

    'args' is never used and callback is never called with data. -'args' must be present or things will break.

    -

    This function is not useful programmatically

    - diff --git a/deps/npm/html/partial/doc/api/npm.html b/deps/npm/html/partial/doc/api/npm.html deleted file mode 100644 index 5c57fd4bd75..00000000000 --- a/deps/npm/html/partial/doc/api/npm.html +++ /dev/null @@ -1,89 +0,0 @@ -

    npm

    javascript package manager

    -

    SYNOPSIS

    -
    var npm = require("npm")
    -npm.load([configObject, ]function (er, npm) {
    -  // use the npm object, now that it's loaded.
    -
    -  npm.config.set(key, val)
    -  val = npm.config.get(key)
    -
    -  console.log("prefix = %s", npm.prefix)
    -
    -  npm.commands.install(["package"], cb)
    -})
    -

    VERSION

    -

    2.13.3

    -

    DESCRIPTION

    -

    This is the API documentation for npm. -To find documentation of the command line -client, see npm(1).

    -

    Prior to using npm's commands, npm.load() must be called. If you provide -configObject as an object map of top-level configs, they override the values -stored in the various config locations. In the npm command line client, this -set of configs is parsed from the command line options. Additional -configuration params are loaded from two configuration files. See -npm-config(1), npm-config(7), and npmrc(5) for more information.

    -

    After that, each of the functions are accessible in the -commands object: npm.commands.<cmd>. See npm-index(7) for a list of -all possible commands.

    -

    All commands on the command object take an array of positional argument -strings. The last argument to any function is a callback. Some -commands take other optional arguments.

    -

    Configs cannot currently be set on a per function basis, as each call to -npm.config.set will change the value for all npm commands in that process.

    -

    To find API documentation for a specific command, run the npm apihelp -command.

    -

    METHODS AND PROPERTIES

    -
      -
    • npm.load(configs, cb)

      -

      Load the configuration params, and call the cb function once the - globalconfig and userconfig files have been loaded as well, or on - nextTick if they've already been loaded.

      -
    • -
    • npm.config

      -

      An object for accessing npm configuration parameters.

      -
        -
      • npm.config.get(key)
      • -
      • npm.config.set(key, val)
      • -
      • npm.config.del(key)
      • -
      -
    • -
    • npm.dir or npm.root

      -

      The node_modules directory where npm will operate.

      -
    • -
    • npm.prefix

      -

      The prefix where npm is operating. (Most often the current working - directory.)

      -
    • -
    • npm.cache

      -

      The place where npm keeps JSON and tarballs it fetches from the - registry (or uploads to the registry).

      -
    • -
    • npm.tmp

      -

      npm's temporary working directory.

      -
    • -
    • npm.deref

      -

      Get the "real" name for a command that has either an alias or - abbreviation.

      -
    • -
    -

    MAGIC

    -

    For each of the methods in the npm.commands object, a method is added to the -npm object, which takes a set of positional string arguments rather than an -array and a callback.

    -

    If the last argument is a callback, then it will use the supplied -callback. However, if no callback is provided, then it will print out -the error or results.

    -

    For example, this would work in a node repl:

    -
    > npm = require("npm")
    -> npm.load()  // wait a sec...
    -> npm.install("dnode", "express")
    -

    Note that that won't work in a node program, since the install -method will get called before the configuration load is completed.

    -

    ABBREVS

    -

    In order to support npm ins foo instead of npm install foo, the -npm.commands object has a set of abbreviations as well as the full -method names. Use the npm.deref method to find the real name.

    -

    For example:

    -
    var cmd = npm.deref("unp") // cmd === "unpublish"
    -
    diff --git a/deps/npm/html/partial/doc/cli/npm-access.html b/deps/npm/html/partial/doc/cli/npm-access.html deleted file mode 100644 index 9d84e6db958..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-access.html +++ /dev/null @@ -1,55 +0,0 @@ -

    npm-access

    Set access level on published packages

    -

    SYNOPSIS

    -
    npm access public [<package>]
    -npm access restricted [<package>]
    -
    -npm access add <read-only|read-write> <entity> [<package>]
    -npm access rm <entity> [<package>]
    -
    -npm access ls [<package>]
    -npm access edit [<package>]
    -

    DESCRIPTION

    -

    Used to set access controls on private packages.

    -

    For all of the subcommands, npm access will perform actions on the packages -in the current working directory if no package name is passed to the -subcommand.

    -
      -
    • public / restricted: -Set a package to be either publicly accessible or restricted.

      -
    • -
    • add / rm: -Add or remove the ability of users and teams to have read-only or read-write -access to a package.

      -
    • -
    • ls: -Show all of the access privileges for a package. Will only show permissions -for packages to which you have at least read access.

      -
    • -
    • edit: -Set the access privileges for a package at once using $EDITOR.

      -
    • -
    -

    DETAILS

    -

    npm access always operates directly on the current registry, configurable -from the command line using --registry=<registry url>.

    -

    Unscoped packages are always public.

    -

    Scoped packages default to restricted, but you can either publish them as -public using npm publish --access=public, or set their access as public using -npm access public after the initial publish.

    -

    You must have privileges to set the access of a package:

    -
      -
    • You are an owner of an unscoped or scoped package.
    • -
    • You are a member of the team that owns a scope.
    • -
    • You have been given read-write privileges for a package, either as a member -of a team or directly as an owner.
    • -
    -

    If your account is not paid, then attempts to publish scoped packages will fail -with an HTTP 402 status code (logically enough), unless you use ---access=public.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-adduser.html b/deps/npm/html/partial/doc/cli/npm-adduser.html deleted file mode 100644 index ce2c5dcce6f..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-adduser.html +++ /dev/null @@ -1,48 +0,0 @@ -

    npm-adduser

    Add a registry user account

    -

    SYNOPSIS

    -
    npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
    -

    DESCRIPTION

    -

    Create or verify a user named <username> in the specified registry, and -save the credentials to the .npmrc file. If no registry is specified, -the default registry will be used (see npm-config(7)).

    -

    The username, password, and email are read in from prompts.

    -

    To reset your password, go to https://www.npmjs.com/forgot

    -

    To change your email address, go to https://www.npmjs.com/email-edit

    -

    You may use this command multiple times with the same user account to -authorize on a new machine. When authenticating on a new machine, -the username, password and email address must all match with -your existing record.

    -

    npm login is an alias to adduser and behaves exactly the same way.

    -

    CONFIGURATION

    -

    registry

    -

    Default: http://registry.npmjs.org/

    -

    The base URL of the npm package registry. If scope is also specified, -this registry will only be used for packages with that scope. See npm-scope(7).

    -

    scope

    -

    Default: none

    -

    If specified, the user and login credentials given will be associated -with the specified scope. See npm-scope(7). You can use both at the same time, -e.g.

    -
    npm adduser --registry=http://myregistry.example.com --scope=@myco
    -

    This will set a registry for the given scope and login or create a user for -that registry at the same time.

    -

    always-auth

    -

    Default: false

    -

    If specified, save configuration indicating that all requests to the given -registry should include authorization information. Useful for private -registries. Can be used with --registry and / or --scope, e.g.

    -
    npm adduser --registry=http://private-registry.example.com --always-auth
    -

    This will ensure that all requests to that registry (including for tarballs) -include an authorization header. See always-auth in npm-config(7) for more -details on always-auth. Registry-specific configuration of always-auth takes -precedence over any global configuration.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-bin.html b/deps/npm/html/partial/doc/cli/npm-bin.html deleted file mode 100644 index 1485681b5f6..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-bin.html +++ /dev/null @@ -1,15 +0,0 @@ -

    npm-bin

    Display npm bin folder

    -

    SYNOPSIS

    -
    npm bin
    -

    DESCRIPTION

    -

    Print the folder where npm will install executables.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-bugs.html b/deps/npm/html/partial/doc/cli/npm-bugs.html deleted file mode 100644 index d40152e3884..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-bugs.html +++ /dev/null @@ -1,34 +0,0 @@ -

    npm-bugs

    Bugs for a package in a web browser maybe

    -

    SYNOPSIS

    -
    npm bugs <pkgname>
    -npm bugs (with no args in a package dir)
    -

    DESCRIPTION

    -

    This command tries to guess at the likely location of a package's -bug tracker URL, and then tries to open it using the --browser -config param. If no package name is provided, it will search for -a package.json in the current folder and use the name property.

    -

    CONFIGURATION

    -

    browser

    -
      -
    • Default: OS X: "open", Windows: "start", Others: "xdg-open"
    • -
    • Type: String
    • -
    -

    The browser that is called by the npm bugs command to open websites.

    -

    registry

    - -

    The base URL of the npm package registry.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-build.html b/deps/npm/html/partial/doc/cli/npm-build.html deleted file mode 100644 index 11ba89b11f8..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-build.html +++ /dev/null @@ -1,20 +0,0 @@ -

    npm-build

    Build a package

    -

    SYNOPSIS

    -
    npm build <package-folder>
    -
      -
    • <package-folder>: -A folder containing a package.json file in its root.
    • -
    -

    DESCRIPTION

    -

    This is the plumbing command called by npm link and npm install.

    -

    It should generally be called during installation, but if you need to run it -directly, run:

    -
    npm run-script build
    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-bundle.html b/deps/npm/html/partial/doc/cli/npm-bundle.html deleted file mode 100644 index 38bbdd83e38..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-bundle.html +++ /dev/null @@ -1,11 +0,0 @@ -

    npm-bundle

    REMOVED

    -

    DESCRIPTION

    -

    The npm bundle command has been removed in 1.0, for the simple reason -that it is no longer necessary, as the default behavior is now to -install packages into the local space.

    -

    Just use npm install now to do what npm bundle used to do.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-cache.html b/deps/npm/html/partial/doc/cli/npm-cache.html deleted file mode 100644 index f1a3b189643..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-cache.html +++ /dev/null @@ -1,61 +0,0 @@ -

    npm-cache

    Manipulates packages cache

    -

    SYNOPSIS

    -
    npm cache add <tarball file>
    -npm cache add <folder>
    -npm cache add <tarball url>
    -npm cache add <name>@<version>
    -
    -npm cache ls [<path>]
    -
    -npm cache clean [<path>]
    -

    DESCRIPTION

    -

    Used to add, list, or clear the npm cache folder.

    -
      -
    • add: -Add the specified package to the local cache. This command is primarily -intended to be used internally by npm, but it can provide a way to -add data to the local installation cache explicitly.

      -
    • -
    • ls: -Show the data in the cache. Argument is a path to show in the cache -folder. Works a bit like the find program, but limited by the -depth config.

      -
    • -
    • clean: -Delete data out of the cache folder. If an argument is provided, then -it specifies a subpath to delete. If no argument is provided, then -the entire cache is cleared.

      -
    • -
    -

    DETAILS

    -

    npm stores cache data in the directory specified in npm config get cache. -For each package that is added to the cache, three pieces of information are -stored in {cache}/{name}/{version}:

    -
      -
    • .../package/package.json: -The package.json file, as npm sees it.
    • -
    • .../package.tgz: -The tarball for that version.
    • -
    -

    Additionally, whenever a registry request is made, a .cache.json file -is placed at the corresponding URI, to store the ETag and the requested -data. This is stored in {cache}/{hostname}/{path}/.cache.json.

    -

    Commands that make non-essential registry requests (such as search and -view, or the completion scripts) generally specify a minimum timeout. -If the .cache.json file is younger than the specified timeout, then -they do not make an HTTP request to the registry.

    -

    CONFIGURATION

    -

    cache

    -

    Default: ~/.npm on Posix, or %AppData%/npm-cache on Windows.

    -

    The root cache folder.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-completion.html b/deps/npm/html/partial/doc/cli/npm-completion.html deleted file mode 100644 index 1c9879337a5..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-completion.html +++ /dev/null @@ -1,22 +0,0 @@ -

    npm-completion

    Tab Completion for npm

    -

    SYNOPSIS

    -
    . <(npm completion)
    -

    DESCRIPTION

    -

    Enables tab-completion in all npm commands.

    -

    The synopsis above -loads the completions into your current shell. Adding it to -your ~/.bashrc or ~/.zshrc will make the completions available -everywhere.

    -

    You may of course also pipe the output of npm completion to a file -such as /usr/local/etc/bash_completion.d/npm if you have a system -that will read that file for you.

    -

    When COMP_CWORD, COMP_LINE, and COMP_POINT are defined in the -environment, npm completion acts in "plumbing mode", and outputs -completions based on the arguments.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-config.html b/deps/npm/html/partial/doc/cli/npm-config.html deleted file mode 100644 index 3fee266c1c0..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-config.html +++ /dev/null @@ -1,46 +0,0 @@ -

    npm-config

    Manage the npm configuration files

    -

    SYNOPSIS

    -
    npm config set <key> <value> [--global]
    -npm config get <key>
    -npm config delete <key>
    -npm config list
    -npm config edit
    -npm c [set|get|delete|list]
    -npm get <key>
    -npm set <key> <value> [--global]
    -

    DESCRIPTION

    -

    npm gets its config settings from the command line, environment -variables, npmrc files, and in some cases, the package.json file.

    -

    See npmrc(5) for more information about the npmrc files.

    -

    See npm-config(7) for a more thorough discussion of the mechanisms -involved.

    -

    The npm config command can be used to update and edit the contents -of the user and global npmrc files.

    -

    Sub-commands

    -

    Config supports the following sub-commands:

    -

    set

    -
    npm config set key value
    -

    Sets the config key to the value.

    -

    If value is omitted, then it sets it to "true".

    -

    get

    -
    npm config get key
    -

    Echo the config value to stdout.

    -

    list

    -
    npm config list
    -

    Show all the config settings.

    -

    delete

    -
    npm config delete key
    -

    Deletes the key from all configuration files.

    -

    edit

    -
    npm config edit
    -

    Opens the config file in an editor. Use the --global flag to edit the -global config.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-dedupe.html b/deps/npm/html/partial/doc/cli/npm-dedupe.html deleted file mode 100644 index 56a37c32db0..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-dedupe.html +++ /dev/null @@ -1,43 +0,0 @@ -

    npm-dedupe

    Reduce duplication

    -

    SYNOPSIS

    -
    npm dedupe [package names...]
    -npm ddp [package names...]
    -

    DESCRIPTION

    -

    Searches the local package tree and attempts to simplify the overall -structure by moving dependencies further up the tree, where they can -be more effectively shared by multiple dependent packages.

    -

    For example, consider this dependency graph:

    -
    a
    -+-- b <-- depends on c@1.0.x
    -|   `-- c@1.0.3
    -`-- d <-- depends on c@~1.0.9
    -    `-- c@1.0.10
    -

    In this case, npm-dedupe(1) will transform the tree to:

    -
    a
    -+-- b
    -+-- d
    -`-- c@1.0.10
    -

    Because of the hierarchical nature of node's module lookup, b and d -will both get their dependency met by the single c package at the root -level of the tree.

    -

    If a suitable version exists at the target location in the tree -already, then it will be left untouched, but the other duplicates will -be deleted.

    -

    If no suitable version can be found, then a warning is printed, and -nothing is done.

    -

    If any arguments are supplied, then they are filters, and only the -named packages will be touched.

    -

    Note that this operation transforms the dependency tree, and may -result in packages getting updated versions, perhaps from the npm -registry.

    -

    This feature is experimental, and may change in future versions.

    -

    The --tag argument will apply to all of the affected dependencies. If a -tag with the given name exists, the tagged version is preferred over newer -versions.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-deprecate.html b/deps/npm/html/partial/doc/cli/npm-deprecate.html deleted file mode 100644 index 0657facd8ef..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-deprecate.html +++ /dev/null @@ -1,18 +0,0 @@ -

    npm-deprecate

    Deprecate a version of a package

    -

    SYNOPSIS

    -
    npm deprecate <name>[@<version>] <message>
    -

    DESCRIPTION

    -

    This command will update the npm registry entry for a package, providing -a deprecation warning to all who attempt to install it.

    -

    It works on version ranges as well as specific versions, so you can do -something like this:

    -
    npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
    -

    Note that you must be the package owner to deprecate something. See the -owner and adduser help topics.

    -

    To un-deprecate a package, specify an empty string ("") for the message argument.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-dist-tag.html b/deps/npm/html/partial/doc/cli/npm-dist-tag.html deleted file mode 100644 index e99e059aee4..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-dist-tag.html +++ /dev/null @@ -1,57 +0,0 @@ -

    npm-dist-tag

    Modify package distribution tags

    -

    SYNOPSIS

    -
    npm dist-tag add <pkg>@<version> [<tag>]
    -npm dist-tag rm <pkg> <tag>
    -npm dist-tag ls [<pkg>]
    -

    DESCRIPTION

    -

    Add, remove, and enumerate distribution tags on a package:

    -
      -
    • add: -Tags the specified version of the package with the specified tag, or the ---tag config if not specified.

      -
    • -
    • rm: -Clear a tag that is no longer in use from the package.

      -
    • -
    • ls: -Show all of the dist-tags for a package, defaulting to the package in -the current prefix.

      -
    • -
    -

    A tag can be used when installing packages as a reference to a version instead -of using a specific version number:

    -
    npm install <name>@<tag>
    -

    When installing dependencies, a preferred tagged version may be specified:

    -
    npm install --tag <tag>
    -

    This also applies to npm dedupe.

    -

    Publishing a package sets the "latest" tag to the published version unless the ---tag option is used. For example, npm publish --tag=beta.

    -

    PURPOSE

    -

    Tags can be used to provide an alias instead of version numbers. For -example, npm currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version.

    -

    A project might choose to have multiple streams of development, e.g., -"stable", "canary".

    -

    CAVEATS

    -

    This command used to be known as npm tag, which only created new tags, and so -had a different syntax.

    -

    Tags must share a namespace with version numbers, because they are specified in -the same slot: npm install <pkg>@<version> vs npm install <pkg>@<tag>.

    -

    Tags that can be interpreted as valid semver ranges will be rejected. For -example, v1.4 cannot be used as a tag, because it is interpreted by semver as ->=1.4.0 <1.5.0. See https://github.com/npm/npm/issues/6082.

    -

    The simplest way to avoid semver problems with tags is to use tags that do not -begin with a number or the letter v.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-docs.html b/deps/npm/html/partial/doc/cli/npm-docs.html deleted file mode 100644 index 3866ff1a0a4..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-docs.html +++ /dev/null @@ -1,36 +0,0 @@ -

    npm-docs

    Docs for a package in a web browser maybe

    -

    SYNOPSIS

    -
    npm docs [<pkgname> [<pkgname> ...]]
    -npm docs (with no args in a package dir)
    -npm home [<pkgname> [<pkgname> ...]]
    -npm home (with no args in a package dir)
    -

    DESCRIPTION

    -

    This command tries to guess at the likely location of a package's -documentation URL, and then tries to open it using the --browser -config param. You can pass multiple package names at once. If no -package name is provided, it will search for a package.json in -the current folder and use the name property.

    -

    CONFIGURATION

    -

    browser

    -
      -
    • Default: OS X: "open", Windows: "start", Others: "xdg-open"
    • -
    • Type: String
    • -
    -

    The browser that is called by the npm docs command to open websites.

    -

    registry

    - -

    The base URL of the npm package registry.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-edit.html b/deps/npm/html/partial/doc/cli/npm-edit.html deleted file mode 100644 index 82b75ad7f3c..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-edit.html +++ /dev/null @@ -1,29 +0,0 @@ -

    npm-edit

    Edit an installed package

    -

    SYNOPSIS

    -
    npm edit <name>[@<version>]
    -

    DESCRIPTION

    -

    Opens the package folder in the default editor (or whatever you've -configured as the npm editor config -- see npm-config(7).)

    -

    After it has been edited, the package is rebuilt so as to pick up any -changes in compiled packages.

    -

    For instance, you can do npm install connect to install connect -into your package, and then npm edit connect to make a few -changes to your locally installed copy.

    -

    CONFIGURATION

    -

    editor

    -
      -
    • Default: EDITOR environment variable if set, or "vi" on Posix, -or "notepad" on Windows.
    • -
    • Type: path
    • -
    -

    The command to run for npm edit or npm config edit.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-explore.html b/deps/npm/html/partial/doc/cli/npm-explore.html deleted file mode 100644 index fe2fbd494ca..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-explore.html +++ /dev/null @@ -1,29 +0,0 @@ -

    npm-explore

    Browse an installed package

    -

    SYNOPSIS

    -
    npm explore <name> [ -- <cmd>]
    -

    DESCRIPTION

    -

    Spawn a subshell in the directory of the installed package specified.

    -

    If a command is specified, then it is run in the subshell, which then -immediately terminates.

    -

    This is particularly handy in the case of git submodules in the -node_modules folder:

    -
    npm explore some-dependency -- git pull origin master
    -

    Note that the package is not automatically rebuilt afterwards, so be -sure to use npm rebuild <pkg> if you make any changes.

    -

    CONFIGURATION

    -

    shell

    -
      -
    • Default: SHELL environment variable, or "bash" on Posix, or "cmd" on -Windows
    • -
    • Type: path
    • -
    -

    The shell to run for the npm explore command.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-help-search.html b/deps/npm/html/partial/doc/cli/npm-help-search.html deleted file mode 100644 index afd8fb47313..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-help-search.html +++ /dev/null @@ -1,26 +0,0 @@ -

    npm-help-search

    Search npm help documentation

    -

    SYNOPSIS

    -
    npm help-search some search terms
    -

    DESCRIPTION

    -

    This command will search the npm markdown documentation files for the -terms provided, and then list the results, sorted by relevance.

    -

    If only one result is found, then it will show that help topic.

    -

    If the argument to npm help is not a known help topic, then it will -call help-search. It is rarely if ever necessary to call this -command directly.

    -

    CONFIGURATION

    -

    long

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

    If true, the "long" flag will cause help-search to output context around -where the terms were found in the documentation.

    -

    If false, then help-search will just list out the help topics found.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-help.html b/deps/npm/html/partial/doc/cli/npm-help.html deleted file mode 100644 index 4217b8447c5..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-help.html +++ /dev/null @@ -1,32 +0,0 @@ -

    npm-help

    Get help on npm

    -

    SYNOPSIS

    -
    npm help <topic>
    -npm help some search terms
    -

    DESCRIPTION

    -

    If supplied a topic, then show the appropriate documentation page.

    -

    If the topic does not exist, or if multiple terms are provided, then run -the help-search command to find a match. Note that, if help-search -finds a single subject, then it will run help on that topic, so unique -matches are equivalent to specifying a topic name.

    -

    CONFIGURATION

    -

    viewer

    -
      -
    • Default: "man" on Posix, "browser" on Windows
    • -
    • Type: path
    • -
    -

    The program to use to view help content.

    -

    Set to "browser" to view html help content in the default web browser.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-init.html b/deps/npm/html/partial/doc/cli/npm-init.html deleted file mode 100644 index ff363fab1a6..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-init.html +++ /dev/null @@ -1,28 +0,0 @@ -

    npm-init

    Interactively create a package.json file

    -

    SYNOPSIS

    -
    npm init [-f|--force|-y|--yes]
    -

    DESCRIPTION

    -

    This will ask you a bunch of questions, and then write a package.json for you.

    -

    It attempts to make reasonable guesses about what you want things to be set to, -and then writes a package.json file with the options you've selected.

    -

    If you already have a package.json file, it'll read that first, and default to -the options in there.

    -

    It is strictly additive, so it does not delete options from your package.json -without a really good reason to do so.

    -

    If you invoke it with -f, --force, -y, or --yes, it will use only -defaults and not prompt you for any options.

    -

    CONFIGURATION

    -

    scope

    -
      -
    • Default: none
    • -
    • Type: String
    • -
    -

    The scope under which the new module should be created.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-install.html b/deps/npm/html/partial/doc/cli/npm-install.html deleted file mode 100644 index 98dadcc9135..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-install.html +++ /dev/null @@ -1,257 +0,0 @@ -

    npm-install

    Install a package

    -

    SYNOPSIS

    -
    npm install (with no args in a package dir)
    -npm install <tarball file>
    -npm install <tarball url>
    -npm install <folder>
    -npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact]
    -npm install [@<scope>/]<name>@<tag>
    -npm install [@<scope>/]<name>@<version>
    -npm install [@<scope>/]<name>@<version range>
    -npm i (with any of the previous argument usage)
    -

    DESCRIPTION

    -

    This command installs a package, and any packages that it depends on. If the -package has a shrinkwrap file, the installation of dependencies will be driven -by that. See npm-shrinkwrap(1).

    -

    A package is:

    -
      -
    • a) a folder containing a program described by a package.json file
    • -
    • b) a gzipped tarball containing (a)
    • -
    • c) a url that resolves to (b)
    • -
    • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
    • -
    • e) a <name>@<tag> that points to (d)
    • -
    • f) a <name> that has a "latest" tag satisfying (e)
    • -
    • g) a <git remote url> that resolves to (b)
    • -
    -

    Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b).

    -
      -
    • npm install (in package directory, no arguments):

      -

      Install the dependencies in the local node_modules folder.

      -

      In global mode (ie, with -g or --global appended to the command), - it installs the current package context (ie, the current working - directory) as a global package.

      -

      By default, npm install will install all modules listed as dependencies. - With the --production flag (or when the NODE_ENV environment variable - is set to production), npm will not install modules listed in - devDependencies.

      -
    • -
    • npm install <folder>:

      -

      Install a package that is sitting in a folder on the filesystem.

      -
    • -
    • npm install <tarball file>:

      -

      Install a package that is sitting on the filesystem. Note: if you just want - to link a dev directory into your npm root, you can do this more easily by - using npm link.

      -

      Example:

      -
          npm install ./package.tgz
      -
    • -
    • npm install <tarball url>:

      -

      Fetch the tarball url, and then install it. In order to distinguish between - this and other options, the argument must start with "http://" or "https://"

      -

      Example:

      -
          npm install https://github.com/indexzero/forever/tarball/v0.5.6
      -
    • -
    • npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]:

      -

      Do a <name>@<tag> install, where <tag> is the "tag" config. (See - npm-config(7).)

      -

      In most cases, this will install the latest version - of the module published on npm.

      -

      Example:

      -
          npm install sax
      -

      npm install takes 3 exclusive, optional flags which save or update - the package version in your main package.json:

      -
        -
      • --save: Package will appear in your dependencies.

        -
      • -
      • --save-dev: Package will appear in your devDependencies.

        -
      • -
      • --save-optional: Package will appear in your optionalDependencies.

        -

        When using any of the above options to save dependencies to your -package.json, there is an additional, optional flag:

        -
      • -
      • --save-exact: Saved dependencies will be configured with an -exact version rather than using npm's default semver range -operator.

        -

        <scope> is optional. The package will be downloaded from the registry -associated with the specified scope. If no registry is associated with -the given scope the default registry is assumed. See npm-scope(7).

        -

        Note: if you do not include the @-symbol on your scope name, npm will -interpret this as a GitHub repository instead, see below. Scopes names -must also be followed by a slash.

        -

        Examples:

        -
        npm install sax --save
        -npm install githubname/reponame
        -npm install @myorg/privatepackage
        -npm install node-tap --save-dev
        -npm install dtrace-provider --save-optional
        -npm install readable-stream --save --save-exact
        -
      • -
      -
    • -
    -
    **Note**: If there is a file or folder named `<name>` in the current
    -working directory, then it will try to install that, and only try to
    -fetch the package by name if it is not valid.
    -
      -
    • npm install [@<scope>/]<name>@<tag>:

      -

      Install the version of the package that is referenced by the specified tag. - If the tag does not exist in the registry data for that package, then this - will fail.

      -

      Example:

      -
          npm install sax@latest
      -    npm install @myorg/mypackage@latest
      -
    • -
    • npm install [@<scope>/]<name>@<version>:

      -

      Install the specified version of the package. This will fail if the - version has not been published to the registry.

      -

      Example:

      -
          npm install sax@0.1.1
      -    npm install @myorg/privatepackage@1.5.0
      -
    • -
    • npm install [@<scope>/]<name>@<version range>:

      -

      Install a version of the package matching the specified version range. This - will follow the same rules for resolving dependencies described in package.json(5).

      -

      Note that most version ranges must be put in quotes so that your shell will - treat it as a single argument.

      -

      Example:

      -
          npm install sax@">=0.1.0 <0.2.0"
      -    npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
      -
    • -
    • npm install <git remote url>:

      -

      Install a package by cloning a git remote url. The format of the git - url is:

      -
          <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit-ish>]
      -

      <protocol> is one of git, git+ssh, git+http, or - git+https. If no <commit-ish> is specified, then master is - used.

      -

      The following git environment variables are recognized by npm and will be added - to the environment when running git:

      -
        -
      • GIT_ASKPASS
      • -
      • GIT_PROXY_COMMAND
      • -
      • GIT_SSH
      • -
      • GIT_SSH_COMMAND
      • -
      • GIT_SSL_CAINFO
      • -
      • GIT_SSL_NO_VERIFY

        -

        See the git man page for details.

        -

        Examples:

        -
        npm install git+ssh://git@github.com:npm/npm.git#v1.0.27
        -npm install git+https://isaacs@github.com/npm/npm.git
        -npm install git://github.com/npm/npm.git#v1.0.27
        -GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/npm.git
        -
      • -
      -
    • -
    • npm install <githubname>/<githubrepo>[#<commit-ish>]:

      -
    • -
    • npm install github:<githubname>/<githubrepo>[#<commit-ish>]:

      -

      Install the package at https://github.com/githubname/githubrepo by - attempting to clone it using git.

      -

      If you don't specify a commit-ish then master will be used.

      -

      Examples:

      -
          npm install mygithubuser/myproject
      -    npm install github:mygithubuser/myproject
      -
    • -
    • npm install gist:[<githubname>/]<gistID>[#<commit-ish>]:

      -

      Install the package at https://gist.github.com/gistID by attempting to - clone it using git. The GitHub username associated with the gist is - optional and will not be saved in package.json if --save is used.

      -

      If you don't specify a commit-ish then master will be used.

      -

      Example:

      -
          npm install gist:101a11beef
      -
    • -
    • npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]:

      -

      Install the package at https://bitbucket.org/bitbucketname/bitbucketrepo - by attempting to clone it using git.

      -

      If you don't specify a commit-ish then master will be used.

      -

      Example:

      -
          npm install bitbucket:mybitbucketuser/myproject
      -
    • -
    • npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]:

      -

      Install the package at https://gitlab.com/gitlabname/gitlabrepo - by attempting to clone it using git.

      -

      If you don't specify a commit-ish then master will be used.

      -

      Example:

      -
          npm install gitlab:mygitlabuser/myproject
      -
    • -
    -

    You may combine multiple arguments, and even multiple types of arguments. -For example:

    -
    npm install sax@">=0.1.0 <0.2.0" bench supervisor
    -

    The --tag argument will apply to all of the specified install targets. If a -tag with the given name exists, the tagged version is preferred over newer -versions.

    -

    The --force argument will force npm to fetch remote resources even if a -local copy exists on disk.

    -
    npm install sax --force
    -

    The --global argument will cause npm to install the package globally -rather than locally. See npm-folders(5).

    -

    The --link argument will cause npm to link global installs into the -local space in some cases.

    -

    The --no-bin-links argument will prevent npm from creating symlinks for -any binaries the package might contain.

    -

    The --no-optional argument will prevent optional dependencies from -being installed.

    -

    The --no-shrinkwrap argument, which will ignore an available -shrinkwrap file and use the package.json instead.

    -

    The --nodedir=/path/to/node/source argument will allow npm to find the -node source code so that npm can compile native modules.

    -

    See npm-config(7). Many of the configuration params have some -effect on installation, since that's most of what npm does.

    -

    ALGORITHM

    -

    To install a package, npm uses the following algorithm:

    -
    install(where, what, family, ancestors)
    -fetch what, unpack to <where>/node_modules/<what>
    -for each dep in what.dependencies
    -  resolve dep to precise version
    -for each dep@version in what.dependencies
    -    not in <where>/node_modules/<what>/node_modules/*
    -    and not in <family>
    -  add precise version deps to <family>
    -  install(<where>/node_modules/<what>, dep, family)
    -

    For this package{dep} structure: A{B,C}, B{C}, C{D}, -this algorithm produces:

    -
    A
    -+-- B
    -`-- C
    -    `-- D
    -

    That is, the dependency from B to C is satisfied by the fact that A -already caused C to be installed at a higher level.

    -

    See npm-folders(5) for a more detailed description of the specific -folder structures that npm creates.

    -

    Limitations of npm's Install Algorithm

    -

    There are some very rare and pathological edge-cases where a cycle can -cause npm to try to install a never-ending tree of packages. Here is -the simplest case:

    -
    A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...
    -

    where A is some version of a package, and A' is a different version -of the same package. Because B depends on a different version of A -than the one that is already in the tree, it must install a separate -copy. The same is true of A', which must install B'. Because B' -depends on the original version of A, which has been overridden, the -cycle falls into infinite regress.

    -

    To avoid this situation, npm flat-out refuses to install any -name@version that is already present anywhere in the tree of package -folder ancestors. A more correct, but more complex, solution would be -to symlink the existing version into the new location. If this ever -affects a real use-case, it will be investigated.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-link.html b/deps/npm/html/partial/doc/cli/npm-link.html deleted file mode 100644 index d25a64005b1..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-link.html +++ /dev/null @@ -1,52 +0,0 @@ -

    npm-link

    Symlink a package folder

    -

    SYNOPSIS

    -
    npm link (in package folder)
    -npm link [@<scope>/]<pkgname>
    -npm ln (with any of the previous argument usage)
    -

    DESCRIPTION

    -

    Package linking is a two-step process.

    -

    First, npm link in a package folder will create a globally-installed -symbolic link from prefix/package-name to the current folder (see -npm-config(7) for the value of prefix).

    -

    Next, in some other location, npm link package-name will create a -symlink from the local node_modules folder to the global symlink.

    -

    Note that package-name is taken from package.json, -not from directory name.

    -

    The package name can be optionally prefixed with a scope. See npm-scope(7). -The scope must be preceded by an @-symbol and followed by a slash.

    -

    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:

    -
    cd ~/projects/node-redis    # go into the package directory
    -npm link                    # creates global link
    -cd ~/projects/node-bloggy   # go into some other package directory.
    -npm link redis              # link-install the package
    -

    Now, any changes to ~/projects/node-redis will be reflected in -~/projects/node-bloggy/node_modules/node-redis/. Note that the link should -be to the package name, not the directory name for that package.

    -

    You may also shortcut the two steps in one. For example, to do the -above use-case in a shorter way:

    -
    cd ~/projects/node-bloggy  # go into the dir of your main project
    -npm link ../node-redis     # link the dir of your dependency
    -

    The second line is the equivalent of doing:

    -
    (cd ../node-redis; npm link)
    -npm link node-redis
    -

    That is, it first creates a global link, and then links the global -installation target into your project's node_modules folder.

    -

    If your linked package is scoped (see npm-scope(7)) your link command must -include that scope, e.g.

    -
    npm link @myorg/privatepackage
    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-logout.html b/deps/npm/html/partial/doc/cli/npm-logout.html deleted file mode 100644 index 63c28a3d7ca..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-logout.html +++ /dev/null @@ -1,35 +0,0 @@ -

    npm-logout

    Log out of the registry

    -

    SYNOPSIS

    -
    npm logout [--registry=url] [--scope=@orgname]
    -

    DESCRIPTION

    -

    When logged into a registry that supports token-based authentication, tell the -server to end this token's session. This will invalidate the token everywhere -you're using it, not just for the current environment.

    -

    When logged into a legacy registry that uses username and password authentication, this will -clear the credentials in your user configuration. In this case, it will only affect -the current environment.

    -

    If --scope is provided, this will find the credentials for the registry -connected to that scope, if set.

    -

    CONFIGURATION

    -

    registry

    -

    Default: http://registry.npmjs.org/

    -

    The base URL of the npm package registry. If scope is also specified, -it takes precedence.

    -

    scope

    -

    Default: none

    -

    If specified, the user and login credentials given will be associated -with the specified scope. See npm-scope(7). You can use both at the same time, -e.g.

    -
    npm adduser --registry=http://myregistry.example.com --scope=@myco
    -

    This will set a registry for the given scope and login or create a user for -that registry at the same time.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html deleted file mode 100644 index 9674a414fe6..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-ls.html +++ /dev/null @@ -1,77 +0,0 @@ -

    npm-ls

    List installed packages

    -

    SYNOPSIS

    -
    npm list [[@<scope>/]<pkg> ...]
    -npm ls [[@<scope>/]<pkg> ...]
    -npm la [[@<scope>/]<pkg> ...]
    -npm ll [[@<scope>/]<pkg> ...]
    -

    DESCRIPTION

    -

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

    -

    Positional arguments are name@version-range identifiers, which will -limit the results to only the paths to the packages named. Note that -nested packages will also show the paths to the specified packages. -For example, running npm ls promzard in npm's source tree will show:

    -
    npm@2.13.3 /path/to/npm
    -└─┬ init-package-json@0.0.4
    -  └── promzard@0.1.5
    -

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

    -

    If a project specifies git urls for dependencies these are shown -in parentheses after the name@version to make it easier for users to -recognize potential forks of a project.

    -

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

    -

    CONFIGURATION

    -

    json

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

    Show information in JSON format.

    -

    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.

    -

    depth

    -
      -
    • Type: Int
    • -
    -

    Max display depth of the dependency tree.

    -

    prod / production

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

    Display only the dependency tree for packages in dependencies.

    -

    dev

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

    Display only the dependency tree for packages in devDependencies.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-outdated.html b/deps/npm/html/partial/doc/cli/npm-outdated.html deleted file mode 100644 index ea07e01c1ce..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-outdated.html +++ /dev/null @@ -1,47 +0,0 @@ -

    npm-outdated

    Check for outdated packages

    -

    SYNOPSIS

    -
    npm outdated [<name> [<name> ...]]
    -

    DESCRIPTION

    -

    This command will check the registry to see if any (or, specific) installed -packages are currently outdated.

    -

    The resulting field 'wanted' shows the latest version according to the -version specified in the package.json, the field 'latest' the very latest -version of the package.

    -

    CONFIGURATION

    -

    json

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

    Show information in JSON format.

    -

    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
    • -
    -

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

    -

    depth

    -
      -
    • Type: Int
    • -
    -

    Max depth for checking dependency tree.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-owner.html b/deps/npm/html/partial/doc/cli/npm-owner.html deleted file mode 100644 index 0e0dc92e416..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-owner.html +++ /dev/null @@ -1,29 +0,0 @@ -

    npm-owner

    Manage package owners

    -

    SYNOPSIS

    -
    npm owner ls <package name>
    -npm owner add <user> <package name>
    -npm owner rm <user> <package name>
    -

    DESCRIPTION

    -

    Manage ownership of published packages.

    -
      -
    • ls: -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: -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: -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/partial/doc/cli/npm-pack.html b/deps/npm/html/partial/doc/cli/npm-pack.html deleted file mode 100644 index 865f14afd46..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-pack.html +++ /dev/null @@ -1,21 +0,0 @@ -

    npm-pack

    Create a tarball from a package

    -

    SYNOPSIS

    -
    npm pack [<pkg> [<pkg> ...]]
    -

    DESCRIPTION

    -

    For anything that's installable (that is, a package folder, tarball, -tarball url, name@tag, name@version, or name), this command will fetch -it to the cache, and then copy the tarball to the current working -directory as <name>-<version>.tgz, and then write the filenames out to -stdout.

    -

    If the same package is specified multiple times, then the file will be -overwritten the second time.

    -

    If no arguments are supplied, then npm packs the current package folder.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-ping.html b/deps/npm/html/partial/doc/cli/npm-ping.html deleted file mode 100644 index c71423d5eee..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-ping.html +++ /dev/null @@ -1,11 +0,0 @@ -

    npm-ping

    Ping npm registry

    -

    SYNOPSIS

    -
    npm ping [--registry <registry>]
    -

    DESCRIPTION

    -

    Ping the configured or given npm registry and verify authentication.

    -

    SEE ALSO

    - diff --git a/deps/npm/html/partial/doc/cli/npm-prefix.html b/deps/npm/html/partial/doc/cli/npm-prefix.html deleted file mode 100644 index bca3f6689c7..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-prefix.html +++ /dev/null @@ -1,18 +0,0 @@ -

    npm-prefix

    Display prefix

    -

    SYNOPSIS

    -
    npm prefix [-g]
    -

    DESCRIPTION

    -

    Print the local prefix to standard out. This is the closest parent directory -to contain a package.json file unless -g is also specified.

    -

    If -g is specified, this will be the value of the global prefix. See -npm-config(7) for more detail.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-prune.html b/deps/npm/html/partial/doc/cli/npm-prune.html deleted file mode 100644 index 8bb16677da1..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-prune.html +++ /dev/null @@ -1,21 +0,0 @@ -

    npm-prune

    Remove extraneous packages

    -

    SYNOPSIS

    -
    npm prune [<name> [<name ...]]
    -npm prune [<name> [<name ...]] [--production]
    -

    DESCRIPTION

    -

    This command removes "extraneous" packages. If a package name is -provided, then only packages matching one of the supplied names are -removed.

    -

    Extraneous packages are packages that are not listed on the parent -package's dependencies list.

    -

    If the --production flag is specified or the NODE_ENV environment -variable is set to production, this command will remove the packages -specified in your devDependencies. Setting --production=false will -negate NODE_ENV being set to production.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-publish.html b/deps/npm/html/partial/doc/cli/npm-publish.html deleted file mode 100644 index 8d9321292a4..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-publish.html +++ /dev/null @@ -1,46 +0,0 @@ -

    npm-publish

    Publish a package

    -

    SYNOPSIS

    -
    npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
    -npm publish <folder> [--tag <tag>] [--access <public|restricted>]
    -

    DESCRIPTION

    -

    Publishes a package to the registry so that it can be installed by name. See -npm-developers(7) for details on what's included in the published package, as -well as details on how the package is built.

    -

    By default npm will publish to the public registry. This can be overridden by -specifying a different default registry or using a npm-scope(7) in the name -(see package.json(5)).

    -
      -
    • <folder>: -A folder containing a package.json file

      -
    • -
    • <tarball>: -A url or file path to a gzipped tar archive containing a single folder -with a package.json file inside.

      -
    • -
    • [--tag <tag>] -Registers the published package with the given tag, such that npm install -<name>@<tag> will install this version. By default, npm publish updates -and npm install installs the latest tag.

      -
    • -
    • [--access <public|restricted>] -Tells the registry whether this package should be published as public or -restricted. Only applies to scoped packages, which default to restricted. -If you don't have a paid account, you must publish with --access public -to publish scoped packages.

      -
    • -
    -

    Fails if the package name and version combination already exists in -the specified registry.

    -

    Once a package is published with a given name and version, that -specific name and version combination can never be used again, even if -it is removed with npm-unpublish(1).

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-rebuild.html b/deps/npm/html/partial/doc/cli/npm-rebuild.html deleted file mode 100644 index b06f0705e3e..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-rebuild.html +++ /dev/null @@ -1,18 +0,0 @@ -

    npm-rebuild

    Rebuild a package

    -

    SYNOPSIS

    -
    npm rebuild [<name> [<name> ...]]
    -npm rb [<name> [<name> ...]]
    -
      -
    • <name>: -The package to rebuild
    • -
    -

    DESCRIPTION

    -

    This command runs the npm build command on the matched folders. This is useful -when you install a new version of node, and must recompile all your C++ addons with -the new binary.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-repo.html b/deps/npm/html/partial/doc/cli/npm-repo.html deleted file mode 100644 index 55fcb5f4c96..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-repo.html +++ /dev/null @@ -1,22 +0,0 @@ -

    npm-repo

    Open package repository page in the browser

    -

    SYNOPSIS

    -
    npm repo <pkgname>
    -npm repo (with no args in a package dir)
    -

    DESCRIPTION

    -

    This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the --browser -config param. If no package name is provided, it will search for -a package.json in the current folder and use the name property.

    -

    CONFIGURATION

    -

    browser

    -
      -
    • Default: OS X: "open", Windows: "start", Others: "xdg-open"
    • -
    • Type: String
    • -
    -

    The browser that is called by the npm repo command to open websites.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-restart.html b/deps/npm/html/partial/doc/cli/npm-restart.html deleted file mode 100644 index 2186473373c..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-restart.html +++ /dev/null @@ -1,33 +0,0 @@ -

    npm-restart

    Restart a package

    -

    SYNOPSIS

    -
    npm restart [-- <args>]
    -

    DESCRIPTION

    -

    This restarts a package.

    -

    This runs a package's "stop", "restart", and "start" scripts, and associated -pre- and post- scripts, in the order given below:

    -
      -
    1. prerestart
    2. -
    3. prestop
    4. -
    5. stop
    6. -
    7. poststop
    8. -
    9. restart
    10. -
    11. prestart
    12. -
    13. start
    14. -
    15. poststart
    16. -
    17. postrestart
    18. -
    -

    NOTE

    -

    Note that the "restart" script is run in addition to the "stop" -and "start" scripts, not instead of them.

    -

    This is the behavior as of npm major version 2. A change in this -behavior will be accompanied by an increase in major version number

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-rm.html b/deps/npm/html/partial/doc/cli/npm-rm.html deleted file mode 100644 index 24cd07eeecd..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-rm.html +++ /dev/null @@ -1,19 +0,0 @@ -

    npm-rm

    Remove a package

    -

    SYNOPSIS

    -
    npm rm <name>
    -npm r <name>
    -npm uninstall <name>
    -npm un <name>
    -

    DESCRIPTION

    -

    This uninstalls a package, completely removing everything npm installed -on its behalf.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-root.html b/deps/npm/html/partial/doc/cli/npm-root.html deleted file mode 100644 index e9b5ad0df8c..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-root.html +++ /dev/null @@ -1,15 +0,0 @@ -

    npm-root

    Display npm root

    -

    SYNOPSIS

    -
    npm root
    -

    DESCRIPTION

    -

    Print the effective node_modules folder to standard out.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-run-script.html b/deps/npm/html/partial/doc/cli/npm-run-script.html deleted file mode 100644 index e79376870e6..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-run-script.html +++ /dev/null @@ -1,37 +0,0 @@ -

    npm-run-script

    Run arbitrary package scripts

    -

    SYNOPSIS

    -
    npm run-script [command] [-- <args>]
    -npm run [command] [-- <args>]
    -

    DESCRIPTION

    -

    This runs an arbitrary command from a package's "scripts" object. If no -"command" is provided, it will list the available scripts. run[-script] is -used by the test, start, restart, and stop commands, but can be called -directly, as well. When the scripts in the package are printed out, they're -separated into lifecycle (test, start, restart) and directly-run scripts.

    -

    As of npm@2.0.0, you can -use custom arguments when executing scripts. The special option -- is used by -getopt to delimit the end of the options. npm will pass -all the arguments after the -- directly to your script:

    -
    npm run test -- --grep="pattern"
    -

    The arguments will only be passed to the script specified after npm run -and not to any pre or post script.

    -

    The env script is a special built-in command that can be used to list -environment variables that will be available to the script at runtime. If an -"env" command is defined in your package it will take precedence over the -built-in.

    -

    In addition to the shell's pre-existing PATH, npm run adds -node_modules/.bin to the PATH provided to scripts. Any binaries provided by -locally-installed dependencies can be used without the node_modules/.bin -prefix. For example, if there is a devDependency on tap in your package, -you should write:

    -
    "scripts": {"test": "tap test/\*.js"}
    -

    instead of "scripts": {"test": "node_modules/.bin/tap test/\*.js"} to run your tests.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-search.html b/deps/npm/html/partial/doc/cli/npm-search.html deleted file mode 100644 index ae66e47ead1..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-search.html +++ /dev/null @@ -1,29 +0,0 @@ -

    npm-search

    Search for packages

    -

    SYNOPSIS

    -
    npm search [--long] [search terms ...]
    -npm s [search terms ...]
    -npm se [search terms ...]
    -

    DESCRIPTION

    -

    Search the registry for packages matching the search terms.

    -

    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.)

    -

    CONFIGURATION

    -

    long

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

    Display full package descriptions and other long text across multiple -lines. When disabled (default) search results are truncated to fit -neatly on a single line. Modules with extremely long names will -fall on multiple lines.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html deleted file mode 100644 index 8ac97fc3eed..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html +++ /dev/null @@ -1,144 +0,0 @@ -

    npm-shrinkwrap

    Lock down dependency versions

    -

    SYNOPSIS

    -
    npm shrinkwrap
    -

    DESCRIPTION

    -

    This command locks down the versions of a package's dependencies so -that you can control exactly which versions of each dependency will be -used when your package is installed. The package.json file is still -required if you want to use npm install.

    -

    By default, npm install recursively installs the target's -dependencies (as specified in package.json), choosing the latest -available version that satisfies the dependency's semver pattern. In -some situations, particularly when shipping software where each change -is tightly managed, it's desirable to fully specify each version of -each dependency recursively so that subsequent builds and deploys do -not inadvertently pick up newer versions of a dependency that satisfy -the semver pattern. Specifying specific semver patterns in each -dependency's package.json would facilitate this, but that's not always -possible or desirable, as when another author owns the npm package. -It's also possible to check dependencies directly into source control, -but that may be undesirable for other reasons.

    -

    As an example, consider package A:

    -
    {
    -  "name": "A",
    -  "version": "0.1.0",
    -  "dependencies": {
    -    "B": "<0.1.0"
    -  }
    -}
    -

    package B:

    -
    {
    -  "name": "B",
    -  "version": "0.0.1",
    -  "dependencies": {
    -    "C": "<0.1.0"
    -  }
    -}
    -

    and package C:

    -
    {
    -  "name": "C",
    -  "version": "0.0.1"
    -}
    -

    If these are the only versions of A, B, and C available in the -registry, then a normal npm install A will install:

    -
    A@0.1.0
    -`-- B@0.0.1
    -    `-- C@0.0.1
    -

    However, if B@0.0.2 is published, then a fresh npm install A will -install:

    -
    A@0.1.0
    -`-- B@0.0.2
    -    `-- C@0.0.1
    -

    assuming the new version did not modify B's dependencies. Of course, -the new version of B could include a new version of C and any number -of new dependencies. If such changes are undesirable, the author of A -could specify a dependency on B@0.0.1. However, if A's author and B's -author are not the same person, there's no way for A's author to say -that he or she does not want to pull in newly published versions of C -when B hasn't changed at all.

    -

    In this case, A's author can run

    -
    npm shrinkwrap
    -

    This generates npm-shrinkwrap.json, which will look something like this:

    -
    {
    -  "name": "A",
    -  "version": "0.1.0",
    -  "dependencies": {
    -    "B": {
    -      "version": "0.0.1",
    -      "dependencies": {
    -        "C": {
    -          "version": "0.0.1"
    -        }
    -      }
    -    }
    -  }
    -}
    -

    The shrinkwrap command has locked down the dependencies based on -what's currently installed in node_modules. When npm install -installs a package with an npm-shrinkwrap.json in the package -root, the shrinkwrap file (rather than package.json files) completely -drives the installation of that package and all of its dependencies -(recursively). So now the author publishes A@0.1.0, and subsequent -installs of this package will use B@0.0.1 and C@0.0.1, regardless the -dependencies and versions listed in A's, B's, and C's package.json -files.

    -

    Using shrinkwrapped packages

    -

    Using a shrinkwrapped package is no different than using any other -package: you can npm install it by hand, or add a dependency to your -package.json file and npm install it.

    -

    Building shrinkwrapped packages

    -

    To shrinkwrap an existing package:

    -
      -
    1. Run npm install in the package root to install the current -versions of all dependencies.
    2. -
    3. Validate that the package works as expected with these versions.
    4. -
    5. Run npm shrinkwrap, add npm-shrinkwrap.json to git, and publish -your package.
    6. -
    -

    To add or update a dependency in a shrinkwrapped package:

    -
      -
    1. Run npm install in the package root to install the current -versions of all dependencies.
    2. -
    3. Add or update dependencies. npm install each new or updated -package individually and then update package.json. Note that they -must be explicitly named in order to be installed: running npm -install with no arguments will merely reproduce the existing -shrinkwrap.
    4. -
    5. Validate that the package works as expected with the new -dependencies.
    6. -
    7. Run npm shrinkwrap, commit the new npm-shrinkwrap.json, and -publish your package.
    8. -
    -

    You can use npm-outdated(1) to view dependencies with newer versions -available.

    -

    Other Notes

    -

    A shrinkwrap file must be consistent with the package's package.json -file. npm shrinkwrap will fail if required dependencies are not -already installed, since that would result in a shrinkwrap that -wouldn't actually work. Similarly, the command will fail if there are -extraneous packages (not referenced by package.json), since that would -indicate that package.json is not correct.

    -

    Since npm shrinkwrap is intended to lock down your dependencies for -production use, devDependencies will not be included unless you -explicitly set the --dev flag when you run npm shrinkwrap. If -installed devDependencies are excluded, then npm will print a -warning. If you want them to be installed with your module by -default, please consider adding them to dependencies instead.

    -

    If shrinkwrapped package A depends on shrinkwrapped package B, B's -shrinkwrap will not be used as part of the installation of A. However, -because A's shrinkwrap is constructed from a valid installation of B -and recursively specifies all dependencies, the contents of B's -shrinkwrap will implicitly be included in A's shrinkwrap.

    -

    Caveats

    -

    If you wish to lock down the specific bytes included in a package, for -example to have 100% confidence in being able to reproduce a -deployment or build, then you ought to check your dependencies into -source control, or pursue some other mechanism that can verify -contents rather than versions.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-star.html b/deps/npm/html/partial/doc/cli/npm-star.html deleted file mode 100644 index 7377d9bc5dd..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-star.html +++ /dev/null @@ -1,16 +0,0 @@ -

    npm-star

    Mark your favorite packages

    -

    SYNOPSIS

    -
    npm star <pkgname> [<pkg>, ...]
    -npm unstar <pkgname> [<pkg>, ...]
    -

    DESCRIPTION

    -

    "Starring" a package means that you have some interest in it. It's -a vaguely positive way to show that you care.

    -

    "Unstarring" is the same thing, but in reverse.

    -

    It's a boolean thing. Starring repeatedly has no additional effect.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-stars.html b/deps/npm/html/partial/doc/cli/npm-stars.html deleted file mode 100644 index 6ffda95b838..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-stars.html +++ /dev/null @@ -1,17 +0,0 @@ -

    npm-stars

    View packages marked as favorites

    -

    SYNOPSIS

    -
    npm stars
    -npm stars [username]
    -

    DESCRIPTION

    -

    If you have starred a lot of neat things and want to find them again -quickly this command lets you do just that.

    -

    You may also want to see your friend's favorite packages, in this case -you will most certainly enjoy this command.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-start.html b/deps/npm/html/partial/doc/cli/npm-start.html deleted file mode 100644 index bfd673ca26b..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-start.html +++ /dev/null @@ -1,14 +0,0 @@ -

    npm-start

    Start a package

    -

    SYNOPSIS

    -
    npm start [-- <args>]
    -

    DESCRIPTION

    -

    This runs a package's "start" script, if one was provided.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-stop.html b/deps/npm/html/partial/doc/cli/npm-stop.html deleted file mode 100644 index 3b974c46a1e..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-stop.html +++ /dev/null @@ -1,14 +0,0 @@ -

    npm-stop

    Stop a package

    -

    SYNOPSIS

    -
    npm stop [-- <args>]
    -

    DESCRIPTION

    -

    This runs a package's "stop" script, if one was provided.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-tag.html b/deps/npm/html/partial/doc/cli/npm-tag.html deleted file mode 100644 index b12d5de7a4c..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-tag.html +++ /dev/null @@ -1,42 +0,0 @@ -

    npm-tag

    Tag a published version

    -

    SYNOPSIS

    -
    npm tag <name>@<version> [<tag>]
    -

    DESCRIPTION

    -

    THIS COMMAND IS DEPRECATED. See npm-dist-tag(1) for details.

    -

    Tags the specified version of the package with the specified tag, or the ---tag config if not specified.

    -

    A tag can be used when installing packages as a reference to a version instead -of using a specific version number:

    -
    npm install <name>@<tag>
    -

    When installing dependencies, a preferred tagged version may be specified:

    -
    npm install --tag <tag>
    -

    This also applies to npm dedupe.

    -

    Publishing a package always sets the "latest" tag to the published version.

    -

    PURPOSE

    -

    Tags can be used to provide an alias instead of version numbers. For -example, npm currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version.

    -

    A project might choose to have multiple streams of development, e.g., -"stable", "canary".

    -

    CAVEATS

    -

    Tags must share a namespace with version numbers, because they are -specified in the same slot: npm install <pkg>@<version> vs npm -install <pkg>@<tag>.

    -

    Tags that can be interpreted as valid semver ranges will be -rejected. For example, v1.4 cannot be used as a tag, because it is -interpreted by semver as >=1.4.0 <1.5.0. See -https://github.com/npm/npm/issues/6082.

    -

    The simplest way to avoid semver problems with tags is to use tags -that do not begin with a number or the letter v.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-test.html b/deps/npm/html/partial/doc/cli/npm-test.html deleted file mode 100644 index 4a48e657d92..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-test.html +++ /dev/null @@ -1,17 +0,0 @@ -

    npm-test

    Test a package

    -

    SYNOPSIS

    -
      npm test [-- <args>]
    -  npm tst [-- <args>]
    -

    DESCRIPTION

    -

    This runs a package's "test" script, if one was provided.

    -

    To run tests as a condition of installation, set the npat config to -true.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-uninstall.html b/deps/npm/html/partial/doc/cli/npm-uninstall.html deleted file mode 100644 index 5b247402bdc..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-uninstall.html +++ /dev/null @@ -1,37 +0,0 @@ -

    npm-rm

    Remove a package

    -

    SYNOPSIS

    -
    npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
    -npm rm (with any of the previous argument usage)
    -

    DESCRIPTION

    -

    This uninstalls a package, completely removing everything npm installed -on its behalf.

    -

    Example:

    -
    npm uninstall sax
    -

    In global mode (ie, with -g or --global appended to the command), -it uninstalls the current package context as a global package.

    -

    npm uninstall takes 3 exclusive, optional flags which save or update -the package version in your main package.json:

    -
      -
    • --save: Package will be removed from your dependencies.

      -
    • -
    • --save-dev: Package will be removed from your devDependencies.

      -
    • -
    • --save-optional: Package will be removed from your optionalDependencies.

      -
    • -
    -

    Scope is optional and follows the usual rules for npm-scope(7).

    -

    Examples:

    -
    npm uninstall sax --save
    -npm uninstall @myorg/privatepackage --save
    -npm uninstall node-tap --save-dev
    -npm uninstall dtrace-provider --save-optional
    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-unpublish.html b/deps/npm/html/partial/doc/cli/npm-unpublish.html deleted file mode 100644 index 9790cd43274..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-unpublish.html +++ /dev/null @@ -1,27 +0,0 @@ -

    npm-unpublish

    Remove a package from the registry

    -

    SYNOPSIS

    -
    npm unpublish [@<scope>/]<name>[@<version>]
    -

    WARNING

    -

    It is generally considered bad behavior to remove versions of a library -that others are depending on!

    -

    Consider using the deprecate command -instead, if your intent is to encourage users to upgrade.

    -

    There is plenty of room on the registry.

    -

    DESCRIPTION

    -

    This removes a package version from the registry, deleting its -entry and removing the tarball.

    -

    If no version is specified, or if all versions are removed then -the root package entry is removed from the registry entirely.

    -

    Even if a package version is unpublished, that specific name and -version combination can never be reused. In order to publish the -package again, a new version number must be used.

    -

    The scope is optional and follows the usual rules for npm-scope(7).

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-update.html b/deps/npm/html/partial/doc/cli/npm-update.html deleted file mode 100644 index ecc6640f21d..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-update.html +++ /dev/null @@ -1,99 +0,0 @@ -

    npm-update

    Update a package

    -

    SYNOPSIS

    -
    npm update [-g] [<name> [<name> ...]]
    -

    DESCRIPTION

    -

    This command will update all the packages listed to the latest version -(specified by the tag config), respecting semver.

    -

    It will also install missing packages. As with all commands that install -packages, the --dev flag will cause devDependencies to be processed -as well.

    -

    If the -g flag is specified, this command will update globally installed -packages.

    -

    If no package name is specified, all packages in the specified location (global -or local) will be updated.

    -

    As of npm@2.6.1, the npm update will only inspect top-level packages. -Prior versions of npm would also recursively inspect all dependencies. -To get the old behavior, use npm --depth 9999 update, but be warned that -simultaneous asynchronous update of all packages, including npm itself -and packages that npm depends on, often causes problems up to and including -the uninstallation of npm itself.

    -

    To restore a missing npm, use the command:

    -
    curl -L https://npmjs.com/install.sh | sh
    -

    EXAMPLES

    -

    IMPORTANT VERSION NOTE: these examples assume npm@2.6.1 or later. For -older versions of npm, you must specify --depth 0 to get the behavior -described below.

    -

    For the examples below, assume that the current package is app and it depends -on dependencies, dep1 (dep2, .. etc.). The published versions of dep1 are:

    -
    {
    -  dist-tags: { latest: "1.2.2" },
    -  versions: { "1.2.2",
    -              "1.2.1",
    -              "1.2.0",
    -              "1.1.2",
    -              "1.1.1",
    -              "1.0.0",
    -              "0.4.1",
    -              "0.4.0",
    -              "0.2.0"
    -  }
    -}
    -

    Caret Dependencies

    -

    If app's package.json contains:

    -
    dependencies: {
    -  dep1: "^1.1.1"
    -}
    -

    Then npm update will install dep1@1.2.2, because 1.2.2 is latest and -1.2.2 satisfies ^1.1.1.

    -

    Tilde Dependencies

    -

    However, if app's package.json contains:

    -
    dependencies: {
    -  dep1: "~1.1.1"
    -}
    -

    In this case, running npm update will install dep1@1.1.2. Even though the latest -tag points to 1.2.2, this version does not satisfy ~1.1.1, which is equivalent -to >=1.1.1 <1.2.0. So the highest-sorting version that satisfies ~1.1.1 is used, -which is 1.1.2.

    -

    Caret Dependencies below 1.0.0

    -

    Suppose app has a caret dependency on a version below 1.0.0, for example:

    -
    dependencies: {
    -  dep1: "^0.2.0"
    -}
    -

    npm update will install dep1@0.2.0, because there are no other -versions which satisfy ^0.2.0.

    -

    If the dependence were on ^0.4.0:

    -
    dependencies: {
    -  dep1: "^0.4.0"
    -}
    -

    Then npm update will install dep1@0.4.1, because that is the highest-sorting -version that satisfies ^0.4.0 (>= 0.4.0 <0.5.0)

    -

    Recording Updates with --save

    -

    When you want to update a package and save the new version as -the minimum required dependency in package.json, you can use -npm update --save. For example if package.json contains

    -
    dependencies: {
    -  dep1: "^1.1.1"
    -}
    -

    Then npm update --save will install dep1@1.2.2 (i.e., latest), -and package.json will be modified:

    -
    dependencies: {
    -  dep1: "^1.2.2"
    -}
    -

    Note that npm will only write an updated version to package.json -if it installs a new package.

    -

    Updating Globally-Installed Packages

    -

    npm update -g will apply the update action to each globally- installed -package that is outdated -- that is, has a version that is different from -latest.

    -

    NOTE: If a package has been upgraded to a version newer than latest, it will -be downgraded.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-version.html b/deps/npm/html/partial/doc/cli/npm-version.html deleted file mode 100644 index 1beda3d2884..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-version.html +++ /dev/null @@ -1,75 +0,0 @@ -

    npm-version

    Bump a package version

    -

    SYNOPSIS

    -
    npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
    -

    DESCRIPTION

    -

    Run this in a package directory to bump the version and write the new -data back to package.json and, if present, npm-shrinkwrap.json.

    -

    The newversion argument should be a valid semver string, or a -valid second argument to semver.inc (one of patch, minor, major, -prepatch, preminor, premajor, prerelease). In the second case, -the existing version will be incremented by 1 in the specified field.

    -

    If run in a git repo, it will also create a version commit and tag. -This behavior is controlled by git-tag-version (see below), and can -be disabled on the command line by running npm --no-git-tag-version version. -It will fail if the working directory is not clean, unless the --force -flag is set.

    -

    If supplied with --message (shorthand: -m) config option, npm will -use it as a commit message when creating a version commit. If the -message config contains %s then that will be replaced with the -resulting version number. For example:

    -
    npm version patch -m "Upgrade to %s for reasons"
    -

    If the sign-git-tag config is set, then the tag will be signed using -the -s flag to git. Note that you must have a default GPG key set up -in your git config for this to work properly. For example:

    -
    $ npm config set sign-git-tag true
    -$ npm version patch
    -
    -You need a passphrase to unlock the secret key for
    -user: "isaacs (http://blog.izs.me/) <i@izs.me>"
    -2048-bit RSA key, ID 6C481CF6, created 2010-08-31
    -
    -Enter passphrase:
    -

    If preversion, version, or postversion are in the scripts property of -the package.json, they will be executed as part of running npm version.

    -

    The exact order of execution is as follows:

    -
      -
    1. Check to make sure the git working directory is clean before we get started. -Your scripts may add files to the commit in future steps. -This step is skipped if the --force flag is set.
    2. -
    3. Run the preversion script. These scripts have access to the old version in package.json. -A typical use would be running your full test suite before deploying. -Any files you want added to the commit should be explicitly added using git add.
    4. -
    5. Bump version in package.json as requested (patch, minor, major, etc).
    6. -
    7. Run the version script. These scripts have access to the new version in package.json -(so they can incorporate it into file headers in generated files for example). -Again, scripts should explicitly add generated files to the commit using git add.
    8. -
    9. Commit and tag.
    10. -
    11. Run the postversion script. Use it to clean up the file system or automatically push -the commit and/or tag.
    12. -
    -

    Take the following example:

    -
    "scripts": {
    -  "preversion": "npm test",
    -  "version": "npm run build && git add -A dist",
    -  "postversion": "git push && git push --tags && rm -rf build/temp"
    -}
    -

    This runs all your tests, and proceeds only if they pass. Then runs your build script, and -adds everything in the dist directory to the commit. After the commit, it pushes the new commit -and tag up to the server, and deletes the build/temp directory.

    -

    CONFIGURATION

    -

    git-tag-version

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Commit and tag the version change.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-view.html b/deps/npm/html/partial/doc/cli/npm-view.html deleted file mode 100644 index dcd41693e7e..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-view.html +++ /dev/null @@ -1,62 +0,0 @@ -

    npm-view

    View registry info

    -

    SYNOPSIS

    -
    npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
    -npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
    -

    DESCRIPTION

    -

    This command shows data about a package and prints it to the stream -referenced by the outfd config, which defaults to stdout.

    -

    To show the package registry entry for the connect package, you can do -this:

    -
    npm view connect
    -

    The default version is "latest" if unspecified.

    -

    Field names can be specified after the package descriptor. -For example, to show the dependencies of the ronn package at version -0.3.5, you could do the following:

    -
    npm view ronn@0.3.5 dependencies
    -

    You can view child fields by separating them with a period. -To view the git repository URL for the latest version of npm, you could -do this:

    -
    npm view npm repository.url
    -

    This makes it easy to view information about a dependency with a bit of -shell scripting. For example, to view all the data about the version of -opts that ronn depends on, you can do this:

    -
    npm view opts@$(npm view ronn dependencies.opts)
    -

    For fields that are arrays, requesting a non-numeric field will return -all of the values from the objects in the list. For example, to get all -the contributor names for the "express" project, you can do this:

    -
    npm view express contributors.email
    -

    You may also use numeric indices in square braces to specifically select -an item in an array field. To just get the email address of the first -contributor in the list, you can do this:

    -
    npm view express contributors[0].email
    -

    Multiple fields may be specified, and will be printed one after another. -For exampls, to get all the contributor names and email addresses, you -can do this:

    -
    npm view express contributors.name contributors.email
    -

    "Person" fields are shown as a string if they would be shown as an -object. So, for example, this will show the list of npm contributors in -the shortened string format. (See package.json(5) for more on this.)

    -
    npm view npm contributors
    -

    If a version range is provided, then data will be printed for every -matching version of the package. This will show which version of jsdom -was required by each matching version of yui3:

    -
    npm view yui3@'>0.5.4' dependencies.jsdom
    -

    OUTPUT

    -

    If only a single string field for a single version is output, then it -will not be colorized or quoted, so as to enable piping the output to -another command. If the field is an object, it will be output as a JavaScript object literal.

    -

    If the --json flag is given, the outputted fields will be JSON.

    -

    If the version range matches multiple versions, than each printed value -will be prefixed with the version it applies to.

    -

    If multiple fields are requested, than each of them are prefixed with -the field name.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm-whoami.html b/deps/npm/html/partial/doc/cli/npm-whoami.html deleted file mode 100644 index a0c0dd4cd82..00000000000 --- a/deps/npm/html/partial/doc/cli/npm-whoami.html +++ /dev/null @@ -1,13 +0,0 @@ -

    npm-whoami

    Display npm username

    -

    SYNOPSIS

    -
    npm whoami
    -

    DESCRIPTION

    -

    Print the username config to standard output.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm.html b/deps/npm/html/partial/doc/cli/npm.html deleted file mode 100644 index 683606b8387..00000000000 --- a/deps/npm/html/partial/doc/cli/npm.html +++ /dev/null @@ -1,134 +0,0 @@ -

    npm

    javascript package manager

    -

    SYNOPSIS

    -
    npm <command> [args]
    -

    VERSION

    -

    2.13.3

    -

    DESCRIPTION

    -

    npm is the package manager for the Node JavaScript platform. It puts -modules in place so that node can find them, and manages dependency -conflicts intelligently.

    -

    It is extremely configurable to support a wide variety of use cases. -Most commonly, it is used to publish, discover, install, and develop node -programs.

    -

    Run npm help to get a list of available commands.

    -

    INTRODUCTION

    -

    You probably got npm because you want to install stuff.

    -

    Use npm install blerg to install the latest version of "blerg". Check out -npm-install(1) for more info. It can do a lot of stuff.

    -

    Use the npm search command to show everything that's available. -Use npm ls to show everything you've installed.

    -

    DEPENDENCIES

    -

    If a package references to another package with a git URL, npm depends -on a preinstalled git.

    -

    If one of the packages npm tries to install is a native node module and -requires compiling of C++ Code, npm will use -node-gyp for that task. -For a Unix system, node-gyp -needs Python, make and a buildchain like GCC. On Windows, -Python and Microsoft Visual Studio C++ is needed. Python 3 is -not supported by node-gyp. -For more information visit -the node-gyp repository and -the node-gyp Wiki.

    -

    DIRECTORIES

    -

    See npm-folders(5) to learn about where npm puts stuff.

    -

    In particular, npm has two modes of operation:

    -
      -
    • global mode:
      npm installs packages into the install prefix at -prefix/lib/node_modules and bins are installed in prefix/bin.
    • -
    • local mode:
      npm installs packages into the current project directory, which -defaults to the current working directory. Packages are installed to -./node_modules, and bins are installed to ./node_modules/.bin.
    • -
    -

    Local mode is the default. Use --global or -g on any command to -operate in global mode instead.

    -

    DEVELOPER USAGE

    -

    If you're using npm to develop and publish your code, check out the -following help topics:

    -
      -
    • json: -Make a package.json file. See package.json(5).
    • -
    • link: -For linking your current working code into Node's path, so that you -don't have to reinstall every time you make a change. Use -npm link to do this.
    • -
    • install: -It's a good idea to install things if you don't need the symbolic link. -Especially, installing other peoples code from the registry is done via -npm install
    • -
    • adduser: -Create an account or log in. Credentials are stored in the -user config file.
    • -
    • publish: -Use the npm publish command to upload your code to the registry.
    • -
    -

    CONFIGURATION

    -

    npm is extremely configurable. It reads its configuration options from -5 places.

    -
      -
    • Command line switches:
      Set a config with --key val. All keys take a value, even if they -are booleans (the config parser doesn't know what the options are at -the time of parsing.) If no value is provided, then the option is set -to boolean true.
    • -
    • Environment Variables:
      Set any config by prefixing the name in an environment variable with -npm_config_. For example, export npm_config_key=val.
    • -
    • User Configs:
      The file at $HOME/.npmrc is an ini-formatted list of configs. If -present, it is parsed. If the userconfig option is set in the cli -or env, then that will be used instead.
    • -
    • Global Configs:
      The file found at ../etc/npmrc (from the node executable, by default -this resolves to /usr/local/etc/npmrc) will be parsed if it is found. -If the globalconfig option is set in the cli, env, or user config, -then that file is parsed instead.
    • -
    • Defaults:
      npm's default configuration options are defined in -lib/utils/config-defs.js. These must not be changed.
    • -
    -

    See npm-config(7) for much much more information.

    -

    CONTRIBUTIONS

    -

    Patches welcome!

    -
      -
    • code: -Read through npm-coding-style(7) if you plan to submit code. -You don't have to agree with it, but you do have to follow it.
    • -
    • docs: -If you find an error in the documentation, edit the appropriate markdown -file in the "doc" folder. (Don't worry about generating the man page.)
    • -
    -

    Contributors are listed in npm's package.json file. You can view them -easily by doing npm view npm contributors.

    -

    If you would like to contribute, but don't know what to work on, check -the issues list or ask on the mailing list.

    - -

    BUGS

    -

    When you find issues, please report them:

    - -

    Be sure to include all of the output from the npm command that didn't work -as expected. The npm-debug.log file is also helpful to provide.

    -

    You can also look for isaacs in #node.js on irc://irc.freenode.net. He -will no doubt tell you to put the output in a gist or email.

    -

    AUTHOR

    -

    Isaac Z. Schlueter :: -isaacs :: -@izs :: -i@izs.me

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/files/npm-folders.html b/deps/npm/html/partial/doc/files/npm-folders.html deleted file mode 100644 index 08ea7ed13aa..00000000000 --- a/deps/npm/html/partial/doc/files/npm-folders.html +++ /dev/null @@ -1,164 +0,0 @@ -

    npm-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.)

    -

    Scoped packages are installed the same way, except they are grouped together -in a sub-folder of the relevant node_modules folder with the name of that -scope prefix by the @ symbol, e.g. npm install @myorg/package would place -the package in {prefix}/node_modules/@myorg/package. See scopes(7) for -more details.

    -

    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 npm-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 satisfies 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 package.json(5) for more information.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/files/npm-global.html b/deps/npm/html/partial/doc/files/npm-global.html deleted file mode 100644 index 08ea7ed13aa..00000000000 --- a/deps/npm/html/partial/doc/files/npm-global.html +++ /dev/null @@ -1,164 +0,0 @@ -

    npm-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.)

    -

    Scoped packages are installed the same way, except they are grouped together -in a sub-folder of the relevant node_modules folder with the name of that -scope prefix by the @ symbol, e.g. npm install @myorg/package would place -the package in {prefix}/node_modules/@myorg/package. See scopes(7) for -more details.

    -

    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 npm-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 satisfies 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 package.json(5) for more information.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html deleted file mode 100644 index b2e54ba742e..00000000000 --- a/deps/npm/html/partial/doc/files/npm-json.html +++ /dev/null @@ -1,545 +0,0 @@ -

    package.json

    Specifics of npm's package.json handling

    -

    DESCRIPTION

    -

    This document is all you need to know about what's required in your package.json -file. It must be actual JSON, not just a JavaScript object literal.

    -

    A lot of the behavior described in this document is affected by the config -settings described in npm-config(7).

    -

    name

    -

    The most important things in your package.json are the name and version fields. -Those are actually required, and your package won't install without -them. The name and version together form an identifier that is assumed -to be completely unique. Changes to the package should come along with -changes to the version.

    -

    The name is what your thing is called.

    -

    Some rules:

    -
      -
    • The name must be shorter than 214 characters. This includes the scope for -scoped packages.
    • -
    • The name can't start with a dot or an underscore.
    • -
    • New packages must not have uppercase letters in the name.
    • -
    • The name ends up being part of a URL, an argument on the command line, and a -folder name. Therefore, the name can't contain any non-URL-safe characters.
    • -
    -

    Some tips:

    -
      -
    • Don't use the same name as a core Node module.
    • -
    • Don't put "js" or "node" in the name. It's assumed that it's js, since you're -writing a package.json file, and you can specify the engine using the "engines" -field. (See below.)
    • -
    • The name will probably be passed as an argument to require(), so it should -be something short, but also reasonably descriptive.
    • -
    • You may want to check the npm registry to see if there's something by that name -already, before you get too attached to it. https://www.npmjs.com/
    • -
    -

    A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -npm-scope(7) for more detail.

    -

    version

    -

    The most important things in your package.json are the name and version fields. -Those are actually required, and your package won't install without -them. The name and version together form an identifier that is assumed -to be completely unique. Changes to the package should come along with -changes to the version.

    -

    Version must be parseable by -node-semver, which is bundled -with npm as a dependency. (npm install semver to use it yourself.)

    -

    More on version numbers and ranges at semver(7).

    -

    description

    -

    Put a description in it. It's a string. This helps people discover your -package, as it's listed in npm search.

    -

    keywords

    -

    Put keywords in it. It's an array of strings. This helps people -discover your package as it's listed in npm search.

    -

    homepage

    -

    The url to the project homepage.

    -

    NOTE: This is not the same as "url". If you put a "url" field, -then the registry will think it's a redirection to your package that has -been published somewhere else, and spit at you.

    -

    Literally. Spit. I'm so not kidding.

    -

    bugs

    -

    The url to your project's issue tracker and / or the email address to which -issues should be reported. These are helpful for people who encounter issues -with your package.

    -

    It should look like this:

    -
    { "url" : "https://github.com/owner/project/issues"
    -, "email" : "project@hostname.com"
    -}
    -

    You can specify either one or both values. If you want to provide only a url, -you can specify the value for "bugs" as a simple string instead of an object.

    -

    If a url is provided, it will be used by the npm bugs command.

    -

    license

    -

    You should specify a license for your package so that people know how they are -permitted to use it, and any restrictions you're placing on it.

    -

    If you're using a common license such as BSD-2-Clause or MIT, add a -current SPDX license identifier for the license you're using, like this:

    -
    { "license" : "BSD-3-Clause" }
    -

    You can check the full list of SPDX license IDs. -Ideally you should pick one that is -OSI approved.

    -

    If your package is licensed under multiple common licenses, use an SPDX license -expression syntax version 2.0 string, like this:

    -
    { "license" : "(ISC OR GPL-3.0)" }
    -

    If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression:

    -
    { "license" : "SEE LICENSE IN <filename>" }
    -

    Then include a file named <filename> at the top level of the package.

    -

    Some old packages used license objects or a "licenses" property containing an -array of license objects:

    -
    // Not valid metadata
    -{ "license" :
    -  { "type" : "ISC"
    -  , "url" : "http://opensource.org/licenses/ISC"
    -  }
    -}
    -
    -// Not valid metadata
    -{ "licenses" :
    -  [
    -    { "type": "MIT"
    -    , "url": "http://www.opensource.org/licenses/mit-license.php"
    -    }
    -  , { "type": "Apache-2.0"
    -    , "url": "http://opensource.org/licenses/apache2.0.php"
    -    }
    -  ]
    -}
    -

    Those styles are now deprecated. Instead, use SPDX expressions, like this:

    -
    { "license": "ISC" }
    -
    -{ "license": "(MIT OR Apache-2.0)" }
    -

    Finally, if you do not wish to grant others the right to use a private or -unpublished package under any terms:

    -
    { "license": "UNLICENSED"}
    -

    Consider also setting "private": true to prevent accidental publication.

    -

    people fields: author, contributors

    -

    The "author" is one person. "contributors" is an array of people. A "person" -is an object with a "name" field and optionally "url" and "email", like this:

    -
    { "name" : "Barney Rubble"
    -, "email" : "b@rubble.com"
    -, "url" : "http://barnyrubble.tumblr.com/"
    -}
    -

    Or you can shorten that all into a single string, and npm will parse it for you:

    -
    "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
    -

    Both email and url are optional either way.

    -

    npm also sets a top-level "maintainers" field with your npm user info.

    -

    files

    -

    The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.)

    -

    You can also provide a ".npmignore" file in the root of your package, -which will keep files from being included, even if they would be picked -up by the files array. The ".npmignore" file works just like a -".gitignore".

    -

    Certain files are always included, regardless of settings:

    -
      -
    • package.json
    • -
    • README (and its variants)
    • -
    • CHANGELOG (and its variants)
    • -
    • LICENSE / LICENCE
    • -
    -

    Conversely, some files are always ignored:

    -
      -
    • .git
    • -
    • CVS
    • -
    • .svn
    • -
    • .hg
    • -
    • .lock-wscript
    • -
    • .wafpickle-N
    • -
    • *.swp
    • -
    • .DS_Store
    • -
    • ._*
    • -
    • npm-debug.log
    • -
    -

    main

    -

    The main field is a module ID that is the primary entry point to your program. -That is, if your package is named foo, and a user installs it, and then does -require("foo"), then your main module's exports object will be returned.

    -

    This should be a module ID relative to the root of your package folder.

    -

    For most modules, it makes the most sense to have a main script and often not -much else.

    -

    bin

    -

    A lot of packages have one or more executable files that they'd like to -install into the PATH. npm makes this pretty easy (in fact, it uses this -feature to install the "npm" executable.)

    -

    To use this, supply a bin field in your package.json which is a map of -command name to local file name. On install, npm will symlink that file into -prefix/bin for global installs, or ./node_modules/.bin/ for local -installs.

    -

    For example, myapp could have this:

    -
    { "bin" : { "myapp" : "./cli.js" } }
    -

    So, when you install myapp, it'll create a symlink from the cli.js script to -/usr/local/bin/myapp.

    -

    If you have a single executable, and its name should be the name -of the package, then you can just supply it as a string. For example:

    -
    { "name": "my-program"
    -, "version": "1.2.5"
    -, "bin": "./path/to/program" }
    -

    would be the same as this:

    -
    { "name": "my-program"
    -, "version": "1.2.5"
    -, "bin" : { "my-program" : "./path/to/program" } }
    -

    man

    -

    Specify either a single file or an array of filenames to put in place for the -man program to find.

    -

    If only a single file is provided, then it's installed such that it is the -result from man <pkgname>, regardless of its actual filename. For example:

    -
    { "name" : "foo"
    -, "version" : "1.2.3"
    -, "description" : "A packaged foo fooer for fooing foos"
    -, "main" : "foo.js"
    -, "man" : "./man/doc.1"
    -}
    -

    would link the ./man/doc.1 file in such that it is the target for man foo

    -

    If the filename doesn't start with the package name, then it's prefixed. -So, this:

    -
    { "name" : "foo"
    -, "version" : "1.2.3"
    -, "description" : "A packaged foo fooer for fooing foos"
    -, "main" : "foo.js"
    -, "man" : [ "./man/foo.1", "./man/bar.1" ]
    -}
    -

    will create files to do man foo and man foo-bar.

    -

    Man files must end with a number, and optionally a .gz suffix if they are -compressed. The number dictates which man section the file is installed into.

    -
    { "name" : "foo"
    -, "version" : "1.2.3"
    -, "description" : "A packaged foo fooer for fooing foos"
    -, "main" : "foo.js"
    -, "man" : [ "./man/foo.1", "./man/foo.2" ]
    -}
    -

    will create entries for man foo and man 2 foo

    -

    directories

    -

    The CommonJS Packages spec details a -few ways that you can indicate the structure of your package using a directories -object. If you look at npm's package.json, -you'll see that it has directories for doc, lib, and man.

    -

    In the future, this information may be used in other creative ways.

    -

    directories.lib

    -

    Tell people where the bulk of your library is. Nothing special is done -with the lib folder in any way, but it's useful meta info.

    -

    directories.bin

    -

    If you specify a bin directory in directories.bin, all the files in -that folder will be added.

    -

    Because of the way the bin directive works, specifying both a -bin path and setting directories.bin is an error. If you want to -specify individual files, use bin, and for all the files in an -existing bin directory, use directories.bin.

    -

    directories.man

    -

    A folder that is full of man pages. Sugar to generate a "man" array by -walking the folder.

    -

    directories.doc

    -

    Put markdown files in here. Eventually, these will be displayed nicely, -maybe, someday.

    -

    directories.example

    -

    Put example scripts in here. Someday, it might be exposed in some clever way.

    -

    repository

    -

    Specify the place where your code lives. This is helpful for people who -want to contribute. If the git repo is on GitHub, then the npm docs -command will be able to find you.

    -

    Do it like this:

    -
    "repository" :
    -  { "type" : "git"
    -  , "url" : "https://github.com/npm/npm.git"
    -  }
    -
    -"repository" :
    -  { "type" : "svn"
    -  , "url" : "https://v8.googlecode.com/svn/trunk/"
    -  }
    -

    The URL should be a publicly available (perhaps read-only) url that can be handed -directly to a VCS program without any modification. It should not be a url to an -html project page that you put in your browser. It's for computers.

    -

    For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same -shortcut syntax you use for npm install:

    -
    "repository": "npm/npm"
    -
    -"repository": "gist:11081aaa281"
    -
    -"repository": "bitbucket:example/repo"
    -
    -"repository": "gitlab:another/repo"
    -

    scripts

    -

    The "scripts" property is a dictionary containing script commands that are run -at various times in the lifecycle of your package. The key is the lifecycle -event, and the value is the command to run at that point.

    -

    See npm-scripts(7) to find out more about writing package scripts.

    -

    config

    -

    A "config" object can be used to set configuration parameters used in package -scripts that persist across upgrades. For instance, if a package had the -following:

    -
    { "name" : "foo"
    -, "config" : { "port" : "8080" } }
    -

    and then had a "start" command that then referenced the -npm_package_config_port environment variable, then the user could -override that by doing npm config set foo:port 8001.

    -

    See npm-config(7) and npm-scripts(7) for more on package -configs.

    -

    dependencies

    -

    Dependencies are specified in a simple object that maps a package name to a -version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with a -tarball or git URL.

    -

    Please do not put test harnesses or transpilers in your -dependencies object. See devDependencies, below.

    -

    See semver(7) for more details about specifying version ranges.

    -
      -
    • version Must match version exactly
    • -
    • >version Must be greater than version
    • -
    • >=version etc
    • -
    • <version
    • -
    • <=version
    • -
    • ~version "Approximately equivalent to version" See semver(7)
    • -
    • ^version "Compatible with version" See semver(7)
    • -
    • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
    • -
    • http://... See 'URLs as Dependencies' below
    • -
    • * Matches any version
    • -
    • "" (just an empty string) Same as *
    • -
    • version1 - version2 Same as >=version1 <=version2.
    • -
    • range1 || range2 Passes if either range1 or range2 are satisfied.
    • -
    • git... See 'Git URLs as Dependencies' below
    • -
    • user/repo See 'GitHub URLs' below
    • -
    • tag A specific version tagged and published as tag See npm-tag(1)
    • -
    • path/path/path See Local Paths below
    • -
    -

    For example, these are all valid:

    -
    { "dependencies" :
    -  { "foo" : "1.0.0 - 2.9999.9999"
    -  , "bar" : ">=1.0.2 <2.1.2"
    -  , "baz" : ">1.0.2 <=2.3.4"
    -  , "boo" : "2.0.1"
    -  , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
    -  , "asd" : "http://asdf.com/asdf.tar.gz"
    -  , "til" : "~1.2"
    -  , "elf" : "~1.2.3"
    -  , "two" : "2.x"
    -  , "thr" : "3.3.x"
    -  , "lat" : "latest"
    -  , "dyl" : "file:../dyl"
    -  }
    -}
    -

    URLs as Dependencies

    -

    You may specify a tarball URL in place of a version range.

    -

    This tarball will be downloaded and installed locally to your package at -install time.

    -

    Git URLs as Dependencies

    -

    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
    -

    The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is master.

    -

    GitHub URLs

    -

    As of version 1.1.65, you can refer to GitHub urls as just "foo": -"user/foo-project". Just as with git URLs, a commit-ish suffix can be -included. For example:

    -
    {
    -  "name": "foo",
    -  "version": "0.0.0",
    -  "dependencies": {
    -    "express": "visionmedia/express",
    -    "mocha": "visionmedia/mocha#4727d357ea"
    -  }
    -}
    -

    Local Paths

    -

    As of version 2.0.0 you can provide a path to a local directory that contains a -package. Local paths can be saved using npm install --save, using any of -these forms:

    -
    ../foo/bar
    -~/foo/bar
    -./foo/bar
    -/foo/bar
    -

    in which case they will be normalized to a relative path and added to your -package.json. For example:

    -
    {
    -  "name": "baz",
    -  "dependencies": {
    -    "bar": "file:../foo/bar"
    -  }
    -}
    -

    This feature is helpful for local offline development and creating -tests that require npm installing where you don't want to hit an -external server, but should not be used when publishing packages -to the public registry.

    -

    devDependencies

    -

    If someone is planning on downloading and using your module in their -program, then they probably don't want or need to download and build -the external test or documentation framework that you use.

    -

    In this case, it's best to map these additional items in a devDependencies -object.

    -

    These things will be installed when doing npm link or npm install -from the root of a package, and can be managed like any other npm -configuration param. See npm-config(7) for more on the topic.

    -

    For build steps that are not platform-specific, such as compiling -CoffeeScript or other languages to JavaScript, use the prepublish -script to do this, and make the required package a devDependency.

    -

    For example:

    -
    { "name": "ethopia-waza",
    -  "description": "a delightfully fruity coffee varietal",
    -  "version": "1.2.3",
    -  "devDependencies": {
    -    "coffee-script": "~1.6.3"
    -  },
    -  "scripts": {
    -    "prepublish": "coffee -o lib/ -c src/waza.coffee"
    -  },
    -  "main": "lib/waza.js"
    -}
    -

    The prepublish script will be run before publishing, so that users -can consume the functionality without requiring them to compile it -themselves. In dev mode (ie, locally running npm install), it'll -run this script as well, so that you can test it easily.

    -

    peerDependencies

    -

    In some cases, you want to express the compatibility of your package with a -host tool or library, while not necessarily doing a require of this host. -This is usually referred to as a plugin. Notably, your module may be exposing -a specific interface, expected and specified by the host documentation.

    -

    For example:

    -
    {
    -  "name": "tea-latte",
    -  "version": "1.3.5",
    -  "peerDependencies": {
    -    "tea": "2.x"
    -  }
    -}
    -

    This ensures your package tea-latte can be installed along with the second -major version of the host package tea only. npm install tea-latte could -possibly yield the following dependency graph:

    -
    ├── tea-latte@1.3.5
    -└── tea@2.2.0
    -

    NOTE: npm versions 1 and 2 will automatically install peerDependencies if -they are not explicitly depended upon higher in the dependency tree. In the -next major version of npm (npm@3), this will no longer be the case. You will -receive a warning that the peerDependency is not installed instead. The -behavior in npms 1 & 2 was frequently confusing and could easily put you into -dependency hell, a situation that npm is designed to avoid as much as possible.

    -

    Trying to install another plugin with a conflicting requirement will cause an -error. For this reason, make sure your plugin requirement is as broad as -possible, and not to lock it down to specific patch versions.

    -

    Assuming the host complies with semver, only changes in -the host package's major version will break your plugin. Thus, if you've worked -with every 1.x version of the host package, use "^1.0" or "1.x" to express -this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2".

    -

    bundledDependencies

    -

    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 -object. This is a map of package name to version or url, just like the -dependencies object. The difference is that build failures do not cause -installation to fail.

    -

    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 node that your stuff works on:

    -
    { "engines" : { "node" : ">=0.10.3 <0.12" } }
    -

    And, like with dependencies, if you don't specify the version (or if you -specify "*" as the version), then any version of node will do.

    -

    If you specify an "engines" field, then npm will require that "node" be -somewhere on that list. If "engines" is omitted, then npm will just assume -that it works on node.

    -

    You can also use the "engines" field to specify which versions of npm -are capable of properly installing your program. For example:

    -
    { "engines" : { "npm" : "~1.0.20" } }
    -

    Note that, unless the user has set the engine-strict config flag, this -field is advisory only.

    -

    engineStrict

    -

    NOTE: This feature is deprecated and will be removed in npm 3.0.0.

    -

    If you are sure that your module will definitely not run properly on -versions of Node/npm other than those specified in the engines object, -then you can set "engineStrict": true in your package.json file. -This will override the user's engine-strict config setting.

    -

    Please do not do this unless you are really very very sure. If your -engines object is something overly restrictive, you can quite easily and -inadvertently lock yourself into obscurity and prevent your users from -updating to new versions of Node. Consider this choice carefully.

    -

    os

    -

    You can specify which operating systems your -module will run on:

    -
    "os" : [ "darwin", "linux" ]
    -

    You can also blacklist instead of whitelist operating systems, -just prepend the blacklisted os with a '!':

    -
    "os" : [ "!win32" ]
    -

    The host operating system is determined by process.platform

    -

    It is allowed to both blacklist, and whitelist, although there isn't any -good reason to do this.

    -

    cpu

    -

    If your code only runs on certain cpu architectures, -you can specify which ones.

    -
    "cpu" : [ "x64", "ia32" ]
    -

    Like the os option, you can also blacklist architectures:

    -
    "cpu" : [ "!arm", "!mips" ]
    -

    The host architecture is determined by process.arch

    -

    preferGlobal

    -

    If your package is primarily a command-line application that should be -installed globally, then set this value to true to provide a warning -if it is installed locally.

    -

    It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected.

    -

    private

    -

    If you set "private": true in your package.json, then npm will refuse -to publish it.

    -

    This is a way to prevent accidental publication of private repositories. If -you would like to ensure that a given package is only ever published to a -specific registry (for example, an internal registry), then use the -publishConfig dictionary described below to override the registry config -param at publish-time.

    -

    publishConfig

    -

    This is a set of config values that will be used at publish-time. It's -especially handy if you want to set the tag, registry or access, so that -you can ensure that a given package is not tagged with "latest", published -to the global public registry or that a scoped module is private by default.

    -

    Any config values can be overridden, but of course only "tag", "registry" and -"access" probably matter for the purposes of publishing.

    -

    See npm-config(7) to see the list of config options that can be -overridden.

    -

    DEFAULT VALUES

    -

    npm will default some values based on package contents.

    -
      -
    • "scripts": {"start": "node server.js"}

      -

      If there is a server.js file in the root of your package, then npm -will default the start command to node server.js.

      -
    • -
    • "scripts":{"preinstall": "node-gyp rebuild"}

      -

      If there is a binding.gyp file in the root of your package, npm will -default the preinstall command to compile using node-gyp.

      -
    • -
    • "contributors": [...]

      -

      If there is an AUTHORS file in the root of your package, npm will -treat each line as a Name <email> (url) format, where email and url -are optional. Lines which start with a # or are blank, will be -ignored.

      -
    • -
    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/files/npmrc.html b/deps/npm/html/partial/doc/files/npmrc.html deleted file mode 100644 index ed1eb0295fa..00000000000 --- a/deps/npm/html/partial/doc/files/npmrc.html +++ /dev/null @@ -1,63 +0,0 @@ -

    npmrc

    The npm config files

    -

    DESCRIPTION

    -

    npm gets its config settings from the command line, environment -variables, and npmrc files.

    -

    The npm config command can be used to update and edit the contents -of the user and global npmrc files.

    -

    For a list of available configuration options, see npm-config(7).

    -

    FILES

    -

    The four relevant files are:

    -
      -
    • per-project config file (/path/to/my/project/.npmrc)
    • -
    • per-user config file (~/.npmrc)
    • -
    • global config file ($PREFIX/etc/npmrc)
    • -
    • npm builtin config file (/path/to/npm/npmrc)
    • -
    -

    All npm config files are an ini-formatted list of key = value -parameters. Environment variables can be replaced using -${VARIABLE_NAME}. For example:

    -
    prefix = ${HOME}/.npm-packages
    -

    Each of these files is loaded, and config options are resolved in -priority order. For example, a setting in the userconfig file would -override the setting in the globalconfig file.

    -

    Array values are specified by adding "[]" after the key name. For -example:

    -
    key[] = "first value"
    -key[] = "second value"
    -

    NOTE: Because local (per-project or per-user) .npmrc files can contain -sensitive credentials, they must be readable and writable only by your user -account (i.e. must have a mode of 0600), otherwise they will be ignored by -npm!

    -

    Per-project config file

    -

    When working locally in a project, a .npmrc file in the root of the -project (ie, a sibling of node_modules and package.json) will set -config values specific to this project.

    -

    Note that this only applies to the root of the project that you're -running npm in. It has no effect when your module is published. For -example, you can't publish a module that forces itself to install -globally, or in a different location.

    -

    Additionally, this file is not read in global mode, such as when running -npm install -g.

    -

    Per-user config file

    -

    $HOME/.npmrc (or the userconfig param, if set in the environment -or on the command line)

    -

    Global config file

    -

    $PREFIX/etc/npmrc (or the globalconfig param, if set above): -This file is an ini-file formatted list of key = value parameters. -Environment variables can be replaced as above.

    -

    Built-in config file

    -

    path/to/npm/itself/npmrc

    -

    This is an unchangeable "builtin" configuration file that npm keeps -consistent across updates. Set fields in here using the ./configure -script that comes with npm. This is primarily for distribution -maintainers to override default configs in a standard and consistent -manner.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html deleted file mode 100644 index b2e54ba742e..00000000000 --- a/deps/npm/html/partial/doc/files/package.json.html +++ /dev/null @@ -1,545 +0,0 @@ -

    package.json

    Specifics of npm's package.json handling

    -

    DESCRIPTION

    -

    This document is all you need to know about what's required in your package.json -file. It must be actual JSON, not just a JavaScript object literal.

    -

    A lot of the behavior described in this document is affected by the config -settings described in npm-config(7).

    -

    name

    -

    The most important things in your package.json are the name and version fields. -Those are actually required, and your package won't install without -them. The name and version together form an identifier that is assumed -to be completely unique. Changes to the package should come along with -changes to the version.

    -

    The name is what your thing is called.

    -

    Some rules:

    -
      -
    • The name must be shorter than 214 characters. This includes the scope for -scoped packages.
    • -
    • The name can't start with a dot or an underscore.
    • -
    • New packages must not have uppercase letters in the name.
    • -
    • The name ends up being part of a URL, an argument on the command line, and a -folder name. Therefore, the name can't contain any non-URL-safe characters.
    • -
    -

    Some tips:

    -
      -
    • Don't use the same name as a core Node module.
    • -
    • Don't put "js" or "node" in the name. It's assumed that it's js, since you're -writing a package.json file, and you can specify the engine using the "engines" -field. (See below.)
    • -
    • The name will probably be passed as an argument to require(), so it should -be something short, but also reasonably descriptive.
    • -
    • You may want to check the npm registry to see if there's something by that name -already, before you get too attached to it. https://www.npmjs.com/
    • -
    -

    A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -npm-scope(7) for more detail.

    -

    version

    -

    The most important things in your package.json are the name and version fields. -Those are actually required, and your package won't install without -them. The name and version together form an identifier that is assumed -to be completely unique. Changes to the package should come along with -changes to the version.

    -

    Version must be parseable by -node-semver, which is bundled -with npm as a dependency. (npm install semver to use it yourself.)

    -

    More on version numbers and ranges at semver(7).

    -

    description

    -

    Put a description in it. It's a string. This helps people discover your -package, as it's listed in npm search.

    -

    keywords

    -

    Put keywords in it. It's an array of strings. This helps people -discover your package as it's listed in npm search.

    -

    homepage

    -

    The url to the project homepage.

    -

    NOTE: This is not the same as "url". If you put a "url" field, -then the registry will think it's a redirection to your package that has -been published somewhere else, and spit at you.

    -

    Literally. Spit. I'm so not kidding.

    -

    bugs

    -

    The url to your project's issue tracker and / or the email address to which -issues should be reported. These are helpful for people who encounter issues -with your package.

    -

    It should look like this:

    -
    { "url" : "https://github.com/owner/project/issues"
    -, "email" : "project@hostname.com"
    -}
    -

    You can specify either one or both values. If you want to provide only a url, -you can specify the value for "bugs" as a simple string instead of an object.

    -

    If a url is provided, it will be used by the npm bugs command.

    -

    license

    -

    You should specify a license for your package so that people know how they are -permitted to use it, and any restrictions you're placing on it.

    -

    If you're using a common license such as BSD-2-Clause or MIT, add a -current SPDX license identifier for the license you're using, like this:

    -
    { "license" : "BSD-3-Clause" }
    -

    You can check the full list of SPDX license IDs. -Ideally you should pick one that is -OSI approved.

    -

    If your package is licensed under multiple common licenses, use an SPDX license -expression syntax version 2.0 string, like this:

    -
    { "license" : "(ISC OR GPL-3.0)" }
    -

    If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use the following valid SPDX expression:

    -
    { "license" : "SEE LICENSE IN <filename>" }
    -

    Then include a file named <filename> at the top level of the package.

    -

    Some old packages used license objects or a "licenses" property containing an -array of license objects:

    -
    // Not valid metadata
    -{ "license" :
    -  { "type" : "ISC"
    -  , "url" : "http://opensource.org/licenses/ISC"
    -  }
    -}
    -
    -// Not valid metadata
    -{ "licenses" :
    -  [
    -    { "type": "MIT"
    -    , "url": "http://www.opensource.org/licenses/mit-license.php"
    -    }
    -  , { "type": "Apache-2.0"
    -    , "url": "http://opensource.org/licenses/apache2.0.php"
    -    }
    -  ]
    -}
    -

    Those styles are now deprecated. Instead, use SPDX expressions, like this:

    -
    { "license": "ISC" }
    -
    -{ "license": "(MIT OR Apache-2.0)" }
    -

    Finally, if you do not wish to grant others the right to use a private or -unpublished package under any terms:

    -
    { "license": "UNLICENSED"}
    -

    Consider also setting "private": true to prevent accidental publication.

    -

    people fields: author, contributors

    -

    The "author" is one person. "contributors" is an array of people. A "person" -is an object with a "name" field and optionally "url" and "email", like this:

    -
    { "name" : "Barney Rubble"
    -, "email" : "b@rubble.com"
    -, "url" : "http://barnyrubble.tumblr.com/"
    -}
    -

    Or you can shorten that all into a single string, and npm will parse it for you:

    -
    "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
    -

    Both email and url are optional either way.

    -

    npm also sets a top-level "maintainers" field with your npm user info.

    -

    files

    -

    The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.)

    -

    You can also provide a ".npmignore" file in the root of your package, -which will keep files from being included, even if they would be picked -up by the files array. The ".npmignore" file works just like a -".gitignore".

    -

    Certain files are always included, regardless of settings:

    -
      -
    • package.json
    • -
    • README (and its variants)
    • -
    • CHANGELOG (and its variants)
    • -
    • LICENSE / LICENCE
    • -
    -

    Conversely, some files are always ignored:

    -
      -
    • .git
    • -
    • CVS
    • -
    • .svn
    • -
    • .hg
    • -
    • .lock-wscript
    • -
    • .wafpickle-N
    • -
    • *.swp
    • -
    • .DS_Store
    • -
    • ._*
    • -
    • npm-debug.log
    • -
    -

    main

    -

    The main field is a module ID that is the primary entry point to your program. -That is, if your package is named foo, and a user installs it, and then does -require("foo"), then your main module's exports object will be returned.

    -

    This should be a module ID relative to the root of your package folder.

    -

    For most modules, it makes the most sense to have a main script and often not -much else.

    -

    bin

    -

    A lot of packages have one or more executable files that they'd like to -install into the PATH. npm makes this pretty easy (in fact, it uses this -feature to install the "npm" executable.)

    -

    To use this, supply a bin field in your package.json which is a map of -command name to local file name. On install, npm will symlink that file into -prefix/bin for global installs, or ./node_modules/.bin/ for local -installs.

    -

    For example, myapp could have this:

    -
    { "bin" : { "myapp" : "./cli.js" } }
    -

    So, when you install myapp, it'll create a symlink from the cli.js script to -/usr/local/bin/myapp.

    -

    If you have a single executable, and its name should be the name -of the package, then you can just supply it as a string. For example:

    -
    { "name": "my-program"
    -, "version": "1.2.5"
    -, "bin": "./path/to/program" }
    -

    would be the same as this:

    -
    { "name": "my-program"
    -, "version": "1.2.5"
    -, "bin" : { "my-program" : "./path/to/program" } }
    -

    man

    -

    Specify either a single file or an array of filenames to put in place for the -man program to find.

    -

    If only a single file is provided, then it's installed such that it is the -result from man <pkgname>, regardless of its actual filename. For example:

    -
    { "name" : "foo"
    -, "version" : "1.2.3"
    -, "description" : "A packaged foo fooer for fooing foos"
    -, "main" : "foo.js"
    -, "man" : "./man/doc.1"
    -}
    -

    would link the ./man/doc.1 file in such that it is the target for man foo

    -

    If the filename doesn't start with the package name, then it's prefixed. -So, this:

    -
    { "name" : "foo"
    -, "version" : "1.2.3"
    -, "description" : "A packaged foo fooer for fooing foos"
    -, "main" : "foo.js"
    -, "man" : [ "./man/foo.1", "./man/bar.1" ]
    -}
    -

    will create files to do man foo and man foo-bar.

    -

    Man files must end with a number, and optionally a .gz suffix if they are -compressed. The number dictates which man section the file is installed into.

    -
    { "name" : "foo"
    -, "version" : "1.2.3"
    -, "description" : "A packaged foo fooer for fooing foos"
    -, "main" : "foo.js"
    -, "man" : [ "./man/foo.1", "./man/foo.2" ]
    -}
    -

    will create entries for man foo and man 2 foo

    -

    directories

    -

    The CommonJS Packages spec details a -few ways that you can indicate the structure of your package using a directories -object. If you look at npm's package.json, -you'll see that it has directories for doc, lib, and man.

    -

    In the future, this information may be used in other creative ways.

    -

    directories.lib

    -

    Tell people where the bulk of your library is. Nothing special is done -with the lib folder in any way, but it's useful meta info.

    -

    directories.bin

    -

    If you specify a bin directory in directories.bin, all the files in -that folder will be added.

    -

    Because of the way the bin directive works, specifying both a -bin path and setting directories.bin is an error. If you want to -specify individual files, use bin, and for all the files in an -existing bin directory, use directories.bin.

    -

    directories.man

    -

    A folder that is full of man pages. Sugar to generate a "man" array by -walking the folder.

    -

    directories.doc

    -

    Put markdown files in here. Eventually, these will be displayed nicely, -maybe, someday.

    -

    directories.example

    -

    Put example scripts in here. Someday, it might be exposed in some clever way.

    -

    repository

    -

    Specify the place where your code lives. This is helpful for people who -want to contribute. If the git repo is on GitHub, then the npm docs -command will be able to find you.

    -

    Do it like this:

    -
    "repository" :
    -  { "type" : "git"
    -  , "url" : "https://github.com/npm/npm.git"
    -  }
    -
    -"repository" :
    -  { "type" : "svn"
    -  , "url" : "https://v8.googlecode.com/svn/trunk/"
    -  }
    -

    The URL should be a publicly available (perhaps read-only) url that can be handed -directly to a VCS program without any modification. It should not be a url to an -html project page that you put in your browser. It's for computers.

    -

    For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same -shortcut syntax you use for npm install:

    -
    "repository": "npm/npm"
    -
    -"repository": "gist:11081aaa281"
    -
    -"repository": "bitbucket:example/repo"
    -
    -"repository": "gitlab:another/repo"
    -

    scripts

    -

    The "scripts" property is a dictionary containing script commands that are run -at various times in the lifecycle of your package. The key is the lifecycle -event, and the value is the command to run at that point.

    -

    See npm-scripts(7) to find out more about writing package scripts.

    -

    config

    -

    A "config" object can be used to set configuration parameters used in package -scripts that persist across upgrades. For instance, if a package had the -following:

    -
    { "name" : "foo"
    -, "config" : { "port" : "8080" } }
    -

    and then had a "start" command that then referenced the -npm_package_config_port environment variable, then the user could -override that by doing npm config set foo:port 8001.

    -

    See npm-config(7) and npm-scripts(7) for more on package -configs.

    -

    dependencies

    -

    Dependencies are specified in a simple object that maps a package name to a -version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with a -tarball or git URL.

    -

    Please do not put test harnesses or transpilers in your -dependencies object. See devDependencies, below.

    -

    See semver(7) for more details about specifying version ranges.

    -
      -
    • version Must match version exactly
    • -
    • >version Must be greater than version
    • -
    • >=version etc
    • -
    • <version
    • -
    • <=version
    • -
    • ~version "Approximately equivalent to version" See semver(7)
    • -
    • ^version "Compatible with version" See semver(7)
    • -
    • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
    • -
    • http://... See 'URLs as Dependencies' below
    • -
    • * Matches any version
    • -
    • "" (just an empty string) Same as *
    • -
    • version1 - version2 Same as >=version1 <=version2.
    • -
    • range1 || range2 Passes if either range1 or range2 are satisfied.
    • -
    • git... See 'Git URLs as Dependencies' below
    • -
    • user/repo See 'GitHub URLs' below
    • -
    • tag A specific version tagged and published as tag See npm-tag(1)
    • -
    • path/path/path See Local Paths below
    • -
    -

    For example, these are all valid:

    -
    { "dependencies" :
    -  { "foo" : "1.0.0 - 2.9999.9999"
    -  , "bar" : ">=1.0.2 <2.1.2"
    -  , "baz" : ">1.0.2 <=2.3.4"
    -  , "boo" : "2.0.1"
    -  , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
    -  , "asd" : "http://asdf.com/asdf.tar.gz"
    -  , "til" : "~1.2"
    -  , "elf" : "~1.2.3"
    -  , "two" : "2.x"
    -  , "thr" : "3.3.x"
    -  , "lat" : "latest"
    -  , "dyl" : "file:../dyl"
    -  }
    -}
    -

    URLs as Dependencies

    -

    You may specify a tarball URL in place of a version range.

    -

    This tarball will be downloaded and installed locally to your package at -install time.

    -

    Git URLs as Dependencies

    -

    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
    -

    The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is master.

    -

    GitHub URLs

    -

    As of version 1.1.65, you can refer to GitHub urls as just "foo": -"user/foo-project". Just as with git URLs, a commit-ish suffix can be -included. For example:

    -
    {
    -  "name": "foo",
    -  "version": "0.0.0",
    -  "dependencies": {
    -    "express": "visionmedia/express",
    -    "mocha": "visionmedia/mocha#4727d357ea"
    -  }
    -}
    -

    Local Paths

    -

    As of version 2.0.0 you can provide a path to a local directory that contains a -package. Local paths can be saved using npm install --save, using any of -these forms:

    -
    ../foo/bar
    -~/foo/bar
    -./foo/bar
    -/foo/bar
    -

    in which case they will be normalized to a relative path and added to your -package.json. For example:

    -
    {
    -  "name": "baz",
    -  "dependencies": {
    -    "bar": "file:../foo/bar"
    -  }
    -}
    -

    This feature is helpful for local offline development and creating -tests that require npm installing where you don't want to hit an -external server, but should not be used when publishing packages -to the public registry.

    -

    devDependencies

    -

    If someone is planning on downloading and using your module in their -program, then they probably don't want or need to download and build -the external test or documentation framework that you use.

    -

    In this case, it's best to map these additional items in a devDependencies -object.

    -

    These things will be installed when doing npm link or npm install -from the root of a package, and can be managed like any other npm -configuration param. See npm-config(7) for more on the topic.

    -

    For build steps that are not platform-specific, such as compiling -CoffeeScript or other languages to JavaScript, use the prepublish -script to do this, and make the required package a devDependency.

    -

    For example:

    -
    { "name": "ethopia-waza",
    -  "description": "a delightfully fruity coffee varietal",
    -  "version": "1.2.3",
    -  "devDependencies": {
    -    "coffee-script": "~1.6.3"
    -  },
    -  "scripts": {
    -    "prepublish": "coffee -o lib/ -c src/waza.coffee"
    -  },
    -  "main": "lib/waza.js"
    -}
    -

    The prepublish script will be run before publishing, so that users -can consume the functionality without requiring them to compile it -themselves. In dev mode (ie, locally running npm install), it'll -run this script as well, so that you can test it easily.

    -

    peerDependencies

    -

    In some cases, you want to express the compatibility of your package with a -host tool or library, while not necessarily doing a require of this host. -This is usually referred to as a plugin. Notably, your module may be exposing -a specific interface, expected and specified by the host documentation.

    -

    For example:

    -
    {
    -  "name": "tea-latte",
    -  "version": "1.3.5",
    -  "peerDependencies": {
    -    "tea": "2.x"
    -  }
    -}
    -

    This ensures your package tea-latte can be installed along with the second -major version of the host package tea only. npm install tea-latte could -possibly yield the following dependency graph:

    -
    ├── tea-latte@1.3.5
    -└── tea@2.2.0
    -

    NOTE: npm versions 1 and 2 will automatically install peerDependencies if -they are not explicitly depended upon higher in the dependency tree. In the -next major version of npm (npm@3), this will no longer be the case. You will -receive a warning that the peerDependency is not installed instead. The -behavior in npms 1 & 2 was frequently confusing and could easily put you into -dependency hell, a situation that npm is designed to avoid as much as possible.

    -

    Trying to install another plugin with a conflicting requirement will cause an -error. For this reason, make sure your plugin requirement is as broad as -possible, and not to lock it down to specific patch versions.

    -

    Assuming the host complies with semver, only changes in -the host package's major version will break your plugin. Thus, if you've worked -with every 1.x version of the host package, use "^1.0" or "1.x" to express -this. If you depend on features introduced in 1.5.2, use ">= 1.5.2 < 2".

    -

    bundledDependencies

    -

    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 -object. This is a map of package name to version or url, just like the -dependencies object. The difference is that build failures do not cause -installation to fail.

    -

    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 node that your stuff works on:

    -
    { "engines" : { "node" : ">=0.10.3 <0.12" } }
    -

    And, like with dependencies, if you don't specify the version (or if you -specify "*" as the version), then any version of node will do.

    -

    If you specify an "engines" field, then npm will require that "node" be -somewhere on that list. If "engines" is omitted, then npm will just assume -that it works on node.

    -

    You can also use the "engines" field to specify which versions of npm -are capable of properly installing your program. For example:

    -
    { "engines" : { "npm" : "~1.0.20" } }
    -

    Note that, unless the user has set the engine-strict config flag, this -field is advisory only.

    -

    engineStrict

    -

    NOTE: This feature is deprecated and will be removed in npm 3.0.0.

    -

    If you are sure that your module will definitely not run properly on -versions of Node/npm other than those specified in the engines object, -then you can set "engineStrict": true in your package.json file. -This will override the user's engine-strict config setting.

    -

    Please do not do this unless you are really very very sure. If your -engines object is something overly restrictive, you can quite easily and -inadvertently lock yourself into obscurity and prevent your users from -updating to new versions of Node. Consider this choice carefully.

    -

    os

    -

    You can specify which operating systems your -module will run on:

    -
    "os" : [ "darwin", "linux" ]
    -

    You can also blacklist instead of whitelist operating systems, -just prepend the blacklisted os with a '!':

    -
    "os" : [ "!win32" ]
    -

    The host operating system is determined by process.platform

    -

    It is allowed to both blacklist, and whitelist, although there isn't any -good reason to do this.

    -

    cpu

    -

    If your code only runs on certain cpu architectures, -you can specify which ones.

    -
    "cpu" : [ "x64", "ia32" ]
    -

    Like the os option, you can also blacklist architectures:

    -
    "cpu" : [ "!arm", "!mips" ]
    -

    The host architecture is determined by process.arch

    -

    preferGlobal

    -

    If your package is primarily a command-line application that should be -installed globally, then set this value to true to provide a warning -if it is installed locally.

    -

    It doesn't actually prevent users from installing it locally, but it -does help prevent some confusion if it doesn't work as expected.

    -

    private

    -

    If you set "private": true in your package.json, then npm will refuse -to publish it.

    -

    This is a way to prevent accidental publication of private repositories. If -you would like to ensure that a given package is only ever published to a -specific registry (for example, an internal registry), then use the -publishConfig dictionary described below to override the registry config -param at publish-time.

    -

    publishConfig

    -

    This is a set of config values that will be used at publish-time. It's -especially handy if you want to set the tag, registry or access, so that -you can ensure that a given package is not tagged with "latest", published -to the global public registry or that a scoped module is private by default.

    -

    Any config values can be overridden, but of course only "tag", "registry" and -"access" probably matter for the purposes of publishing.

    -

    See npm-config(7) to see the list of config options that can be -overridden.

    -

    DEFAULT VALUES

    -

    npm will default some values based on package contents.

    -
      -
    • "scripts": {"start": "node server.js"}

      -

      If there is a server.js file in the root of your package, then npm -will default the start command to node server.js.

      -
    • -
    • "scripts":{"preinstall": "node-gyp rebuild"}

      -

      If there is a binding.gyp file in the root of your package, npm will -default the preinstall command to compile using node-gyp.

      -
    • -
    • "contributors": [...]

      -

      If there is an AUTHORS file in the root of your package, npm will -treat each line as a Name <email> (url) format, where email and url -are optional. Lines which start with a # or are blank, will be -ignored.

      -
    • -
    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/index.html b/deps/npm/html/partial/doc/index.html deleted file mode 100644 index d074d9127bb..00000000000 --- a/deps/npm/html/partial/doc/index.html +++ /dev/null @@ -1,220 +0,0 @@ -

    npm-index

    Index of all npm documentation

    -

    README

    -

    a JavaScript package manager

    -

    Command Line Documentation

    -

    Using npm on the command line

    -

    npm(1)

    -

    javascript package manager

    -

    npm-access(1)

    -

    Set access level on published packages

    -

    npm-adduser(1)

    -

    Add a registry user account

    -

    npm-bin(1)

    -

    Display npm bin folder

    -

    npm-bugs(1)

    -

    Bugs for a package in a web browser maybe

    -

    npm-build(1)

    -

    Build a package

    -

    npm-bundle(1)

    -

    REMOVED

    -

    npm-cache(1)

    -

    Manipulates packages cache

    -

    npm-completion(1)

    -

    Tab Completion for npm

    -

    npm-config(1)

    -

    Manage the npm configuration files

    -

    npm-dedupe(1)

    -

    Reduce duplication

    -

    npm-deprecate(1)

    -

    Deprecate a version of a package

    -

    npm-dist-tag(1)

    -

    Modify package distribution tags

    -

    npm-docs(1)

    -

    Docs for a package in a web browser maybe

    -

    npm-edit(1)

    -

    Edit an installed package

    -

    npm-explore(1)

    -

    Browse an installed package

    -

    npm-help-search(1)

    -

    Search npm help documentation

    -

    npm-help(1)

    -

    Get help on npm

    -

    npm-init(1)

    -

    Interactively create a package.json file

    -

    npm-install(1)

    -

    Install a package

    - -

    Symlink a package folder

    -

    npm-logout(1)

    -

    Log out of the registry

    -

    npm-ls(1)

    -

    List installed packages

    -

    npm-outdated(1)

    -

    Check for outdated packages

    -

    npm-owner(1)

    -

    Manage package owners

    -

    npm-pack(1)

    -

    Create a tarball from a package

    -

    npm-ping(1)

    -

    Ping npm registry

    -

    npm-prefix(1)

    -

    Display prefix

    -

    npm-prune(1)

    -

    Remove extraneous packages

    -

    npm-publish(1)

    -

    Publish a package

    -

    npm-rebuild(1)

    -

    Rebuild a package

    -

    npm-repo(1)

    -

    Open package repository page in the browser

    -

    npm-restart(1)

    -

    Restart a package

    -

    npm-rm(1)

    -

    Remove a package

    -

    npm-root(1)

    -

    Display npm root

    -

    npm-run-script(1)

    -

    Run arbitrary package scripts

    -

    npm-search(1)

    -

    Search for packages

    -

    npm-shrinkwrap(1)

    -

    Lock down dependency versions

    -

    npm-star(1)

    -

    Mark your favorite packages

    -

    npm-stars(1)

    -

    View packages marked as favorites

    -

    npm-start(1)

    -

    Start a package

    -

    npm-stop(1)

    -

    Stop a package

    -

    npm-tag(1)

    -

    Tag a published version

    -

    npm-test(1)

    -

    Test a package

    -

    npm-uninstall(1)

    -

    Remove a package

    -

    npm-unpublish(1)

    -

    Remove a package from the registry

    -

    npm-update(1)

    -

    Update a package

    -

    npm-version(1)

    -

    Bump a package version

    -

    npm-view(1)

    -

    View registry info

    -

    npm-whoami(1)

    -

    Display npm username

    -

    API Documentation

    -

    Using npm in your Node programs

    -

    npm(3)

    -

    javascript package manager

    -

    npm-bin(3)

    -

    Display npm bin folder

    -

    npm-bugs(3)

    -

    Bugs for a package in a web browser maybe

    -

    npm-cache(3)

    -

    manage the npm cache programmatically

    -

    npm-commands(3)

    -

    npm commands

    -

    npm-config(3)

    -

    Manage the npm configuration files

    -

    npm-deprecate(3)

    -

    Deprecate a version of a package

    -

    npm-docs(3)

    -

    Docs for a package in a web browser maybe

    -

    npm-edit(3)

    -

    Edit an installed package

    -

    npm-explore(3)

    -

    Browse an installed package

    -

    npm-help-search(3)

    -

    Search the help pages

    -

    npm-init(3)

    -

    Interactively create a package.json file

    -

    npm-install(3)

    -

    install a package programmatically

    - -

    Symlink a package folder

    -

    npm-load(3)

    -

    Load config settings

    -

    npm-ls(3)

    -

    List installed packages

    -

    npm-outdated(3)

    -

    Check for outdated packages

    -

    npm-owner(3)

    -

    Manage package owners

    -

    npm-pack(3)

    -

    Create a tarball from a package

    -

    npm-ping(3)

    -

    Ping npm registry

    -

    npm-prefix(3)

    -

    Display prefix

    -

    npm-prune(3)

    -

    Remove extraneous packages

    -

    npm-publish(3)

    -

    Publish a package

    -

    npm-rebuild(3)

    -

    Rebuild a package

    -

    npm-repo(3)

    -

    Open package repository page in the browser

    -

    npm-restart(3)

    -

    Restart a package

    -

    npm-root(3)

    -

    Display npm root

    -

    npm-run-script(3)

    -

    Run arbitrary package scripts

    -

    npm-search(3)

    -

    Search for packages

    -

    npm-shrinkwrap(3)

    -

    programmatically generate package shrinkwrap file

    -

    npm-start(3)

    -

    Start a package

    -

    npm-stop(3)

    -

    Stop a package

    -

    npm-tag(3)

    -

    Tag a published version

    -

    npm-test(3)

    -

    Test a package

    -

    npm-uninstall(3)

    -

    uninstall a package programmatically

    -

    npm-unpublish(3)

    -

    Remove a package from the registry

    -

    npm-update(3)

    -

    Update a package

    -

    npm-version(3)

    -

    Bump a package version

    -

    npm-view(3)

    -

    View registry info

    -

    npm-whoami(3)

    -

    Display npm username

    -

    Files

    -

    File system structures npm uses

    -

    npm-folders(5)

    -

    Folder Structures Used by npm

    -

    npmrc(5)

    -

    The npm config files

    -

    package.json(5)

    -

    Specifics of npm's package.json handling

    -

    Misc

    -

    Various other bits and bobs

    -

    npm-coding-style(7)

    -

    npm's "funny" coding style

    -

    npm-config(7)

    -

    More than you probably want to know about npm configuration

    -

    npm-developers(7)

    -

    Developer Guide

    -

    npm-disputes(7)

    -

    Handling Module Name Disputes

    -

    npm-faq(7)

    -

    Frequently Asked Questions

    -

    npm-index(7)

    -

    Index of all npm documentation

    -

    npm-registry(7)

    -

    The JavaScript Package Registry

    -

    npm-scope(7)

    -

    Scoped packages

    -

    npm-scripts(7)

    -

    How npm handles the "scripts" field

    -

    removing-npm(7)

    -

    Cleaning the Slate

    -

    semver(7)

    -

    The semantic versioner for npm

    - diff --git a/deps/npm/html/partial/doc/misc/npm-coding-style.html b/deps/npm/html/partial/doc/misc/npm-coding-style.html deleted file mode 100644 index b50b95f27f7..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-coding-style.html +++ /dev/null @@ -1,127 +0,0 @@ -

    npm-coding-style

    npm's "funny" coding style

    -

    DESCRIPTION

    -

    npm's coding style is a bit unconventional. It is not different for -difference's sake, but rather a carefully crafted style that is -designed to reduce visual clutter and make bugs more apparent.

    -

    If you want to contribute to npm (which is very encouraged), you should -make your code conform to npm's style.

    -

    Note: this concerns npm's code not the specific packages that you can download from the npm registry.

    -

    Line Length

    -

    Keep lines shorter than 80 characters. It's better for lines to be -too short than to be too long. Break up long lists, objects, and other -statements onto multiple lines.

    -

    Indentation

    -

    Two-spaces. Tabs are better, but they look like hell in web browsers -(and on GitHub), and node uses 2 spaces, so that's that.

    -

    Configure your editor appropriately.

    -

    Curly braces

    -

    Curly braces belong on the same line as the thing that necessitates them.

    -

    Bad:

    -
    function ()
    -{
    -

    Good:

    -
    function () {
    -

    If a block needs to wrap to the next line, use a curly brace. Don't -use it if it doesn't.

    -

    Bad:

    -
    if (foo) { bar() }
    -while (foo)
    -  bar()
    -

    Good:

    -
    if (foo) bar()
    -while (foo) {
    -  bar()
    -}
    -

    Semicolons

    -

    Don't use them except in four situations:

    -
      -
    • for (;;) loops. They're actually required.
    • -
    • null loops like: while (something) ; (But you'd better have a good -reason for doing that.)
    • -
    • case "foo": doSomething(); break
    • -
    • In front of a leading ( or [ at the start of the line. -This prevents the expression from being interpreted -as a function call or property access, respectively.
    • -
    -

    Some examples of good semicolon usage:

    -
    ;(x || y).doSomething()
    -;[a, b, c].forEach(doSomething)
    -for (var i = 0; i < 10; i ++) {
    -  switch (state) {
    -    case "begin": start(); continue
    -    case "end": finish(); break
    -    default: throw new Error("unknown state")
    -  }
    -  end()
    -}
    -

    Note that starting lines with - and + also should be prefixed -with a semicolon, but this is much less common.

    -

    Comma First

    -

    If there is a list of things separated by commas, and it wraps -across multiple lines, put the comma at the start of the next -line, directly below the token that starts the list. Put the -final token in the list on a line by itself. For example:

    -
    var magicWords = [ "abracadabra"
    -                 , "gesundheit"
    -                 , "ventrilo"
    -                 ]
    -  , spells = { "fireball" : function () { setOnFire() }
    -             , "water" : function () { putOut() }
    -             }
    -  , a = 1
    -  , b = "abc"
    -  , etc
    -  , somethingElse
    -

    Whitespace

    -

    Put a single space in front of ( for anything other than a function call. -Also use a single space wherever it makes things more readable.

    -

    Don't leave trailing whitespace at the end of lines. Don't indent empty -lines. Don't use more spaces than are helpful.

    -

    Functions

    -

    Use named functions. They make stack traces a lot easier to read.

    -

    Callbacks, Sync/async Style

    -

    Use the asynchronous/non-blocking versions of things as much as possible. -It might make more sense for npm to use the synchronous fs APIs, but this -way, the fs and http and child process stuff all uses the same callback-passing -methodology.

    -

    The callback should always be the last argument in the list. Its first -argument is the Error or null.

    -

    Be very careful never to ever ever throw anything. It's worse than useless. -Just send the error message back as the first argument to the callback.

    -

    Errors

    -

    Always create a new Error object with your message. Don't just return a -string message to the callback. Stack traces are handy.

    -

    Logging

    -

    Logging is done using the npmlog -utility.

    -

    Please clean up logs when they are no longer helpful. In particular, -logging the same object over and over again is not helpful. Logs should -report what's happening so that it's easier to track down where a fault -occurs.

    -

    Use appropriate log levels. See npm-config(7) and search for -"loglevel".

    -

    Case, naming, etc.

    -

    Use lowerCamelCase for multiword identifiers when they refer to objects, -functions, methods, properties, or anything not specified in this section.

    -

    Use UpperCamelCase for class names (things that you'd pass to "new").

    -

    Use all-lower-hyphen-css-case for multiword filenames and config keys.

    -

    Use named functions. They make stack traces easier to follow.

    -

    Use CAPS_SNAKE_CASE for constants, things that should never change -and are rarely used.

    -

    Use a single uppercase letter for function names where the function -would normally be anonymous, but needs to call itself recursively. It -makes it clear that it's a "throwaway" function.

    -

    null, undefined, false, 0

    -

    Boolean variables and functions should always be either true or -false. Don't set it to 0 unless it's supposed to be a number.

    -

    When something is intentionally missing or removed, set it to null.

    -

    Don't set things to undefined. Reserve that value to mean "not yet -set to anything."

    -

    Boolean objects are verboten.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/npm-config.html b/deps/npm/html/partial/doc/misc/npm-config.html deleted file mode 100644 index 2694cb8b2d6..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-config.html +++ /dev/null @@ -1,779 +0,0 @@ -

    npm-config

    More than you probably want to know about npm configuration

    -

    DESCRIPTION

    -

    npm gets its configuration values from the following sources, sorted by priority:

    -

    Command Line Flags

    -

    Putting --foo bar on the command line sets the foo configuration -parameter to "bar". A -- argument tells the cli parser to stop -reading flags. A --flag parameter that is at the end of the -command will be given the value of true.

    -

    Environment Variables

    -

    Any environment variables that start with npm_config_ will be -interpreted as a configuration parameter. For example, putting -npm_config_foo=bar in your environment will set the foo -configuration parameter to bar. Any environment configurations that -are not given a value will be given the value of true. Config -values are case-insensitive, so NPM_CONFIG_FOO=bar will work the -same.

    -

    npmrc Files

    -

    The four relevant files are:

    -
      -
    • per-project config file (/path/to/my/project/.npmrc)
    • -
    • per-user config file (~/.npmrc)
    • -
    • global config file ($PREFIX/npmrc)
    • -
    • npm builtin config file (/path/to/npm/npmrc)
    • -
    -

    See npmrc(5) for more details.

    -

    Default Configs

    -

    A set of configuration parameters that are internal to npm, and are -defaults if nothing else is specified.

    -

    Shorthands and Other CLI Niceties

    -

    The following shorthands are parsed on the command-line:

    -
      -
    • -v: --version
    • -
    • -h, -?, --help, -H: --usage
    • -
    • -s, --silent: --loglevel silent
    • -
    • -q, --quiet: --loglevel warn
    • -
    • -d: --loglevel info
    • -
    • -dd, --verbose: --loglevel verbose
    • -
    • -ddd: --loglevel silly
    • -
    • -g: --global
    • -
    • -C: --prefix
    • -
    • -l: --long
    • -
    • -m: --message
    • -
    • -p, --porcelain: --parseable
    • -
    • -reg: --registry
    • -
    • -f: --force
    • -
    • -desc: --description
    • -
    • -S: --save
    • -
    • -D: --save-dev
    • -
    • -O: --save-optional
    • -
    • -B: --save-bundle
    • -
    • -E: --save-exact
    • -
    • -y: --yes
    • -
    • -n: --yes false
    • -
    • ll and la commands: ls --long
    • -
    -

    If the specified configuration param resolves unambiguously to a known -configuration parameter, then it is expanded to that configuration -parameter. For example:

    -
    npm ls --par
    -# same as:
    -npm ls --parseable
    -

    If multiple single-character shorthands are strung together, and the -resulting combination is unambiguously not some other configuration -param, then it is expanded to its various component pieces. For -example:

    -
    npm ls -gpld
    -# same as:
    -npm ls --global --parseable --long --loglevel info
    -

    Per-Package Config Settings

    -

    When running scripts (see npm-scripts(7)) the package.json "config" -keys are overwritten in the environment if there is a config param of -<name>[@<version>]:<key>. For example, if the package.json has -this:

    -
    { "name" : "foo"
    -, "config" : { "port" : "8080" }
    -, "scripts" : { "start" : "node server.js" } }
    -

    and the server.js is this:

    -
    http.createServer(...).listen(process.env.npm_package_config_port)
    -

    then the user could change the behavior by doing:

    -
    npm config set foo:port 80
    -

    See package.json(5) for more information.

    -

    Config Settings

    -

    access

    -
      -
    • Default: restricted
    • -
    • Type: Access
    • -
    -

    When publishing scoped packages, the access level defaults to restricted. If -you want your scoped package to be publicly viewable (and installable) set ---access=public. The only valid values for access are public and -restricted. Unscoped packages always have an access level of public.

    -

    always-auth

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

    Force npm to always require authentication when accessing the registry, -even for GET requests.

    - -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

    -

    Set to false to have it not do this. This can be used to work around -the fact that some file systems don't support symlinks, even on -ostensibly Unix systems.

    -

    browser

    -
      -
    • Default: OS X: "open", Windows: "start", Others: "xdg-open"
    • -
    • Type: String
    • -
    -

    The browser that is called by the npm docs command to open websites.

    -

    ca

    -
      -
    • Default: The npm CA certificate
    • -
    • Type: String, Array or null
    • -
    -

    The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format with newlines -replaced by the string "\n". For example:

    -
    ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
    -

    Set to null to only allow "known" registrars, or to a specific CA cert -to trust only that specific signing authority.

    -

    Multiple CAs can be trusted by specifying an array of certificates:

    -
    ca[]="..."
    -ca[]="..."
    -

    See also the strict-ssl config.

    -

    cafile

    -
      -
    • Default: null
    • -
    • Type: path
    • -
    -

    A path to a file containing one or multiple Certificate Authority signing -certificates. Similar to the ca setting, but allows for multiple CA's, as -well as for the CA information to be stored in a file on disk.

    -

    cache

    -
      -
    • Default: Windows: %AppData%\npm-cache, Posix: ~/.npm
    • -
    • Type: path
    • -
    -

    The location of npm's cache directory. See npm-cache(1)

    -

    cache-lock-stale

    -
      -
    • Default: 60000 (1 minute)
    • -
    • Type: Number
    • -
    -

    The number of ms before cache folder lockfiles are considered stale.

    -

    cache-lock-retries

    -
      -
    • Default: 10
    • -
    • Type: Number
    • -
    -

    Number of times to retry to acquire a lock on cache folder lockfiles.

    -

    cache-lock-wait

    -
      -
    • Default: 10000 (10 seconds)
    • -
    • Type: Number
    • -
    -

    Number of ms to wait for cache lock files to expire.

    -

    cache-max

    -
      -
    • Default: Infinity
    • -
    • Type: Number
    • -
    -

    The maximum time (in seconds) to keep items in the registry cache before -re-checking against the registry.

    -

    Note that no purging is done unless the npm cache clean command is -explicitly used, and that only GET requests use the cache.

    -

    cache-min

    -
      -
    • Default: 10
    • -
    • Type: Number
    • -
    -

    The minimum time (in seconds) to keep items in the registry cache before -re-checking against the registry.

    -

    Note that no purging is done unless the npm cache clean command is -explicitly used, and that only GET requests use the cache.

    -

    cert

    -
      -
    • Default: null
    • -
    • Type: String
    • -
    -

    A client certificate to pass when accessing the registry.

    -

    color

    -
      -
    • Default: true on Posix, false on Windows
    • -
    • Type: Boolean or "always"
    • -
    -

    If false, never shows colors. If "always" then always shows colors. -If true, then only prints color codes for tty file descriptors.

    -

    depth

    -
      -
    • Default: Infinity
    • -
    • Type: Number
    • -
    -

    The depth to go when recursing directories for npm ls, -npm cache ls, and npm outdated.

    -

    For npm outdated, a setting of Infinity will be treated as 0 -since that gives more useful information. To show the outdated status -of all packages and dependents, use a large integer value, -e.g., npm outdated --depth 9999

    -

    description

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Show the description in npm search

    -

    dev

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

    Install dev-dependencies along with packages.

    -

    Note that dev-dependencies are also installed if the npat flag is -set.

    -

    editor

    -
      -
    • Default: EDITOR environment variable if set, or "vi" on Posix, -or "notepad" on Windows.
    • -
    • Type: path
    • -
    -

    The command to run for npm edit or npm config edit.

    -

    engine-strict

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

    If set to true, then npm will stubbornly refuse to install (or even -consider installing) any package that claims to not be compatible with -the current Node.js version.

    -

    force

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

    Makes various commands more forceful.

    -
      -
    • lifecycle script failure does not block progress.
    • -
    • publishing clobbers previously published versions.
    • -
    • skips cache when requesting from the registry.
    • -
    • prevents checks against clobbering non-npm files.
    • -
    -

    fetch-retries

    -
      -
    • Default: 2
    • -
    • Type: Number
    • -
    -

    The "retries" config for the retry module to use when fetching -packages from the registry.

    -

    fetch-retry-factor

    -
      -
    • Default: 10
    • -
    • Type: Number
    • -
    -

    The "factor" config for the retry module to use when fetching -packages.

    -

    fetch-retry-mintimeout

    -
      -
    • Default: 10000 (10 seconds)
    • -
    • Type: Number
    • -
    -

    The "minTimeout" config for the retry module to use when fetching -packages.

    -

    fetch-retry-maxtimeout

    -
      -
    • Default: 60000 (1 minute)
    • -
    • Type: Number
    • -
    -

    The "maxTimeout" config for the retry module to use when fetching -packages.

    -

    git

    -
      -
    • Default: "git"
    • -
    • Type: String
    • -
    -

    The command to use for git commands. If git is installed on the -computer, but is not in the PATH, then set this to the full path to -the git binary.

    -

    git-tag-version

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Tag the commit when using the npm version command.

    -

    global

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

    Operates in "global" mode, so that packages are installed into the -prefix folder instead of the current working directory. See -npm-folders(5) for more on the differences in behavior.

    -
      -
    • packages are installed into the {prefix}/lib/node_modules folder, instead of the -current working directory.
    • -
    • bin files are linked to {prefix}/bin
    • -
    • man pages are linked to {prefix}/share/man
    • -
    -

    globalconfig

    -
      -
    • Default: {prefix}/etc/npmrc
    • -
    • Type: path
    • -
    -

    The config file to read for global config options.

    -

    group

    -
      -
    • Default: GID of the current process
    • -
    • Type: String or Number
    • -
    -

    The group to use when running package scripts in global mode as the root -user.

    -

    heading

    -
      -
    • Default: "npm"
    • -
    • Type: String
    • -
    -

    The string that starts all the debugging log output.

    -

    https-proxy

    -
      -
    • Default: null
    • -
    • Type: url
    • -
    -

    A proxy to use for outgoing https requests. If the HTTPS_PROXY or -https_proxy or HTTP_PROXY or http_proxy environment variables are set, -proxy settings will be honored by the underlying request library.

    -

    if-present

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

    If true, npm will not exit with an error code when run-script is invoked for -a script that isn't defined in the scripts section of package.json. This -option can be used when it's desirable to optionally run a script when it's -present and fail if the script fails. This is useful, for example, when running -scripts that may only apply for some builds in an otherwise generic CI setup.

    -

    ignore-scripts

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

    If true, npm does not run scripts specified in package.json files.

    -

    init-module

    -
      -
    • Default: ~/.npm-init.js
    • -
    • Type: path
    • -
    -

    A module that will be loaded by the npm init command. See the -documentation for the -init-package-json module -for more information, or npm-init(1).

    -

    init-author-name

    -
      -
    • Default: ""
    • -
    • Type: String
    • -
    -

    The value npm init should use by default for the package author's name.

    -

    init-author-email

    -
      -
    • Default: ""
    • -
    • Type: String
    • -
    -

    The value npm init should use by default for the package author's email.

    -

    init-author-url

    -
      -
    • Default: ""
    • -
    • Type: String
    • -
    -

    The value npm init should use by default for the package author's homepage.

    -

    init-license

    -
      -
    • Default: "ISC"
    • -
    • Type: String
    • -
    -

    The value npm init should use by default for the package license.

    -

    init-version

    -
      -
    • Default: "1.0.0"
    • -
    • Type: semver
    • -
    -

    The value that npm init should use by default for the package -version number, if not already set in package.json.

    -

    json

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

    Whether or not to output JSON data, rather than the normal output.

    -

    This feature is currently experimental, and the output data structures -for many commands is either not implemented in JSON yet, or subject to -change. Only the output from npm ls --json is currently valid.

    -

    key

    -
      -
    • Default: null
    • -
    • Type: String
    • -
    -

    A client key to pass when accessing the registry.

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

    If true, then local installs will link if there is a suitable globally -installed package.

    -

    Note that this means that local installs can cause things to be -installed into the global space at the same time. The link is only done -if one of the two conditions are met:

    -
      -
    • The package is not already installed globally, or
    • -
    • the globally installed version is identical to the version that is -being installed locally.
    • -
    -

    local-address

    -
      -
    • Default: undefined
    • -
    • Type: IP Address
    • -
    -

    The IP address of the local interface to use when making connections -to the npm registry. Must be IPv4 in versions of Node prior to 0.12.

    -

    loglevel

    -
      -
    • Default: "warn"
    • -
    • Type: String
    • -
    • Values: "silent", "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 "warn", which shows warn and error output.

    -

    logstream

    -
      -
    • Default: process.stderr
    • -
    • Type: Stream
    • -
    -

    This is the stream that is passed to the -npmlog module at run time.

    -

    It cannot be set from the command line, but if you are using npm -programmatically, you may wish to send logs to somewhere other than -stderr.

    -

    If the color config is set to true, then this stream will receive -colored output if it is a TTY.

    -

    long

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

    Show extended information in npm ls and npm search.

    -

    message

    -
      -
    • Default: "%s"
    • -
    • Type: String
    • -
    -

    Commit message which is used by npm version when creating version commit.

    -

    Any "%s" in the message will be replaced with the version number.

    -

    node-version

    -
      -
    • Default: process.version
    • -
    • Type: semver or false
    • -
    -

    The node version to use when checking a package's engines map.

    -

    npat

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

    Run tests on installation.

    -

    onload-script

    -
      -
    • Default: false
    • -
    • Type: path
    • -
    -

    A node module to require() when npm loads. Useful for programmatic -usage.

    -

    optional

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Attempt to install packages in the optionalDependencies object. Note -that if these packages fail to install, the overall installation -process is not aborted.

    -

    parseable

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

    Output parseable results from commands that write to -standard output.

    -

    prefix

    - -

    The location to install global items. If set on the command line, then -it forces non-global commands to run in the specified folder.

    -

    production

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

    Set to true to run in "production" mode.

    -
      -
    1. devDependencies are not installed at the topmost level when running -local npm install without any arguments.
    2. -
    3. Set the NODE_ENV="production" for lifecycle scripts.
    4. -
    -

    proprietary-attribs

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Whether or not to include proprietary extended attributes in the -tarballs created by npm.

    -

    Unless you are expecting to unpack package tarballs with something other -than npm -- particularly a very outdated tar implementation -- leave -this as true.

    -

    proxy

    -
      -
    • Default: null
    • -
    • Type: url
    • -
    -

    A proxy to use for outgoing http requests. If the HTTP_PROXY or -http_proxy environment variables are set, proxy settings will be -honored by the underlying request library.

    -

    rebuild-bundle

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Rebuild bundled dependencies after installation.

    -

    registry

    - -

    The base URL of the npm package registry.

    -

    rollback

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Remove failed installs.

    -

    save

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

    Save installed packages to a package.json file as dependencies.

    -

    When used with the npm rm command, it removes it from the dependencies -object.

    -

    Only works if there is already a package.json file present.

    -

    save-bundle

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

    If a package would be saved at install time by the use of --save, ---save-dev, or --save-optional, then also put it in the -bundleDependencies list.

    -

    When used with the npm rm command, it removes it from the -bundledDependencies list.

    -

    save-dev

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

    Save installed packages to a package.json file as devDependencies.

    -

    When used with the npm rm command, it removes it from the -devDependencies object.

    -

    Only works if there is already a package.json file present.

    -

    save-exact

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

    Dependencies saved to package.json using --save, --save-dev or ---save-optional will be configured with an exact version rather than -using npm's default semver range operator.

    -

    save-optional

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

    Save installed packages to a package.json file as -optionalDependencies.

    -

    When used with the npm rm command, it removes it from the -devDependencies object.

    -

    Only works if there is already a package.json file present.

    -

    save-prefix

    -
      -
    • Default: '^'
    • -
    • Type: String
    • -
    -

    Configure how versions of packages installed to a package.json file via ---save or --save-dev get prefixed.

    -

    For example if a package has version 1.2.3, by default its version is -set to ^1.2.3 which allows minor upgrades for that package, but after -npm config set save-prefix='~' it would be set to ~1.2.3 which only allows -patch upgrades.

    -

    scope

    -
      -
    • Default: ""
    • -
    • Type: String
    • -
    -

    Associate an operation with a scope for a scoped registry. Useful when logging -in to a private registry for the first time: -npm login --scope=@organization --registry=registry.organization.com, which -will cause @organization to be mapped to the registry for future installation -of packages specified according to the pattern @organization/package.

    -

    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.

    -

    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 -Windows
    • -
    • Type: path
    • -
    -

    The shell to run for the npm explore command.

    -

    shrinkwrap

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    If set to false, then ignore npm-shrinkwrap.json files when -installing.

    -

    sign-git-tag

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

    If set to true, then the npm version command will tag the version -using -s to add a signature.

    -

    Note that git requires you to have set up GPG keys in your git configs -for this to work properly.

    -

    spin

    -
      -
    • Default: true
    • -
    • Type: Boolean or "always"
    • -
    -

    When set to true, npm will display an ascii spinner while it is doing -things, if process.stderr is a TTY.

    -

    Set to false to suppress the spinner, or set to always to output -the spinner even for non-TTY outputs.

    -

    strict-ssl

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    Whether or not to do SSL key validation when making requests to the -registry via https.

    -

    See also the ca config.

    -

    tag

    -
      -
    • Default: latest
    • -
    • Type: String
    • -
    -

    If you ask npm to install a package and don't tell it a specific version, then -it will install the specified tag.

    -

    Also the tag that is added to the package@version specified by the npm -tag command, if no explicit tag is given.

    -

    tag-version-prefix

    -
      -
    • Default: "v"
    • -
    • Type: String
    • -
    -

    If set, alters the prefix used when tagging a new version when performing a -version increment using npm-version. To remove the prefix altogether, set it -to the empty string: "".

    -

    Because other tools may rely on the convention that npm version tags look like -v1.0.0, only use this property if it is absolutely necessary. In -particular, use care when overriding this setting for public packages.

    -

    tmp

    -
      -
    • Default: TMPDIR environment variable, or "/tmp"
    • -
    • Type: path
    • -
    -

    Where to store temporary files and folders. All temp files are deleted -on success, but left behind on failure for forensic purposes.

    -

    unicode

    -
      -
    • Default: true
    • -
    • Type: Boolean
    • -
    -

    When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters to draw trees.

    -

    unsafe-perm

    -
      -
    • Default: false if running as root, true otherwise
    • -
    • Type: Boolean
    • -
    -

    Set to true to suppress the UID/GID switching when running package -scripts. If set explicitly to false, then installing as a non-root user -will fail.

    -

    usage

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

    Set to show short usage output (like the -H output) -instead of complete help when doing npm-help(1).

    -

    user

    -
      -
    • Default: "nobody"
    • -
    • Type: String or Number
    • -
    -

    The UID to set to when running package scripts as root.

    -

    userconfig

    -
      -
    • Default: ~/.npmrc
    • -
    • Type: path
    • -
    -

    The location of user-level configuration settings.

    -

    umask

    -
      -
    • Default: 022
    • -
    • Type: Octal numeric string in range 0000..0777 (0..511)
    • -
    -

    The "umask" value to use when setting the file creation mode on files -and folders.

    -

    Folders and executables are given a mode which is 0777 masked against -this value. Other files are given a mode which is 0666 masked against -this value. Thus, the defaults are 0755 and 0644 respectively.

    -

    user-agent

    -
      -
    • Default: node/{process.version} {process.platform} {process.arch}
    • -
    • Type: String
    • -
    -

    Sets a User-Agent to the request header

    -

    version

    -
      -
    • Default: false
    • -
    • Type: boolean
    • -
    -

    If true, output the npm version and exit successfully.

    -

    Only relevant when specified explicitly on the command line.

    -

    versions

    -
      -
    • Default: false
    • -
    • Type: boolean
    • -
    -

    If true, output the npm version as well as node's process.versions map, and -exit successfully.

    -

    Only relevant when specified explicitly on the command line.

    -

    viewer

    -
      -
    • Default: "man" on Posix, "browser" on Windows
    • -
    • Type: path
    • -
    -

    The program to use to view help content.

    -

    Set to "browser" to view html help content in the default web browser.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/npm-developers.html b/deps/npm/html/partial/doc/misc/npm-developers.html deleted file mode 100644 index 10d0cd89198..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-developers.html +++ /dev/null @@ -1,169 +0,0 @@ -

    npm-developers

    Developer Guide

    -

    DESCRIPTION

    -

    So, you've decided to use npm to develop (and maybe publish/deploy) -your project.

    -

    Fantastic!

    -

    There are a few things that you need to do above the simple steps -that your users will do to install your program.

    -

    About These Documents

    -

    These are man pages. If you install npm, you should be able to -then do man npm-thing to get the documentation on a particular -topic, or npm help thing to see the same information.

    -

    What is a package

    -

    A package is:

    -
      -
    • a) a folder containing a program described by a package.json file
    • -
    • b) a gzipped tarball containing (a)
    • -
    • c) a url that resolves to (b)
    • -
    • d) a <name>@<version> that is published on the registry with (c)
    • -
    • e) a <name>@<tag> that points to (d)
    • -
    • f) a <name> that has a "latest" tag satisfying (e)
    • -
    • g) a git url that, when cloned, results in (a).
    • -
    -

    Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b).

    -

    Git urls can be of the form:

    -
    git://github.com/user/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
    -

    The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is master.

    -

    The package.json File

    -

    You need to have a package.json file in the root of your project to do -much of anything with npm. That is basically the whole interface.

    -

    See package.json(5) for details about what goes in that file. At the very -least, you need:

    -
      -
    • name: -This should be a string that identifies your project. Please do not -use the name to specify that it runs on node, or is in JavaScript. -You can use the "engines" field to explicitly state the versions of -node (or whatever else) that your program requires, and it's pretty -well assumed that it's javascript.

      -

      It does not necessarily need to match your github repository name.

      -

      So, node-foo and bar-js are bad names. foo or bar are better.

      -
    • -
    • version: -A semver-compatible version.

      -
    • -
    • engines: -Specify the versions of node (or whatever else) that your program -runs on. The node API changes a lot, and there may be bugs or new -functionality that you depend on. Be explicit.

      -
    • -
    • author: -Take some credit.

      -
    • -
    • scripts: -If you have a special compilation or installation script, then you -should put it in the scripts object. You should definitely have at -least a basic smoke-test command as the "scripts.test" field. -See npm-scripts(7).

      -
    • -
    • main: -If you have a single module that serves as the entry point to your -program (like what the "foo" package gives you at require("foo")), -then you need to specify that in the "main" field.

      -
    • -
    • directories: -This is an object mapping names to folders. The best ones to include are -"lib" and "doc", but if you use "man" to specify a folder full of man pages, -they'll get installed just like these ones.

      -
    • -
    -

    You can use npm init in the root of your package in order to get you -started with a pretty basic package.json file. See npm-init(1) for -more info.

    -

    Keeping files out of your package

    -

    Use a .npmignore file to keep stuff out of your package. If there's -no .npmignore file, but there is a .gitignore file, then npm will -ignore the stuff matched by the .gitignore file. If you want to -include something that is excluded by your .gitignore file, you can -create an empty .npmignore file to override it.

    -

    .npmignore files follow the same pattern rules -as .gitignore files:

    -
      -
    • Blank lines or lines starting with # are ignored.
    • -
    • Standard glob patterns work.
    • -
    • You can end patterns with a forward slash / to specify a directory.
    • -
    • You can negate a pattern by starting it with an exclamation point !.
    • -
    -

    By default, the following paths and files are ignored, so there's no -need to add them to .npmignore explicitly:

    -
      -
    • .*.swp
    • -
    • ._*
    • -
    • .DS_Store
    • -
    • .git
    • -
    • .hg
    • -
    • .lock-wscript
    • -
    • .svn
    • -
    • .wafpickle-*
    • -
    • CVS
    • -
    • npm-debug.log
    • -
    -

    Additionally, everything in node_modules is ignored, except for -bundled dependencies. npm automatically handles this for you, so don't -bother adding node_modules to .npmignore.

    -

    The following paths and files are never ignored, so adding them to -.npmignore is pointless:

    - - -

    npm link is designed to install a development package and see the -changes in real time without having to keep re-installing it. (You do -need to either re-link or npm rebuild -g to update compiled packages, -of course.)

    -

    More info at npm-link(1).

    -

    Before Publishing: Make Sure Your Package Installs and Works

    -

    This is important.

    -

    If you can not install it locally, you'll have -problems trying to publish it. Or, worse yet, you'll be able to -publish it, but you'll be publishing a broken or pointless package. -So don't do that.

    -

    In the root of your package, do this:

    -
    npm install . -g
    -

    That'll show you that it's working. If you'd rather just create a symlink -package that points to your working directory, then do this:

    -
    npm link
    -

    Use npm ls -g to see if it's there.

    -

    To test a local install, go into some other folder, and then do:

    -
    cd ../some-other-folder
    -npm install ../my-package
    -

    to install it locally into the node_modules folder in that other place.

    -

    Then go into the node-repl, and try using require("my-thing") to -bring in your module's main module.

    -

    Create a User Account

    -

    Create a user with the adduser command. It works like this:

    -
    npm adduser
    -

    and then follow the prompts.

    -

    This is documented better in npm-adduser(1).

    -

    Publish your package

    -

    This part's easy. IN the root of your folder, do this:

    -
    npm publish
    -

    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 -.npmignore file to list out the globs to ignore, or publish -from a fresh checkout.

    -

    Brag about it

    -

    Send emails, write blogs, blab in IRC.

    -

    Tell the world how easy it is to install your program!

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html deleted file mode 100644 index 15f650627c7..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-disputes.html +++ /dev/null @@ -1,92 +0,0 @@ -

    npm-disputes

    Handling Module Name Disputes

    -

    SYNOPSIS

    -
      -
    1. Get the author email with npm owner ls <pkgname>
    2. -
    3. Email the author, CC support@npmjs.com
    4. -
    5. After a few weeks, if there's no resolution, we'll sort it out.
    6. -
    -

    Don't squat on package names. Publish code or move out of the way.

    -

    DESCRIPTION

    -

    There sometimes arise cases where a user publishes a module, and then -later, some other user wants to use that name. Here are some common -ways that happens (each of these is based on actual events.)

    -
      -
    1. Joe writes a JavaScript module foo, which is not node-specific. -Joe doesn't use node at all. Bob wants to use foo in node, so he -wraps it in an npm module. Some time later, Joe starts using node, -and wants to take over management of his program.
    2. -
    3. Bob writes an npm module foo, and publishes it. Perhaps much -later, Joe finds a bug in foo, and fixes it. He sends a pull -request to Bob, but Bob doesn't have the time to deal with it, -because he has a new job and a new baby and is focused on his new -erlang project, and kind of not involved with node any more. Joe -would like to publish a new foo, but can't, because the name is -taken.
    4. -
    5. Bob writes a 10-line flow-control library, and calls it foo, and -publishes it to the npm registry. Being a simple little thing, it -never really has to be updated. Joe works for Foo Inc, the makers -of the critically acclaimed and widely-marketed foo JavaScript -toolkit framework. They publish it to npm as foojs, but people are -routinely confused when npm install foo is some different thing.
    6. -
    7. Bob writes a parser for the widely-known foo file format, because -he needs it for work. Then, he gets a new job, and never updates the -prototype. Later on, Joe writes a much more complete foo parser, -but can't publish, because Bob's foo is in the way.
    8. -
    -

    The validity of Joe's claim in each situation can be debated. However, -Joe's appropriate course of action in each case is the same.

    -
      -
    1. npm owner ls foo. This will tell Joe the email address of the -owner (Bob).
    2. -
    3. Joe emails Bob, explaining the situation as respectfully as -possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of -the email. Mention in the email that Bob can run npm owner add -joe foo to add Joe as an owner of the foo package.
    4. -
    5. After a reasonable amount of time, if Bob has not responded, or if -Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is -usually at least 4 weeks, but extra time is allowed around common -holidays.)
    6. -
    -

    REASONING

    -

    In almost every case so far, the parties involved have been able to reach -an amicable resolution without any major intervention. Most people -really do want to be reasonable, and are probably not even aware that -they're in your way.

    -

    Module ecosystems are most vibrant and powerful when they are as -self-directed as possible. If an admin one day deletes something you -had worked on, then that is going to make most people quite upset, -regardless of the justification. When humans solve their problems by -talking to other humans with respect, everyone has the chance to end up -feeling good about the interaction.

    -

    EXCEPTIONS

    -

    Some things are not allowed, and will be removed without discussion if -they are brought to the attention of the npm registry admins, including -but not limited to:

    -
      -
    1. Malware (that is, a package designed to exploit or harm the machine on -which it is installed).
    2. -
    3. Violations of copyright or licenses (for example, cloning an -MIT-licensed program, and then removing or changing the copyright and -license statement).
    4. -
    5. Illegal content.
    6. -
    7. "Squatting" on a package name that you plan to use, but aren't -actually using. Sorry, I don't care how great the name is, or how -perfect a fit it is for the thing that someday might happen. If -someone wants to use it today, and you're just taking up space with -an empty tarball, you're going to be evicted.
    8. -
    9. Putting empty packages in the registry. Packages must have SOME -functionality. It can be silly, but it can't be nothing. (See -also: squatting.)
    10. -
    11. Doing weird things with the registry, like using it as your own -personal application database or otherwise putting non-packagey -things into it.
    12. -
    -

    If you see bad behavior like this, please report it right away.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/npm-faq.html b/deps/npm/html/partial/doc/misc/npm-faq.html deleted file mode 100644 index f9a13cf4edb..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-faq.html +++ /dev/null @@ -1,288 +0,0 @@ -

    npm-faq

    Frequently Asked Questions

    -

    Where can I find these docs in HTML?

    -

    https://docs.npmjs.com/, or run:

    -
    npm config set viewer browser
    -

    to open these documents in your default web browser rather than man.

    -

    It didn't work.

    -

    That's not really a question.

    -

    Why didn't it work?

    -

    I don't know yet.

    -

    Read the error output, and if you can't figure out what it means, -do what it says and post a bug with all the information it asks for.

    -

    Where does npm put stuff?

    -

    See npm-folders(5)

    -

    tl;dr:

    -
      -
    • Use the npm root command to see where modules go, and the npm bin -command to see where executables go
    • -
    • Global installs are different from local installs. If you install -something with the -g flag, then its executables go in npm bin -g -and its modules go in npm root -g.
    • -
    -

    How do I install something on my computer in a central location?

    -

    Install it globally by tacking -g or --global to the command. (This -is especially important for command line utilities that need to add -their bins to the global system PATH.)

    -

    I installed something globally, but I can't require() it

    -

    Install it locally.

    -

    The global install location is a place for command-line utilities -to put their bins in the system PATH. It's not for use with require().

    -

    If you require() a module in your code, then that means it's a -dependency, and a part of your program. You need to install it locally -in your program.

    -

    Why can't npm just put everything in one place, like other package managers?

    -

    Not every change is an improvement, but every improvement is a change. -This would be like asking git to do network IO for every commit. It's -not going to happen, because it's a terrible idea that causes more -problems than it solves.

    -

    It is much harder to avoid dependency conflicts without nesting -dependencies. This is fundamental to the way that npm works, and has -proven to be an extremely successful approach. See npm-folders(5) for -more details.

    -

    If you want a package to be installed in one place, and have all your -programs reference the same copy of it, then use the npm link command. -That's what it's for. Install it globally, then link it into each -program that uses it.

    -

    Whatever, I really want the old style 'everything global' style.

    -

    Write your own package manager. You could probably even wrap up npm -in a shell script if you really wanted to.

    -

    npm will not help you do something that is known to be a bad idea.

    -

    Should I check my node_modules folder into git?

    -

    Usually, no. Allow npm to resolve dependencies for your packages.

    -

    For packages you deploy, such as websites and apps, -you should use npm shrinkwrap to lock down your full dependency tree:

    -

    https://docs.npmjs.com/cli/shrinkwrap

    -

    If you are paranoid about depending on the npm ecosystem, -you should run a private npm mirror or a private cache.

    -

    If you want 100% confidence in being able to reproduce the specific bytes -included in a deployment, you should use an additional mechanism that can -verify contents rather than versions. For example, -Amazon machine images, DigitalOcean snapshots, Heroku slugs, or simple tarballs.

    -

    Is it 'npm' or 'NPM' or 'Npm'?

    -

    npm should never be capitalized unless it is being displayed in a -location that is customarily all-caps (such as the title of man pages.)

    -

    If 'npm' is an acronym, why is it never capitalized?

    -

    Contrary to the belief of many, "npm" is not in fact an abbreviation for -"Node Package Manager". It is a recursive bacronymic abbreviation for -"npm is not an acronym". (If it was "ninaa", then it would be an -acronym, and thus incorrectly named.)

    -

    "NPM", however, is an acronym (more precisely, a capitonym) for the -National Association of Pastoral Musicians. You can learn more -about them at http://npm.org/.

    -

    In software, "NPM" is a Non-Parametric Mapping utility written by -Chris Rorden. You can analyze pictures of brains with it. Learn more -about the (capitalized) NPM program at http://www.cabiatl.com/mricro/npm/.

    -

    The first seed that eventually grew into this flower was a bash utility -named "pm", which was a shortened descendent of "pkgmakeinst", a -bash function that was used to install various different things on different -platforms, most often using Yahoo's yinst. If npm was ever an -acronym for anything, it was node pm or maybe new pm.

    -

    So, in all seriousness, the "npm" project is named after its command-line -utility, which was organically selected to be easily typed by a right-handed -programmer using a US QWERTY keyboard layout, ending with the -right-ring-finger in a postition to type the - key for flags and -other command-line arguments. That command-line utility is always -lower-case, though it starts most sentences it is a part of.

    -

    How do I list installed packages?

    -

    npm ls

    -

    How do I search for packages?

    -

    npm search

    -

    Arguments are greps. npm search jsdom shows jsdom packages.

    -

    How do I update npm?

    -
    npm install npm -g
    -

    You can also update all outdated local packages by doing npm update without -any arguments, or global packages by doing npm update -g.

    -

    Occasionally, the version of npm will progress such that the current -version cannot be properly installed with the version that you have -installed already. (Consider, if there is ever a bug in the update -command.)

    -

    In those cases, you can do this:

    -
    curl https://www.npmjs.com/install.sh | sh
    -

    What is a package?

    -

    A package is:

    -
      -
    • a) a folder containing a program described by a package.json file
    • -
    • b) a gzipped tarball containing (a)
    • -
    • c) a url that resolves to (b)
    • -
    • d) a <name>@<version> that is published on the registry with (c)
    • -
    • e) a <name>@<tag> that points to (d)
    • -
    • f) a <name> that has a "latest" tag satisfying (e)
    • -
    • g) a git url that, when cloned, results in (a).
    • -
    -

    Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b).

    -

    Git urls can be of the form:

    -
    git://github.com/user/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
    -

    The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is master.

    -

    What is a module?

    -

    A module is anything that can be loaded with require() in a Node.js -program. The following things are all examples of things that can be -loaded as modules:

    -
      -
    • A folder with a package.json file containing a main field.
    • -
    • A folder with an index.js file in it.
    • -
    • A JavaScript file.
    • -
    -

    Most npm packages are modules, because they are libraries that you -load with require. However, there's no requirement that an npm -package be a module! Some only contain an executable command-line -interface, and don't provide a main field for use in Node programs.

    -

    Almost all npm packages (at least, those that are Node programs) -contain many modules within them (because every file they load with -require() is a module).

    -

    In the context of a Node program, the module is also the thing that -was loaded from a file. For example, in the following program:

    -
    var req = require('request')
    -

    we might say that "The variable req refers to the request module".

    -

    So, why is it the "node_modules" folder, but "package.json" file? Why not node_packages or module.json?

    -

    The package.json file defines the package. (See "What is a -package?" above.)

    -

    The node_modules folder is the place Node.js looks for modules. -(See "What is a module?" above.)

    -

    For example, if you create a file at node_modules/foo.js and then -had a program that did var f = require('foo.js') then it would load -the module. However, foo.js is not a "package" in this case, -because it does not have a package.json.

    -

    Alternatively, if you create a package which does not have an -index.js or a "main" field in the package.json file, then it is -not a module. Even if it's installed in node_modules, it can't be -an argument to require().

    -

    "node_modules" is the name of my deity's arch-rival, and a Forbidden Word in my religion. Can I configure npm to use a different folder?

    -

    No. This will never happen. This question comes up sometimes, -because it seems silly from the outside that npm couldn't just be -configured to put stuff somewhere else, and then npm could load them -from there. It's an arbitrary spelling choice, right? What's the big -deal?

    -

    At the time of this writing, the string 'node_modules' appears 151 -times in 53 separate files in npm and node core (excluding tests and -documentation).

    -

    Some of these references are in node's built-in module loader. Since -npm is not involved at all at run-time, node itself would have to -be configured to know where you've decided to stick stuff. Complexity -hurdle #1. Since the Node module system is locked, this cannot be -changed, and is enough to kill this request. But I'll continue, in -deference to your deity's delicate feelings regarding spelling.

    -

    Many of the others are in dependencies that npm uses, which are not -necessarily tightly coupled to npm (in the sense that they do not read -npm's configuration files, etc.) Each of these would have to be -configured to take the name of the node_modules folder as a -parameter. Complexity hurdle #2.

    -

    Furthermore, npm has the ability to "bundle" dependencies by adding -the dep names to the "bundledDependencies" list in package.json, -which causes the folder to be included in the package tarball. What -if the author of a module bundles its dependencies, and they use a -different spelling for node_modules? npm would have to rename the -folder at publish time, and then be smart enough to unpack it using -your locally configured name. Complexity hurdle #3.

    -

    Furthermore, what happens when you change this name? Fine, it's -easy enough the first time, just rename the node_modules folders to -./blergyblerp/ or whatever name you choose. But what about when you -change it again? npm doesn't currently track any state about past -configuration settings, so this would be rather difficult to do -properly. It would have to track every previous value for this -config, and always accept any of them, or else yesterday's install may -be broken tomorrow. Complexity hurdle #4.

    -

    Never going to happen. The folder is named node_modules. It is -written indelibly in the Node Way, handed down from the ancient times -of Node 0.3.

    -

    How do I install node with npm?

    -

    You don't. Try one of these node version managers:

    -

    Unix:

    - -

    Windows:

    - -

    How can I use npm for development?

    -

    See npm-developers(7) and package.json(5).

    -

    You'll most likely want to npm link your development folder. That's -awesomely handy.

    -

    To set up your own private registry, check out npm-registry(7).

    -

    Can I list a url as a dependency?

    -

    Yes. It should be a url to a gzipped tarball containing a single folder -that has a package.json in its root, or a git url. -(See "what is a package?" above.)

    - -

    See npm-link(1)

    -

    The package registry website. What is that exactly?

    -

    See npm-registry(7).

    -

    I forgot my password, and can't publish. How do I reset it?

    -

    Go to https://npmjs.com/forgot.

    -

    I get ECONNREFUSED a lot. What's up?

    -

    Either the registry is down, or node's DNS isn't able to reach out.

    -

    To check if the registry is down, open up -https://registry.npmjs.org/ in a web browser. This will also tell -you if you are just unable to access the internet for some reason.

    -

    If the registry IS down, let us know by emailing support@npmjs.com -or posting an issue at https://github.com/npm/npm/issues. If it's -down for the world (and not just on your local network) then we're -probably already being pinged about it.

    -

    You can also often get a faster response by visiting the #npm channel -on Freenode IRC.

    -

    Why no namespaces?

    -

    npm has only one global namespace. If you want to namespace your own packages, -you may: simply use the - character to separate the names or use scoped -packages. npm is a mostly anarchic system. There is not sufficient need to -impose namespace rules on everyone.

    -

    As of 2.0, npm supports scoped packages, which allow you to publish a group of -related modules without worrying about name collisions.

    -

    Every npm user owns the scope associated with their username. For example, the -user named npm owns the scope @npm. Scoped packages are published inside a -scope by naming them as if they were files under the scope directory, e.g., by -setting name in package.json to @npm/npm.

    -

    Scoped packages are supported by the public npm registry. The npm client is -backwards-compatible with un-scoped registries, so it can be used to work with -scoped and un-scoped registries at the same time.

    -

    Unscoped packages can only depend on other unscoped packages. Scoped packages -can depend on packages from their own scope, a different scope, or the public -registry (unscoped).

    -

    For the current documentation of scoped packages, see -https://docs.npmjs.com/misc/scope

    -

    References:

    -
      -
    1. For the reasoning behind the "one global namespace", please see this -discussion: https://github.com/npm/npm/issues/798 (TL;DR: It doesn't -actually make things better, and can make them worse.)

      -
    2. -
    3. For the pre-implementation discussion of the scoped package feature, see -this discussion: https://github.com/npm/npm/issues/5239

      -
    4. -
    -

    Who does npm?

    -

    npm was originally written by Isaac Z. Schlueter, and many others have -contributed to it, some of them quite substantially.

    -

    The npm open source project, The npm Registry, and the community -website are maintained and operated by the -good folks at npm, Inc.

    -

    I have a question or request not addressed here. Where should I put it?

    -

    Post an issue on the github project:

    - -

    Why does npm hate me?

    -

    npm is not capable of hatred. It loves everyone, especially you.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/npm-index.html b/deps/npm/html/partial/doc/misc/npm-index.html deleted file mode 100644 index a75c025771f..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-index.html +++ /dev/null @@ -1,220 +0,0 @@ -

    npm-index

    Index of all npm documentation

    -

    README

    -

    a JavaScript package manager

    -

    Command Line Documentation

    -

    Using npm on the command line

    -

    npm(1)

    -

    javascript package manager

    -

    npm-access(1)

    -

    Set access level on published packages

    -

    npm-adduser(1)

    -

    Add a registry user account

    -

    npm-bin(1)

    -

    Display npm bin folder

    -

    npm-bugs(1)

    -

    Bugs for a package in a web browser maybe

    -

    npm-build(1)

    -

    Build a package

    -

    npm-bundle(1)

    -

    REMOVED

    -

    npm-cache(1)

    -

    Manipulates packages cache

    -

    npm-completion(1)

    -

    Tab Completion for npm

    -

    npm-config(1)

    -

    Manage the npm configuration files

    -

    npm-dedupe(1)

    -

    Reduce duplication

    -

    npm-deprecate(1)

    -

    Deprecate a version of a package

    -

    npm-dist-tag(1)

    -

    Modify package distribution tags

    -

    npm-docs(1)

    -

    Docs for a package in a web browser maybe

    -

    npm-edit(1)

    -

    Edit an installed package

    -

    npm-explore(1)

    -

    Browse an installed package

    -

    npm-help-search(1)

    -

    Search npm help documentation

    -

    npm-help(1)

    -

    Get help on npm

    -

    npm-init(1)

    -

    Interactively create a package.json file

    -

    npm-install(1)

    -

    Install a package

    - -

    Symlink a package folder

    -

    npm-logout(1)

    -

    Log out of the registry

    -

    npm-ls(1)

    -

    List installed packages

    -

    npm-outdated(1)

    -

    Check for outdated packages

    -

    npm-owner(1)

    -

    Manage package owners

    -

    npm-pack(1)

    -

    Create a tarball from a package

    -

    npm-ping(1)

    -

    Ping npm registry

    -

    npm-prefix(1)

    -

    Display prefix

    -

    npm-prune(1)

    -

    Remove extraneous packages

    -

    npm-publish(1)

    -

    Publish a package

    -

    npm-rebuild(1)

    -

    Rebuild a package

    -

    npm-repo(1)

    -

    Open package repository page in the browser

    -

    npm-restart(1)

    -

    Restart a package

    -

    npm-rm(1)

    -

    Remove a package

    -

    npm-root(1)

    -

    Display npm root

    -

    npm-run-script(1)

    -

    Run arbitrary package scripts

    -

    npm-search(1)

    -

    Search for packages

    -

    npm-shrinkwrap(1)

    -

    Lock down dependency versions

    -

    npm-star(1)

    -

    Mark your favorite packages

    -

    npm-stars(1)

    -

    View packages marked as favorites

    -

    npm-start(1)

    -

    Start a package

    -

    npm-stop(1)

    -

    Stop a package

    -

    npm-tag(1)

    -

    Tag a published version

    -

    npm-test(1)

    -

    Test a package

    -

    npm-uninstall(1)

    -

    Remove a package

    -

    npm-unpublish(1)

    -

    Remove a package from the registry

    -

    npm-update(1)

    -

    Update a package

    -

    npm-version(1)

    -

    Bump a package version

    -

    npm-view(1)

    -

    View registry info

    -

    npm-whoami(1)

    -

    Display npm username

    -

    API Documentation

    -

    Using npm in your Node programs

    -

    npm(3)

    -

    javascript package manager

    -

    npm-bin(3)

    -

    Display npm bin folder

    -

    npm-bugs(3)

    -

    Bugs for a package in a web browser maybe

    -

    npm-cache(3)

    -

    manage the npm cache programmatically

    -

    npm-commands(3)

    -

    npm commands

    -

    npm-config(3)

    -

    Manage the npm configuration files

    -

    npm-deprecate(3)

    -

    Deprecate a version of a package

    -

    npm-docs(3)

    -

    Docs for a package in a web browser maybe

    -

    npm-edit(3)

    -

    Edit an installed package

    -

    npm-explore(3)

    -

    Browse an installed package

    -

    npm-help-search(3)

    -

    Search the help pages

    -

    npm-init(3)

    -

    Interactively create a package.json file

    -

    npm-install(3)

    -

    install a package programmatically

    - -

    Symlink a package folder

    -

    npm-load(3)

    -

    Load config settings

    -

    npm-ls(3)

    -

    List installed packages

    -

    npm-outdated(3)

    -

    Check for outdated packages

    -

    npm-owner(3)

    -

    Manage package owners

    -

    npm-pack(3)

    -

    Create a tarball from a package

    -

    npm-ping(3)

    -

    Ping npm registry

    -

    npm-prefix(3)

    -

    Display prefix

    -

    npm-prune(3)

    -

    Remove extraneous packages

    -

    npm-publish(3)

    -

    Publish a package

    -

    npm-rebuild(3)

    -

    Rebuild a package

    -

    npm-repo(3)

    -

    Open package repository page in the browser

    -

    npm-restart(3)

    -

    Restart a package

    -

    npm-root(3)

    -

    Display npm root

    -

    npm-run-script(3)

    -

    Run arbitrary package scripts

    -

    npm-search(3)

    -

    Search for packages

    -

    npm-shrinkwrap(3)

    -

    programmatically generate package shrinkwrap file

    -

    npm-start(3)

    -

    Start a package

    -

    npm-stop(3)

    -

    Stop a package

    -

    npm-tag(3)

    -

    Tag a published version

    -

    npm-test(3)

    -

    Test a package

    -

    npm-uninstall(3)

    -

    uninstall a package programmatically

    -

    npm-unpublish(3)

    -

    Remove a package from the registry

    -

    npm-update(3)

    -

    Update a package

    -

    npm-version(3)

    -

    Bump a package version

    -

    npm-view(3)

    -

    View registry info

    -

    npm-whoami(3)

    -

    Display npm username

    -

    Files

    -

    File system structures npm uses

    -

    npm-folders(5)

    -

    Folder Structures Used by npm

    -

    npmrc(5)

    -

    The npm config files

    -

    package.json(5)

    -

    Specifics of npm's package.json handling

    -

    Misc

    -

    Various other bits and bobs

    -

    npm-coding-style(7)

    -

    npm's "funny" coding style

    -

    npm-config(7)

    -

    More than you probably want to know about npm configuration

    -

    npm-developers(7)

    -

    Developer Guide

    -

    npm-disputes(7)

    -

    Handling Module Name Disputes

    -

    npm-faq(7)

    -

    Frequently Asked Questions

    -

    npm-index(7)

    -

    Index of all npm documentation

    -

    npm-registry(7)

    -

    The JavaScript Package Registry

    -

    npm-scope(7)

    -

    Scoped packages

    -

    npm-scripts(7)

    -

    How npm handles the "scripts" field

    -

    removing-npm(7)

    -

    Cleaning the Slate

    -

    semver(7)

    -

    The semantic versioner for npm

    - diff --git a/deps/npm/html/partial/doc/misc/npm-registry.html b/deps/npm/html/partial/doc/misc/npm-registry.html deleted file mode 100644 index 8dd80d4d25b..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-registry.html +++ /dev/null @@ -1,50 +0,0 @@ -

    npm-registry

    The JavaScript Package Registry

    -

    DESCRIPTION

    -

    To resolve packages by name and version, npm talks to a registry website -that implements the CommonJS Package Registry specification for reading -package info.

    -

    Additionally, npm's package registry implementation supports several -write APIs as well, to allow for publishing packages and managing user -account information.

    -

    The official public npm registry is at http://registry.npmjs.org/. It -is powered by a CouchDB database, of which there is a public mirror at -http://skimdb.npmjs.com/registry. The code for the couchapp is -available at http://github.com/npm/npm-registry-couchapp.

    -

    The registry URL used is determined by the scope of the package (see -npm-scope(7)). If no scope is specified, the default registry is used, which is -supplied by the registry config parameter. See npm-config(1), -npmrc(5), and npm-config(7) for more on managing npm's configuration.

    -

    Can I run my own private registry?

    -

    Yes!

    -

    The easiest way is to replicate the couch database, and use the same (or -similar) design doc to implement the APIs.

    -

    If you set up continuous replication from the official CouchDB, and then -set your internal CouchDB as the registry config, then you'll be able -to read any published packages, in addition to your private ones, and by -default will only publish internally.

    -

    If you then want to publish a package for the whole world to see, you can -simply override the --registry option for that publish command.

    -

    I don't want my package published in the official registry. It's private.

    -

    Set "private": true in your package.json to prevent it from being -published at all, or -"publishConfig":{"registry":"http://my-internal-registry.local"} -to force it to be published only to your internal registry.

    -

    See package.json(5) for more info on what goes in the package.json file.

    -

    Will you replicate from my registry into the public one?

    -

    No. If you want things to be public, then publish them into the public -registry using npm. What little security there is would be for nought -otherwise.

    -

    Do I have to use couchdb to build a registry that npm can talk to?

    -

    No, but it's way easier. Basically, yes, you do, or you have to -effectively implement the entire CouchDB API anyway.

    -

    Is there a website or something to see package docs and such?

    -

    Yes, head over to https://npmjs.com/

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/npm-scope.html b/deps/npm/html/partial/doc/misc/npm-scope.html deleted file mode 100644 index f65c4403676..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-scope.html +++ /dev/null @@ -1,71 +0,0 @@ -

    npm-scope

    Scoped packages

    -

    DESCRIPTION

    -

    All npm packages have a name. Some package names also have a scope. A scope -follows the usual rules for package names (url-safe characters, no leading dots -or underscores). When used in package names, preceded by an @-symbol and -followed by a slash, e.g.

    -
    @somescope/somepackagename
    -

    Scopes are a way of grouping related packages together, and also affect a few -things about the way npm treats the package.

    -

    Scoped packages are supported by the public npm registry. The npm -client is backwards-compatible with un-scoped registries, so it can be -used to work with scoped and un-scoped registries at the same time.

    -

    Installing scoped packages

    -

    Scoped packages are installed to a sub-folder of the regular installation -folder, e.g. if your other packages are installed in node_modules/packagename, -scoped modules will be in node_modules/@myorg/packagename. The scope folder -(@myorg) is simply the name of the scope preceded by an @-symbol, and can -contain any number of scoped packages.

    -

    A scoped package is installed by referencing it by name, preceded by an -@-symbol, in npm install:

    -
    npm install @myorg/mypackage
    -

    Or in package.json:

    -
    "dependencies": {
    -  "@myorg/mypackage": "^1.3.0"
    -}
    -

    Note that if the @-symbol is omitted in either case npm will instead attempt to -install from GitHub; see npm-install(1).

    -

    Requiring scoped packages

    -

    Because scoped packages are installed into a scope folder, you have to -include the name of the scope when requiring them in your code, e.g.

    -
    require('@myorg/mypackage')
    -

    There is nothing special about the way Node treats scope folders, this is -just specifying to require the module mypackage in the folder called @myorg.

    -

    Publishing scoped packages

    -

    Scoped packages can be published to any registry that supports them, including -the public npm registry.

    -

    (As of 2015-04-19, the public npm registry does support scoped packages)

    -

    If you wish, you may associate a scope with a registry; see below.

    -

    Publishing public scoped packages to the public npm registry

    -

    To publish a public scoped package, you must specify --access public with -the initial publication. This will publish the package and set access -to public as if you had run npm access public after publishing.

    -

    Publishing private scoped packages to the npm registry

    -

    To publish a private scoped package to the npm registry, you must have -an npm Private Modules -account.

    -

    You can then publish the module with npm publish or npm publish ---access restricted, and it will be present in the npm registry, with -restricted access. You can then change the access permissions, if -desired, with npm access or on the npmjs.com website.

    -

    Associating a scope with a registry

    -

    Scopes can be associated with a separate registry. This allows you to -seamlessly use a mix of packages from the public npm registry and one or more -private registries, such as npm Enterprise.

    -

    You can associate a scope with a registry at login, e.g.

    -
    npm login --registry=http://reg.example.com --scope=@myco
    -

    Scopes have a many-to-one relationship with registries: one registry can -host multiple scopes, but a scope only ever points to one registry.

    -

    You can also associate a scope with a registry using npm config:

    -
    npm config set @myco:registry http://reg.example.com
    -

    Once a scope is associated with a registry, any npm install for a package -with that scope will request packages from that registry instead. Any -npm publish for a package name that contains the scope will be published to -that registry instead.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/npm-scripts.html b/deps/npm/html/partial/doc/misc/npm-scripts.html deleted file mode 100644 index f4ce3221a3c..00000000000 --- a/deps/npm/html/partial/doc/misc/npm-scripts.html +++ /dev/null @@ -1,187 +0,0 @@ -

    npm-scripts

    How npm handles the "scripts" field

    -

    DESCRIPTION

    -

    npm supports the "scripts" property of the package.json script, for the -following scripts:

    -
      -
    • prepublish: -Run BEFORE the package is published. (Also run on local npm -install without any arguments.)
    • -
    • publish, postpublish: -Run AFTER the package is published.
    • -
    • preinstall: -Run BEFORE the package is installed
    • -
    • install, postinstall: -Run AFTER the package is installed.
    • -
    • preuninstall, uninstall: -Run BEFORE the package is uninstalled.
    • -
    • postuninstall: -Run AFTER the package is uninstalled.
    • -
    • preversion, version: -Run BEFORE bump the package version.
    • -
    • postversion: -Run AFTER bump the package version.
    • -
    • pretest, test, posttest: -Run by the npm test command.
    • -
    • prestop, stop, poststop: -Run by the npm stop command.
    • -
    • prestart, start, poststart: -Run by the npm start command.
    • -
    • prerestart, restart, postrestart: -Run by the npm restart command. Note: npm restart will run the -stop and start scripts if no restart script is provided.
    • -
    -

    Additionally, arbitrary scripts can be executed by running npm -run-script <pkg> <stage>. Pre and post commands with matching -names will be run for those as well (e.g. premyscript, myscript, -postmyscript).

    -

    COMMON USES

    -

    If you need to perform operations on your package before it is used, in a way -that is not dependent on the operating system or architecture of the -target system, use a prepublish script. This includes -tasks such as:

    -
      -
    • Compiling CoffeeScript source code into JavaScript.
    • -
    • Creating minified versions of JavaScript source code.
    • -
    • Fetching remote resources that your package will use.
    • -
    -

    The advantage of doing these things at prepublish time is that they can be done once, in a -single place, thus reducing complexity and variability. -Additionally, this means that:

    -
      -
    • You can depend on coffee-script as a devDependency, and thus -your users don't need to have it installed.
    • -
    • You don't need to include minifiers in your package, reducing -the size for your users.
    • -
    • You don't need to rely on your users having curl or wget or -other system tools on the target machines.
    • -
    -

    DEFAULT VALUES

    -

    npm will default some script values based on package contents.

    -
      -
    • "start": "node server.js":

      -

      If there is a server.js file in the root of your package, then npm -will default the start command to node server.js.

      -
    • -
    • "preinstall": "node-waf clean || true; node-waf configure build":

      -

      If there is a wscript file in the root of your package, npm will -default the preinstall command to compile using node-waf.

      -
    • -
    -

    USER

    -

    If npm was invoked with root privileges, then it will change the uid -to the user account or uid specified by the user config, which -defaults to nobody. Set the unsafe-perm flag to run scripts with -root privileges.

    -

    ENVIRONMENT

    -

    Package scripts run in an environment where many pieces of information -are made available regarding the setup of npm and the current state of -the process.

    -

    path

    -

    If you depend on modules that define executable scripts, like test -suites, then those executables will be added to the PATH for -executing the scripts. So, if your package.json has this:

    -
    { "name" : "foo"
    -, "dependencies" : { "bar" : "0.1.x" }
    -, "scripts": { "start" : "bar ./test" } }
    -

    then you could run npm start to execute the bar script, which is -exported into the node_modules/.bin directory on npm install.

    -

    package.json vars

    -

    The package.json fields are tacked onto the npm_package_ prefix. So, -for instance, if you had {"name":"foo", "version":"1.2.5"} in your -package.json file, then your package scripts would have the -npm_package_name environment variable set to "foo", and the -npm_package_version set to "1.2.5"

    -

    configuration

    -

    Configuration parameters are put in the environment with the -npm_config_ prefix. For instance, you can view the effective root -config by checking the npm_config_root environment variable.

    -

    Special: package.json "config" object

    -

    The package.json "config" keys are overwritten in the environment if -there is a config param of <name>[@<version>]:<key>. For example, -if the package.json has this:

    -
    { "name" : "foo"
    -, "config" : { "port" : "8080" }
    -, "scripts" : { "start" : "node server.js" } }
    -

    and the server.js is this:

    -
    http.createServer(...).listen(process.env.npm_package_config_port)
    -

    then the user could change the behavior by doing:

    -
    npm config set foo:port 80
    -

    current lifecycle event

    -

    Lastly, the npm_lifecycle_event environment variable is set to -whichever stage of the cycle is being executed. So, you could have a -single script used for different parts of the process which switches -based on what's currently happening.

    -

    Objects are flattened following this format, so if you had -{"scripts":{"install":"foo.js"}} in your package.json, then you'd -see this in the script:

    -
    process.env.npm_package_scripts_install === "foo.js"
    -

    EXAMPLES

    -

    For example, if your package.json contains this:

    -
    { "scripts" :
    -  { "install" : "scripts/install.js"
    -  , "postinstall" : "scripts/install.js"
    -  , "uninstall" : "scripts/uninstall.js"
    -  }
    -}
    -

    then the scripts/install.js will be called for the install, -post-install, stages of the lifecycle, and the scripts/uninstall.js -would be called when the package is uninstalled. Since -scripts/install.js is running for three different phases, it would -be wise in this case to look at the npm_lifecycle_event environment -variable.

    -

    If you want to run a make command, you can do so. This works just -fine:

    -
    { "scripts" :
    -  { "preinstall" : "./configure"
    -  , "install" : "make && make install"
    -  , "test" : "make test"
    -  }
    -}
    -

    EXITING

    -

    Scripts are run by passing the line as a script argument to sh.

    -

    If the script exits with a code other than 0, then this will abort the -process.

    -

    Note that these script files don't have to be nodejs or even -javascript programs. They just have to be some kind of executable -file.

    -

    HOOK SCRIPTS

    -

    If you want to run a specific script at a specific lifecycle event for -ALL packages, then you can use a hook script.

    -

    Place an executable file at node_modules/.hooks/{eventname}, and -it'll get run for all packages when they are going through that point -in the package lifecycle for any packages installed in that root.

    -

    Hook scripts are run exactly the same way as package.json scripts. -That is, they are in a separate child process, with the env described -above.

    -

    BEST PRACTICES

    -
      -
    • Don't exit with a non-zero error code unless you really mean it. -Except for uninstall scripts, this will cause the npm action to -fail, and potentially be rolled back. If the failure is minor or -only will prevent some optional features, then it's better to just -print a warning and exit successfully.
    • -
    • Try not to use scripts to do what npm can do for you. Read through -package.json(5) to see all the things that you can specify and enable -by simply describing your package appropriately. In general, this -will lead to a more robust and consistent state.
    • -
    • Inspect the env to determine where to put things. For instance, if -the npm_config_binroot environ is set to /home/user/bin, then -don't try to install executables into /usr/local/bin. The user -probably set it up that way for a reason.
    • -
    • Don't prefix your script commands with "sudo". If root permissions -are required for some reason, then it'll fail with that error, and -the user will sudo the npm command in question.
    • -
    • Don't use install. Use a .gyp file for compilation, and prepublish -for anything else. You should almost never have to explicitly set a -preinstall or install script. If you are doing this, please consider if -there is another option. The only valid use of install or preinstall -scripts is for compilation which must be done on the target architecture.
    • -
    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/removing-npm.html b/deps/npm/html/partial/doc/misc/removing-npm.html deleted file mode 100644 index 3b3968bfc01..00000000000 --- a/deps/npm/html/partial/doc/misc/removing-npm.html +++ /dev/null @@ -1,37 +0,0 @@ -

    npm-removal

    Cleaning the Slate

    -

    SYNOPSIS

    -

    So sad to see you go.

    -
    sudo npm uninstall npm -g
    -

    Or, if that fails, get the npm source code, and do:

    -
    sudo make uninstall
    -

    More Severe Uninstalling

    -

    Usually, the above instructions are sufficient. That will remove -npm, but leave behind anything you've installed.

    -

    If that doesn't work, or if you require more drastic measures, -continue reading.

    -

    Note that this is only necessary for globally-installed packages. Local -installs are completely contained within a project's node_modules -folder. Delete that folder, and everything is gone (unless a package's -install script is particularly ill-behaved).

    -

    This assumes that you installed node and npm in the default place. If -you configured node with a different --prefix, or installed npm with a -different prefix setting, then adjust the paths accordingly, replacing -/usr/local with your install prefix.

    -

    To remove everything npm-related manually:

    -
    rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
    -

    If you installed things with npm, then your best bet is to uninstall -them with npm first, and then install them again once you have a -proper install. This can help find any symlinks that are lying -around:

    -
    ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
    -

    Prior to version 0.3, npm used shim files for executables and node -modules. To track those down, you can do the following:

    -
    find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
    -

    (This is also in the README file.)

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/misc/semver.html b/deps/npm/html/partial/doc/misc/semver.html deleted file mode 100644 index 9b763ed18ca..00000000000 --- a/deps/npm/html/partial/doc/misc/semver.html +++ /dev/null @@ -1,262 +0,0 @@ -

    semver

    The semantic versioner for npm

    -

    Usage

    -
    $ npm install semver
    -
    -semver.valid('1.2.3') // '1.2.3'
    -semver.valid('a.b.c') // null
    -semver.clean('  =v1.2.3   ') // '1.2.3'
    -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
    -semver.gt('1.2.3', '9.8.7') // false
    -semver.lt('1.2.3', '9.8.7') // true
    -

    As a command-line utility:

    -
    $ semver -h
    -
    -Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
    -Test if version(s) satisfy the supplied range(s), and sort them.
    -
    -Multiple versions or ranges may be supplied, unless increment
    -option is specified.  In that case, only a single version may
    -be used, and it is incremented by the specified level
    -
    -Program exits successfully if any valid version satisfies
    -all supplied ranges, and prints all satisfying versions.
    -
    -If no versions are valid, or ranges are not satisfied,
    -then exits failure.
    -
    -Versions are printed in ascending order, so supplying
    -multiple versions to the utility will just sort them.
    -

    Versions

    -

    A "version" is described by the v2.0.0 specification found at -http://semver.org/.

    -

    A leading "=" or "v" character is stripped off and ignored.

    -

    Ranges

    -

    A version range is a set of comparators which specify versions -that satisfy the range.

    -

    A comparator is composed of an operator and a version. The set -of primitive operators is:

    -
      -
    • < Less than
    • -
    • <= Less than or equal to
    • -
    • > Greater than
    • -
    • >= Greater than or equal to
    • -
    • = Equal. If no operator is specified, then equality is assumed, -so this operator is optional, but MAY be included.
    • -
    -

    For example, the comparator >=1.2.7 would match the versions -1.2.7, 1.2.8, 2.5.3, and 1.3.9, but not the versions 1.2.6 -or 1.1.0.

    -

    Comparators can be joined by whitespace to form a comparator set, -which is satisfied by the intersection of all of the comparators -it includes.

    -

    A range is composed of one or more comparator sets, joined by ||. A -version matches a range if and only if every comparator in at least -one of the ||-separated comparator sets is satisfied by the version.

    -

    For example, the range >=1.2.7 <1.3.0 would match the versions -1.2.7, 1.2.8, and 1.2.99, but not the versions 1.2.6, 1.3.0, -or 1.1.0.

    -

    The range 1.2.7 || >=1.2.9 <2.0.0 would match the versions 1.2.7, -1.2.9, and 1.4.6, but not the versions 1.2.8 or 2.0.0.

    -

    Prerelease Tags

    -

    If a version has a prerelease tag (for example, 1.2.3-alpha.3) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same [major, minor, patch] tuple also has a -prerelease tag.

    -

    For example, the range >1.2.3-alpha.3 would be allowed to match the -version 1.2.3-alpha.7, but it would not be satisfied by -3.4.5-alpha.9, even though 3.4.5-alpha.9 is technically "greater -than" 1.2.3-alpha.3 according to the SemVer sort rules. The version -range only accepts prerelease tags on the 1.2.3 version. The -version 3.4.5 would satisfy the range, because it does not have a -prerelease flag, and 3.4.5 is greater than 1.2.3-alpha.7.

    -

    The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics.

    -

    Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use that specific set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the next set of prerelease versions.

    -

    Prerelease Identifiers

    -

    The method .inc takes an additional identifier string argument that -will append the value of the string as a prerelease identifier:

    -
    > semver.inc('1.2.3', 'pre', 'beta')
    -'1.2.4-beta.0'
    -
    -

    command-line example:

    -
    $ semver 1.2.3 -i prerelease --preid beta
    -1.2.4-beta.0
    -
    -

    Which then can be used to increment further:

    -
    $ semver 1.2.4-beta.0 -i prerelease
    -1.2.4-beta.1
    -
    -

    Advanced Range Syntax

    -

    Advanced range syntax desugars to primitive comparators in -deterministic ways.

    -

    Advanced ranges may be combined in the same way as primitive -comparators using white space or ||.

    -

    Hyphen Ranges X.Y.Z - A.B.C

    -

    Specifies an inclusive set.

    -
      -
    • 1.2.3 - 2.3.4 := >=1.2.3 <=2.3.4
    • -
    -

    If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes.

    -
      -
    • 1.2 - 2.3.4 := >=1.2.0 <=2.3.4
    • -
    -

    If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts.

    -
      -
    • 1.2.3 - 2.3 := >=1.2.3 <2.4.0
    • -
    • 1.2.3 - 2 := >=1.2.3 <3.0.0
    • -
    -

    X-Ranges 1.2.x 1.X 1.2.* *

    -

    Any of X, x, or * may be used to "stand in" for one of the -numeric values in the [major, minor, patch] tuple.

    -
      -
    • * := >=0.0.0 (Any version satisfies)
    • -
    • 1.x := >=1.0.0 <2.0.0 (Matching major version)
    • -
    • 1.2.x := >=1.2.0 <1.3.0 (Matching major and minor versions)
    • -
    -

    A partial version range is treated as an X-Range, so the special -character is in fact optional.

    -
      -
    • "" (empty string) := * := >=0.0.0
    • -
    • 1 := 1.x.x := >=1.0.0 <2.0.0
    • -
    • 1.2 := 1.2.x := >=1.2.0 <1.3.0
    • -
    -

    Tilde Ranges ~1.2.3 ~1.2 ~1

    -

    Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not.

    -
      -
    • ~1.2.3 := >=1.2.3 <1.(2+1).0 := >=1.2.3 <1.3.0
    • -
    • ~1.2 := >=1.2.0 <1.(2+1).0 := >=1.2.0 <1.3.0 (Same as 1.2.x)
    • -
    • ~1 := >=1.0.0 <(1+1).0.0 := >=1.0.0 <2.0.0 (Same as 1.x)
    • -
    • ~0.2.3 := >=0.2.3 <0.(2+1).0 := >=0.2.3 <0.3.0
    • -
    • ~0.2 := >=0.2.0 <0.(2+1).0 := >=0.2.0 <0.3.0 (Same as 0.2.x)
    • -
    • ~0 := >=0.0.0 <(0+1).0.0 := >=0.0.0 <1.0.0 (Same as 0.x)
    • -
    • ~1.2.3-beta.2 := >=1.2.3-beta.2 <1.3.0 Note that prereleases in -the 1.2.3 version will be allowed, if they are greater than or -equal to beta.2. So, 1.2.3-beta.4 would be allowed, but -1.2.4-beta.2 would not, because it is a prerelease of a -different [major, minor, patch] tuple.
    • -
    -

    Caret Ranges ^1.2.3 ^0.2.5 ^0.0.4

    -

    Allows changes that do not modify the left-most non-zero digit in the -[major, minor, patch] tuple. In other words, this allows patch and -minor updates for versions 1.0.0 and above, patch updates for -versions 0.X >=0.1.0, and no updates for versions 0.0.X.

    -

    Many authors treat a 0.x version as if the x were the major -"breaking-change" indicator.

    -

    Caret ranges are ideal when an author may make breaking changes -between 0.2.4 and 0.3.0 releases, which is a common practice. -However, it presumes that there will not be breaking changes between -0.2.4 and 0.2.5. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices.

    -
      -
    • ^1.2.3 := >=1.2.3 <2.0.0
    • -
    • ^0.2.3 := >=0.2.3 <0.3.0
    • -
    • ^0.0.3 := >=0.0.3 <0.0.4
    • -
    • ^1.2.3-beta.2 := >=1.2.3-beta.2 <2.0.0 Note that prereleases in -the 1.2.3 version will be allowed, if they are greater than or -equal to beta.2. So, 1.2.3-beta.4 would be allowed, but -1.2.4-beta.2 would not, because it is a prerelease of a -different [major, minor, patch] tuple.
    • -
    • ^0.0.3-beta := >=0.0.3-beta <0.0.4 Note that prereleases in the -0.0.3 version only will be allowed, if they are greater than or -equal to beta. So, 0.0.3-pr.2 would be allowed.
    • -
    -

    When parsing caret ranges, a missing patch value desugars to the -number 0, but will allow flexibility within that value, even if the -major and minor versions are both 0.

    -
      -
    • ^1.2.x := >=1.2.0 <2.0.0
    • -
    • ^0.0.x := >=0.0.0 <0.1.0
    • -
    • ^0.0 := >=0.0.0 <0.1.0
    • -
    -

    A missing minor and patch values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero.

    -
      -
    • ^1.x := >=1.0.0 <2.0.0
    • -
    • ^0.x := >=0.0.0 <1.0.0
    • -
    -

    Functions

    -

    All methods and classes take a final loose boolean argument that, if -true, will be more forgiving about not-quite-valid semver strings. -The resulting output will always be 100% strict, of course.

    -

    Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse.

    -
      -
    • valid(v): Return the parsed version, or null if it's not valid.
    • -
    • inc(v, release): Return the version incremented by the release -type (major, premajor, minor, preminor, patch, -prepatch, or prerelease), or null if it's not valid
        -
      • premajor in one call will bump the version up to the next major -version and down to a prerelease of that major version. -preminor, and prepatch work the same way.
      • -
      • If called from a non-prerelease version, the prerelease will work the -same as prepatch. It increments the patch version, then makes a -prerelease. If the input version is already a prerelease it simply -increments it.
      • -
      -
    • -
    • major(v): Return the major version number.
    • -
    • minor(v): Return the minor version number.
    • -
    • patch(v): Return the patch version number.
    • -
    -

    Comparison

    -
      -
    • gt(v1, v2): v1 > v2
    • -
    • gte(v1, v2): v1 >= v2
    • -
    • lt(v1, v2): v1 < v2
    • -
    • lte(v1, v2): v1 <= v2
    • -
    • eq(v1, v2): v1 == v2 This is true if they're logically equivalent, -even if they're not the exact same string. You already know how to -compare strings.
    • -
    • neq(v1, v2): v1 != v2 The opposite of eq.
    • -
    • cmp(v1, comparator, v2): Pass in a comparison string, and it'll call -the corresponding function above. "===" and "!==" do simple -string comparison, but are included for completeness. Throws if an -invalid comparison string is provided.
    • -
    • compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if -v2 is greater. Sorts in ascending order if passed to Array.sort().
    • -
    • rcompare(v1, v2): The reverse of compare. Sorts an array of versions -in descending order when passed to Array.sort().
    • -
    • diff(v1, v2): Returns difference between two versions by the release type -(major, premajor, minor, preminor, patch, prepatch, or prerelease), -or null if the versions are the same.
    • -
    -

    Ranges

    -
      -
    • validRange(range): Return the valid range or null if it's not valid
    • -
    • satisfies(version, range): Return true if the version satisfies the -range.
    • -
    • maxSatisfying(versions, range): Return the highest version in the list -that satisfies the range, or null if none of them do.
    • -
    • gtr(version, range): Return true if version is greater than all the -versions possible in the range.
    • -
    • ltr(version, range): Return true if version is less than all the -versions possible in the range.
    • -
    • outside(version, range, hilo): Return true if the version is outside -the bounds of the range in either the high or low direction. The -hilo argument must be either the string '>' or '<'. (This is -the function called by gtr and ltr.)
    • -
    -

    Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, or satisfy a range! For -example, the range 1.2 <1.2.9 || >2.0.0 would have a hole from 1.2.9 -until 2.0.0, so the version 1.2.10 would not be greater than the -range (because 2.0.1 satisfies, which is higher), nor less than the -range (since 1.2.8 satisfies, which is lower), and it also does not -satisfy the range.

    -

    If you want to know if a version satisfies or does not satisfy a -range, use the satisfies(version, range) function.

    - diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js index cf960a67d8b..790a760cb72 100644 --- a/deps/npm/lib/access.js +++ b/deps/npm/lib/access.js @@ -1,123 +1,110 @@ -var assert = require("assert") -var resolve = require("path").resolve -var url = require("url") +'use strict' -var log = require("npmlog") -var readPackageJson = require("read-package-json") +var resolve = require('path').resolve -var mapToRegistry = require("./utils/map-to-registry.js") -var npa = require("npm-package-arg") -var npm = require("./npm.js") +var readPackageJson = require('read-package-json') +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm.js') + +var whoami = require('./whoami') module.exports = access -access.usage = "npm access public []" - + "\nnpm access restricted []" - + "\nnpm access add []" - + "\nnpm access rm []" - + "\nnpm access ls []" - + "\nnpm access edit []" +access.usage = + 'npm access public []\n' + + 'npm access restricted []\n' + + 'npm access grant []\n' + + 'npm access revoke []\n' + + 'npm access ls-packages [||]\n' + + 'npm access ls-collaborators [ []]\n' + + 'npm access edit []' + +access.subcommands = ['public', 'restricted', 'grant', 'revoke', + 'ls-packages', 'ls-collaborators', 'edit'] access.completion = function (opts, cb) { var argv = opts.conf.argv.remain if (argv.length === 2) { - return cb(null, ["public", "restricted", "add", "rm", "ls", "edit"]) + return cb(null, access.subcommands) } switch (argv[2]) { - case "public": - case "restricted": - case "ls": - case "edit": - return cb(new Error("unimplemented: packages you can change")) - case "add": - if (argv.length === 3) return cb(null, ["read-only", "read-write"]) - - return cb(new Error("unimplemented: entities and packages")) - case "rm": - return cb(new Error("unimplemented: entities and packages")) + case 'grant': + if (argv.length === 3) { + return cb(null, ['read-only', 'read-write']) + } else { + return cb(null, []) + } + case 'public': + case 'restricted': + case 'ls-packages': + case 'ls-collaborators': + case 'edit': + return cb(null, []) + case 'revoke': + return cb(null, []) default: - return cb(new Error(argv[2]+" not recognized")) + return cb(new Error(argv[2] + ' not recognized')) } } function access (args, cb) { var cmd = args.shift() - switch (cmd) { - case "public": case "restricted": return changeAccess(args, cmd, cb) - case "add": case "set": return add(args, cb) - case "rm": case "del": case "clear": return rm(args, cb) - case "list": case "sl": case "ls": return ls(args, cb) - case "edit": case "ed": return edit(args, cb) - default: return cb("Usage:\n"+access.usage) + var params + return parseParams(cmd, args, function (err, p) { + if (err) { return cb(err) } + params = p + return mapToRegistry(params.package, npm.config, invokeCmd) + }) + + function invokeCmd (err, uri, auth, base) { + if (err) { return cb(err) } + params.auth = auth + try { + return npm.registry.access(cmd, uri, params, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + access.usage) + } } } -function changeAccess (args, level, cb) { - assert(Array.isArray(args), "changeAccess requires args be an array") - assert( - ["public", "restricted"].indexOf(level) !== -1, - "access level must be either 'public' or 'restricted'" - ) - assert(typeof cb === "function", "changeAccess requires a callback") +function parseParams (cmd, args, cb) { + var params = {} + if (cmd === 'grant') { + params.permissions = args.shift() + } + if (['grant', 'revoke', 'ls-packages'].indexOf(cmd) !== -1) { + var entity = (args.shift() || '').split(':') + params.scope = entity[0] + params.team = entity[1] + } + getPackage(args.shift(), function (err, pkg) { + if (err) { return cb(err) } + params.package = pkg - var p = (args.shift() || "").trim() - if (!p) return getCurrentPackage(level, cb) - changeAccess_(p, level, cb) -} - -function getCurrentPackage (level, cb) { - var here = resolve(npm.prefix, "package.json") - log.verbose("setPackageLevel", "here", here) - - readPackageJson(here, function (er, data) { - if (er) return cb(er) - - if (!data.name) { - return cb(new Error("Package must be named")) + if (!params.scope && cmd === 'ls-packages') { + whoami([], true, function (err, scope) { + params.scope = scope + cb(err, params) + }) + } else { + if (cmd === 'ls-collaborators') { + params.user = args.shift() + } + cb(null, params) } - - changeAccess_(data.name, level, cb) }) } -function changeAccess_ (name, level, cb) { - log.verbose("changeAccess", "name", name, "level", level) - mapToRegistry(name, npm.config, function (er, uri, auth, base) { - if (er) return cb(er) - - var data = npa(name) - if (!data.scope) { - var msg = "Sorry, you can't change the access level of unscoped packages." - log.error("access", msg) - return cb(new Error(msg)) - } - - // name must be scoped, so escape separator - name = name.replace("/", "%2f") - // FIXME: mapToRegistry still isn't generic enough SIGH - uri = url.resolve(base, "-/package/"+name+"/access") - var params = { - level : level, - auth : auth - } - - npm.registry.access(uri, params, cb) - }) -} - -function add (args, cb) { - return cb(new Error("npm access add isn't implemented yet!")) -} - -function rm (args, cb) { - return cb(new Error("npm access rm isn't implemented yet!")) -} - -function ls (args, cb) { - return cb(new Error("npm access ls isn't implemented yet!")) -} - -function edit (args, cb) { - return cb(new Error("npm access edit isn't implemented yet!")) +function getPackage (name, cb) { + if (name && name.trim()) { + cb(null, name.trim()) + } else { + readPackageJson( + resolve(npm.prefix, 'package.json'), + function (err, data) { cb(err, data.name) }) + } } diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js index c5ee76e5c85..1f2d2efceb4 100644 --- a/deps/npm/lib/build.js +++ b/deps/npm/lib/build.js @@ -122,10 +122,10 @@ function shouldWarn(pkg, folder, global, cb) { // current searched package is the linked package on first call if (linkedPkg !== currentPkg) { - if (!topPkg.dependencies) return cb() - // don't generate a warning if it's listed in dependencies - if (Object.keys(topPkg.dependencies).indexOf(currentPkg) === -1) { + if (Object.keys(topPkg.dependencies || {}) + .concat(Object.keys(topPkg.devDependencies || {})) + .indexOf(currentPkg) === -1) { if (top && pkg.preferGlobal && !global) { log.warn("prefer global", pkg._id + " should be installed with -g") diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js index 916ebd6afef..1b3558030b2 100644 --- a/deps/npm/lib/link.js +++ b/deps/npm/lib/link.js @@ -97,14 +97,13 @@ function linkInstall (pkgs, cb) { function next () { chain - ( [ [npm.commands, "unbuild", [target]] - , [function (cb) { + ( [ [function (cb) { log.verbose("link", "symlinking %s to %s", pp, target) cb() }] , [symlink, pp, target] - // do run lifecycle scripts - full build here. - , rp && [build, [target]] + // do not run any scripts + , rp && [build, [target], npm.config.get("global"), build._noLC, true] , [ resultPrinter, pkg, pp, target, rp ] ] , cb ) } diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 97cdad4de26..c049d95ba6e 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -113,6 +113,7 @@ var commandCache = {} , "unpublish" , "owner" , "access" + , "team" , "deprecate" , "shrinkwrap" diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index 057af2bc69c..2c805615a42 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -62,7 +62,7 @@ function runScript (args, cb) { function list(cb) { var json = path.join(npm.localPrefix, "package.json") var cmdList = [ "publish", "install", "uninstall" - , "test", "stop", "start", "restart" + , "test", "stop", "start", "restart", "version" ].reduce(function (l, p) { return l.concat(["pre" + p, p, "post" + p]) }, []) diff --git a/deps/npm/lib/team.js b/deps/npm/lib/team.js new file mode 100644 index 00000000000..324d8df5e22 --- /dev/null +++ b/deps/npm/lib/team.js @@ -0,0 +1,54 @@ +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm') + +module.exports = team + +team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit'] + +team.usage = + 'npm team create \n' + + 'npm team destroy \n' + + 'npm team add \n' + + 'npm team rm \n' + + 'npm team ls |\n' + + 'npm team edit ' + +team.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, team.subcommands) + } + switch (argv[2]) { + case 'ls': + case 'create': + case 'destroy': + case 'add': + case 'rm': + case 'edit': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function team (args, cb) { + // Entities are in the format : + var cmd = args.shift() + var entity = (args.shift() || '').split(':') + return mapToRegistry('/', npm.config, function (err, uri, auth) { + if (err) { return cb(err) } + try { + return npm.registry.team(cmd, uri, { + auth: auth, + scope: entity[0], + team: entity[1], + user: args.shift() + }, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + team.usage) + } + }) +} diff --git a/deps/npm/lib/utils/completion.sh b/deps/npm/lib/utils/completion.sh index 3c7a3590d80..25bef2c17b4 100755 --- a/deps/npm/lib/utils/completion.sh +++ b/deps/npm/lib/utils/completion.sh @@ -7,17 +7,21 @@ # Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm # -COMP_WORDBREAKS=${COMP_WORDBREAKS/=/} -COMP_WORDBREAKS=${COMP_WORDBREAKS/@/} -export COMP_WORDBREAKS - if type complete &>/dev/null; then _npm_completion () { + local words cword + if type _get_comp_words_by_ref &>/dev/null; then + _get_comp_words_by_ref -n = -n @ -w words -i cword + else + cword="$COMP_CWORD" + words=("${COMP_WORDS[@]}") + fi + local si="$IFS" - IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \ + IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \ COMP_LINE="$COMP_LINE" \ COMP_POINT="$COMP_POINT" \ - npm completion -- "${COMP_WORDS[@]}" \ + npm completion -- "${words[@]}" \ 2>/dev/null)) || return $? IFS="$si" } diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index 6ffb2867e27..dac6a17f251 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -366,6 +366,14 @@ function errorHandler (er) { ].join("\n")) break + case "EISDIR": + log.error("eisdir", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to npm not being able to find a package.json in" + ,"a package you are trying to install." + ].join("\n")) + break + default: log.error("", er.message || er) log.error("", ["", "If you need help, you may report this error at:" diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index a6f2b98e88d..9805a1c0c1d 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -196,12 +196,12 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { conf.gid = gid ^ 0 } - var sh = "sh" - var shFlag = "-c" + var sh = 'sh' + var shFlag = '-c' - if (process.platform === "win32") { - sh = process.env.comspec || "cmd" - shFlag = "/c" + if (process.platform === 'win32') { + sh = process.env.comspec || 'cmd' + shFlag = '/d /s /c' conf.windowsVerbatimArguments = true } @@ -313,7 +313,9 @@ function makeEnv (data, prefix, env) { , verPref = data.name + "@" + data.version + ":" keys.forEach(function (i) { - if (i.charAt(0) === "_" && i.indexOf("_"+namePref) !== 0) { + // in some rare cases (e.g. working with nerf darts), there are segmented + // "private" (underscore-prefixed) config names -- don't export + if (i.charAt(0) === '_' && i.indexOf('_' + namePref) !== 0 || i.match(/:_/)) { return } var value = npm.config.get(i) diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index b33392488f3..dbd48a0145a 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -141,7 +141,7 @@ function dump (data, cb) { function checkGit (localData, cb) { fs.stat(path.join(npm.localPrefix, '.git'), function (er, s) { - var doGit = !er && s.isDirectory() && npm.config.get('git-tag-version') + var doGit = !er && npm.config.get('git-tag-version') if (!doGit) { if (er) log.verbose('version', 'error checking for .git', er) log.verbose('version', 'not tagging in git') diff --git a/deps/npm/lib/whoami.js b/deps/npm/lib/whoami.js index d92a6574a18..bef0184a006 100644 --- a/deps/npm/lib/whoami.js +++ b/deps/npm/lib/whoami.js @@ -40,7 +40,7 @@ function whoami (args, silent, cb) { // At this point, if they have a credentials object, it doesn't have a token // or auth in it. Probably just the default registry. var needAuth = new Error( - "'npm whoami' requires you to be logged in." + "this command requires you to be logged in." ) needAuth.code = 'ENEEDAUTH' process.nextTick(cb.bind(this, needAuth)) diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 997fa50f29a..e9951dba866 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "July 2015" "" "" +.TH "NPM" "1" "September 2015" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P @@ -16,7 +16,7 @@ To install an old \fBand unsupported\fR version of npm that works on node 0\.3 and prior, clone the git repo and dig through the old tags and branches\. .SH Super Easy Install .P -npm comes with node \fIhttp://nodejs\.org/download/\fR now\. +npm is bundled with node \fIhttp://nodejs\.org/download/\fR\|\. .SS Windows Computers .P Get the MSI \fIhttp://nodejs\.org/download/\fR\|\. npm is in it\. diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index f1d7272469b..5914028674f 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "July 2015" "" "" +.TH "NPM\-ACCESS" "1" "September 2015" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS @@ -8,10 +8,11 @@ npm access public [] npm access restricted [] -npm access add [] -npm access rm [] +npm access grant [] +npm access revoke [] -npm access ls [] +npm access ls\-packages [||] +npm access ls\-collaborators [ []] npm access edit [] .fi .RE @@ -27,13 +28,19 @@ subcommand\. public / restricted: Set a package to be either publicly accessible or restricted\. .IP \(bu 2 -add / rm: +grant / revoke: Add or remove the ability of users and teams to have read\-only or read\-write access to a package\. .IP \(bu 2 -ls: +ls\-packages: +Show all of the packages a user or a team is able to access, along with the +access level, except for read\-only public packages (it won't print the whole +registry listing) +.IP \(bu 2 +ls\-collaborators: Show all of the access privileges for a package\. Will only show permissions -for packages to which you have at least read access\. +for packages to which you have at least read access\. If \fB\fP is passed in, +the list is filtered only to teams \fIthat\fR user happens to belong to\. .IP \(bu 2 edit: Set the access privileges for a package at once using \fB$EDITOR\fP\|\. @@ -65,9 +72,13 @@ of a team or directly as an owner\. If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use \fB\-\-access=public\fP\|\. +.P +Management of teams and team memberships is done with the \fBnpm team\fP command\. .SH SEE ALSO .RS 0 .IP \(bu 2 +npm help team +.IP \(bu 2 npm help publish .IP \(bu 2 npm help 7 config diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index ade506ef539..478088fdd28 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "July 2015" "" "" +.TH "NPM\-ADDUSER" "1" "September 2015" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index 6250b242ff4..e0effefc538 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "July 2015" "" "" +.TH "NPM\-BIN" "1" "September 2015" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index fde8d06191b..7cab65c79f5 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "July 2015" "" "" +.TH "NPM\-BUGS" "1" "September 2015" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index d17fe158c82..f7c947b8ed6 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "July 2015" "" "" +.TH "NPM\-BUILD" "1" "September 2015" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 04bd9694272..fd23854f9cf 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "July 2015" "" "" +.TH "NPM\-BUNDLE" "1" "September 2015" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 5c84c222a62..059584a1c2f 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "July 2015" "" "" +.TH "NPM\-CACHE" "1" "September 2015" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 15a8a21a0d1..17cdf2fe52a 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "July 2015" "" "" +.TH "NPM\-COMPLETION" "1" "September 2015" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index 75c458ddbdb..881e86a143e 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "July 2015" "" "" +.TH "NPM\-CONFIG" "1" "September 2015" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 587cfb7ac5d..57b67484c23 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "July 2015" "" "" +.TH "NPM\-DEDUPE" "1" "September 2015" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index ae01b145a48..38366de592d 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "July 2015" "" "" +.TH "NPM\-DEPRECATE" "1" "September 2015" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 51444feee39..0b7d572446a 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "July 2015" "" "" +.TH "NPM\-DIST\-TAG" "1" "September 2015" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index fa164136c50..4d4e207bc67 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "July 2015" "" "" +.TH "NPM\-DOCS" "1" "September 2015" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index ac1857bc3d7..59b139d5481 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "July 2015" "" "" +.TH "NPM\-EDIT" "1" "September 2015" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 40d02a1c870..339707fb3fc 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "July 2015" "" "" +.TH "NPM\-EXPLORE" "1" "September 2015" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 08d94430442..605033bfcc3 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "July 2015" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "September 2015" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 2a529a5d7e8..912dd892ac3 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "July 2015" "" "" +.TH "NPM\-HELP" "1" "September 2015" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index d8886630f9e..fb563d9240c 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "July 2015" "" "" +.TH "NPM\-INIT" "1" "September 2015" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 6639b699264..a1523abe780 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "July 2015" "" "" +.TH "NPM\-INSTALL" "1" "September 2015" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index 8a0c843fa2f..d379b7447aa 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "July 2015" "" "" +.TH "NPM\-LINK" "1" "September 2015" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 379b9b03062..9b792e84a73 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "July 2015" "" "" +.TH "NPM\-LOGOUT" "1" "September 2015" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index b7775375c19..97ce65e1b3f 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "July 2015" "" "" +.TH "NPM\-LS" "1" "September 2015" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@2.13.3 /path/to/npm +npm@2.14.2 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 01b44601404..abf70f9e53b 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "July 2015" "" "" +.TH "NPM\-OUTDATED" "1" "September 2015" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index c6ef75bb35c..d4cdeddabe9 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "July 2015" "" "" +.TH "NPM\-OWNER" "1" "September 2015" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index a630def97a0..705b3279513 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "July 2015" "" "" +.TH "NPM\-PACK" "1" "September 2015" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 098e82cfb67..471dde93278 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "July 2015" "" "" +.TH "NPM\-PING" "1" "September 2015" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index 1bc68d0c0d1..108d280349b 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "July 2015" "" "" +.TH "NPM\-PREFIX" "1" "September 2015" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 937fbb34f13..91387d93034 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "July 2015" "" "" +.TH "NPM\-PRUNE" "1" "September 2015" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index a6cab551937..b7592a85b9a 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "July 2015" "" "" +.TH "NPM\-PUBLISH" "1" "September 2015" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 7e890d50b5f..50fc7fe2794 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "July 2015" "" "" +.TH "NPM\-REBUILD" "1" "September 2015" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 477f87a3c5f..92c2e5d9fa0 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "July 2015" "" "" +.TH "NPM\-REPO" "1" "September 2015" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index bbfd94f741c..605c164670c 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "July 2015" "" "" +.TH "NPM\-RESTART" "1" "September 2015" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1 index 784d7e283f4..1a7d5fe4b9c 100644 --- a/deps/npm/man/man1/npm-rm.1 +++ b/deps/npm/man/man1/npm-rm.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RM" "1" "July 2015" "" "" +.TH "NPM\-RM" "1" "September 2015" "" "" .SH "NAME" \fBnpm-rm\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 7f3c87b76e1..e3419b8550d 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "July 2015" "" "" +.TH "NPM\-ROOT" "1" "September 2015" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 51c94d9d41c..cca066e3539 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "July 2015" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "September 2015" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index d9110550944..86f51f4389d 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "July 2015" "" "" +.TH "NPM\-SEARCH" "1" "September 2015" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index 7b3569a172a..3833db9efde 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "July 2015" "" "" +.TH "NPM\-SHRINKWRAP" "1" "September 2015" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index d28d81168b0..d3ca5051393 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "July 2015" "" "" +.TH "NPM\-STAR" "1" "September 2015" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index 0f6c5342e8c..81010dde859 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "July 2015" "" "" +.TH "NPM\-STARS" "1" "September 2015" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 55e2e9c7f20..32175dc1a7e 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "July 2015" "" "" +.TH "NPM\-START" "1" "September 2015" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index b4d12d6b779..aa29a741900 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "July 2015" "" "" +.TH "NPM\-STOP" "1" "September 2015" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1 index 606270e9b46..8205efdf373 100644 --- a/deps/npm/man/man1/npm-tag.1 +++ b/deps/npm/man/man1/npm-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "1" "July 2015" "" "" +.TH "NPM\-TAG" "1" "September 2015" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 new file mode 100644 index 00000000000..1a49d86f1c2 --- /dev/null +++ b/deps/npm/man/man1/npm-team.1 @@ -0,0 +1,63 @@ +.TH "NPM\-TEAM" "1" "September 2015" "" "" +.SH "NAME" +\fBnpm-team\fR \- Manage organization teams and team memberships +.SH SYNOPSIS +.P +.RS 2 +.nf +npm team create +npm team destroy + +npm team add +npm team rm + +npm team ls | + +npm team edit +.fi +.RE +.SH DESCRIPTION +.P +Used to manage teams in organizations, and change team memberships\. Does not +handle permissions for packages\. +.P +Teams must always be fully qualified with the organization/scope they belond to +when operating on them, separated by a colon (\fB:\fP)\. That is, if you have a +\fBdevelopers\fP team on a \fBfoo\fP organization, you must always refer to that team as +\fBdevelopers:foo\fP in these commands\. +.RS 0 +.IP \(bu 2 +create / destroy: +Create a new team, or destroy an existing one\. +.IP \(bu 2 +add / rm: +Add a user to an existing team, or remove a user from a team they belong to\. +.IP \(bu 2 +ls: +If performed on an organization name, will return a list of existing teams +under that organization\. If performed on a team, it will instead return a list +of all users belonging to that particular team\. + +.RE +.SH DETAILS +.P +\fBnpm team\fP always operates directly on the current registry, configurable from +the command line using \fB\-\-registry=\fP\|\. +.P +In order to create teams and manage team membership, you must be a \fIteam admin\fR +under the given organization\. Listing teams and team memberships may be done by +any member of the organizations\. +.P +Organization creation and management of team admins and \fIorganization\fR members +is done through the website, not the npm CLI\. +.P +To use teams to manage permissions on packages belonging to your organization, +use the \fBnpm access\fP command to grant or revoke the appropriate permissions\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help access +.IP \(bu 2 +npm help 7 registr + +.RE diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 658b8e9cce7..c83273fafc2 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "July 2015" "" "" +.TH "NPM\-TEST" "1" "September 2015" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 11bb0c235ff..1ce230a33da 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RM" "1" "July 2015" "" "" +.TH "NPM\-RM" "1" "September 2015" "" "" .SH "NAME" \fBnpm-rm\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index dbb4bf91e4a..df115205b8c 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "July 2015" "" "" +.TH "NPM\-UNPUBLISH" "1" "September 2015" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index d9afff56cde..6f1cec26c42 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "July 2015" "" "" +.TH "NPM\-UPDATE" "1" "September 2015" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 1d72440fe1e..7e1fa8a1df7 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "July 2015" "" "" +.TH "NPM\-VERSION" "1" "September 2015" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 70f47dc979a..aa9a71e0dd7 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "July 2015" "" "" +.TH "NPM\-VIEW" "1" "September 2015" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index d887b35dc0b..c0b3332be43 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "July 2015" "" "" +.TH "NPM\-WHOAMI" "1" "September 2015" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index cb0814dde86..fa4af82594b 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "July 2015" "" "" +.TH "NPM" "1" "September 2015" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -2.13.3 +2.14.2 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm-bin.3 b/deps/npm/man/man3/npm-bin.3 index 3e67fc13f3a..4e906209f5d 100644 --- a/deps/npm/man/man3/npm-bin.3 +++ b/deps/npm/man/man3/npm-bin.3 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "3" "July 2015" "" "" +.TH "NPM\-BIN" "3" "September 2015" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-bugs.3 b/deps/npm/man/man3/npm-bugs.3 index 03f349ecec7..0f646542bc1 100644 --- a/deps/npm/man/man3/npm-bugs.3 +++ b/deps/npm/man/man3/npm-bugs.3 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "3" "July 2015" "" "" +.TH "NPM\-BUGS" "3" "September 2015" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-cache.3 b/deps/npm/man/man3/npm-cache.3 index 0f3a376af4e..245d72a363a 100644 --- a/deps/npm/man/man3/npm-cache.3 +++ b/deps/npm/man/man3/npm-cache.3 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "3" "July 2015" "" "" +.TH "NPM\-CACHE" "3" "September 2015" "" "" .SH "NAME" \fBnpm-cache\fR \- manage the npm cache programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-commands.3 b/deps/npm/man/man3/npm-commands.3 index 31112f88961..38fdc358cb5 100644 --- a/deps/npm/man/man3/npm-commands.3 +++ b/deps/npm/man/man3/npm-commands.3 @@ -1,4 +1,4 @@ -.TH "NPM\-COMMANDS" "3" "July 2015" "" "" +.TH "NPM\-COMMANDS" "3" "September 2015" "" "" .SH "NAME" \fBnpm-commands\fR \- npm commands .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-config.3 b/deps/npm/man/man3/npm-config.3 index 216d4d78dfd..63f3d9feb86 100644 --- a/deps/npm/man/man3/npm-config.3 +++ b/deps/npm/man/man3/npm-config.3 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "3" "July 2015" "" "" +.TH "NPM\-CONFIG" "3" "September 2015" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-deprecate.3 b/deps/npm/man/man3/npm-deprecate.3 index 7963db6ba9b..b3834757b61 100644 --- a/deps/npm/man/man3/npm-deprecate.3 +++ b/deps/npm/man/man3/npm-deprecate.3 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "3" "July 2015" "" "" +.TH "NPM\-DEPRECATE" "3" "September 2015" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-docs.3 b/deps/npm/man/man3/npm-docs.3 index b99ea3fe948..d81ec50b9e1 100644 --- a/deps/npm/man/man3/npm-docs.3 +++ b/deps/npm/man/man3/npm-docs.3 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "3" "July 2015" "" "" +.TH "NPM\-DOCS" "3" "September 2015" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-edit.3 b/deps/npm/man/man3/npm-edit.3 index d76cea18a5f..817134fb002 100644 --- a/deps/npm/man/man3/npm-edit.3 +++ b/deps/npm/man/man3/npm-edit.3 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "3" "July 2015" "" "" +.TH "NPM\-EDIT" "3" "September 2015" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-explore.3 b/deps/npm/man/man3/npm-explore.3 index 7f253524a17..530ee8814ea 100644 --- a/deps/npm/man/man3/npm-explore.3 +++ b/deps/npm/man/man3/npm-explore.3 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "3" "July 2015" "" "" +.TH "NPM\-EXPLORE" "3" "September 2015" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-help-search.3 b/deps/npm/man/man3/npm-help-search.3 index 6aa3df57047..a22a99c73ff 100644 --- a/deps/npm/man/man3/npm-help-search.3 +++ b/deps/npm/man/man3/npm-help-search.3 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "3" "July 2015" "" "" +.TH "NPM\-HELP\-SEARCH" "3" "September 2015" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search the help pages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-init.3 b/deps/npm/man/man3/npm-init.3 index b69fdfd952b..26c3bb5582c 100644 --- a/deps/npm/man/man3/npm-init.3 +++ b/deps/npm/man/man3/npm-init.3 @@ -1,4 +1,4 @@ -.TH "NPM" "" "July 2015" "" "" +.TH "NPM" "" "September 2015" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-install.3 b/deps/npm/man/man3/npm-install.3 index e639afde0a5..ee741fbf4cb 100644 --- a/deps/npm/man/man3/npm-install.3 +++ b/deps/npm/man/man3/npm-install.3 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "3" "July 2015" "" "" +.TH "NPM\-INSTALL" "3" "September 2015" "" "" .SH "NAME" \fBnpm-install\fR \- install a package programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-link.3 b/deps/npm/man/man3/npm-link.3 index c8a35f631ca..a9dc6b40c83 100644 --- a/deps/npm/man/man3/npm-link.3 +++ b/deps/npm/man/man3/npm-link.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "3" "July 2015" "" "" +.TH "NPM\-LINK" "3" "September 2015" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-load.3 b/deps/npm/man/man3/npm-load.3 index 7268d01ad59..2fb068e7ee3 100644 --- a/deps/npm/man/man3/npm-load.3 +++ b/deps/npm/man/man3/npm-load.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LOAD" "3" "July 2015" "" "" +.TH "NPM\-LOAD" "3" "September 2015" "" "" .SH "NAME" \fBnpm-load\fR \- Load config settings .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-ls.3 b/deps/npm/man/man3/npm-ls.3 index 1e43327495b..3913f3c22ca 100644 --- a/deps/npm/man/man3/npm-ls.3 +++ b/deps/npm/man/man3/npm-ls.3 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "3" "July 2015" "" "" +.TH "NPM\-LS" "3" "September 2015" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-outdated.3 b/deps/npm/man/man3/npm-outdated.3 index 9a570e8215a..9a1f3c28f37 100644 --- a/deps/npm/man/man3/npm-outdated.3 +++ b/deps/npm/man/man3/npm-outdated.3 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "3" "July 2015" "" "" +.TH "NPM\-OUTDATED" "3" "September 2015" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-owner.3 b/deps/npm/man/man3/npm-owner.3 index 03b8d869e6b..e0371ae4f0d 100644 --- a/deps/npm/man/man3/npm-owner.3 +++ b/deps/npm/man/man3/npm-owner.3 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "3" "July 2015" "" "" +.TH "NPM\-OWNER" "3" "September 2015" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-pack.3 b/deps/npm/man/man3/npm-pack.3 index de3d36c4f55..42d04998471 100644 --- a/deps/npm/man/man3/npm-pack.3 +++ b/deps/npm/man/man3/npm-pack.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "3" "July 2015" "" "" +.TH "NPM\-PACK" "3" "September 2015" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-ping.3 b/deps/npm/man/man3/npm-ping.3 index 5fe65f4d231..3cb43167a3f 100644 --- a/deps/npm/man/man3/npm-ping.3 +++ b/deps/npm/man/man3/npm-ping.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "3" "July 2015" "" "" +.TH "NPM\-PING" "3" "September 2015" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-prefix.3 b/deps/npm/man/man3/npm-prefix.3 index 39b7e382e90..0a389f83db3 100644 --- a/deps/npm/man/man3/npm-prefix.3 +++ b/deps/npm/man/man3/npm-prefix.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "3" "July 2015" "" "" +.TH "NPM\-PREFIX" "3" "September 2015" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-prune.3 b/deps/npm/man/man3/npm-prune.3 index 1adb72e0564..f3dabf0c50a 100644 --- a/deps/npm/man/man3/npm-prune.3 +++ b/deps/npm/man/man3/npm-prune.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "3" "July 2015" "" "" +.TH "NPM\-PRUNE" "3" "September 2015" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-publish.3 b/deps/npm/man/man3/npm-publish.3 index 650efc706c0..a82dfd0d553 100644 --- a/deps/npm/man/man3/npm-publish.3 +++ b/deps/npm/man/man3/npm-publish.3 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "3" "July 2015" "" "" +.TH "NPM\-PUBLISH" "3" "September 2015" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-rebuild.3 b/deps/npm/man/man3/npm-rebuild.3 index e1bdde2484d..dec35212e47 100644 --- a/deps/npm/man/man3/npm-rebuild.3 +++ b/deps/npm/man/man3/npm-rebuild.3 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "3" "July 2015" "" "" +.TH "NPM\-REBUILD" "3" "September 2015" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-repo.3 b/deps/npm/man/man3/npm-repo.3 index 66558d6508a..828bf3733df 100644 --- a/deps/npm/man/man3/npm-repo.3 +++ b/deps/npm/man/man3/npm-repo.3 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "3" "July 2015" "" "" +.TH "NPM\-REPO" "3" "September 2015" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-restart.3 b/deps/npm/man/man3/npm-restart.3 index 0d6b0c03bee..b1acd0a5211 100644 --- a/deps/npm/man/man3/npm-restart.3 +++ b/deps/npm/man/man3/npm-restart.3 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "3" "July 2015" "" "" +.TH "NPM\-RESTART" "3" "September 2015" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-root.3 b/deps/npm/man/man3/npm-root.3 index d34c979024e..82d4187dde5 100644 --- a/deps/npm/man/man3/npm-root.3 +++ b/deps/npm/man/man3/npm-root.3 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "3" "July 2015" "" "" +.TH "NPM\-ROOT" "3" "September 2015" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-run-script.3 b/deps/npm/man/man3/npm-run-script.3 index 2908d02eaa0..ea2cf417e9d 100644 --- a/deps/npm/man/man3/npm-run-script.3 +++ b/deps/npm/man/man3/npm-run-script.3 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "3" "July 2015" "" "" +.TH "NPM\-RUN\-SCRIPT" "3" "September 2015" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-search.3 b/deps/npm/man/man3/npm-search.3 index b4cb98248b3..f56b0e2bbaf 100644 --- a/deps/npm/man/man3/npm-search.3 +++ b/deps/npm/man/man3/npm-search.3 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "3" "July 2015" "" "" +.TH "NPM\-SEARCH" "3" "September 2015" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-shrinkwrap.3 b/deps/npm/man/man3/npm-shrinkwrap.3 index 63d019aa749..3f74eb83048 100644 --- a/deps/npm/man/man3/npm-shrinkwrap.3 +++ b/deps/npm/man/man3/npm-shrinkwrap.3 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "3" "July 2015" "" "" +.TH "NPM\-SHRINKWRAP" "3" "September 2015" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-start.3 b/deps/npm/man/man3/npm-start.3 index d309d4264af..3481911cbe6 100644 --- a/deps/npm/man/man3/npm-start.3 +++ b/deps/npm/man/man3/npm-start.3 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "3" "July 2015" "" "" +.TH "NPM\-START" "3" "September 2015" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-stop.3 b/deps/npm/man/man3/npm-stop.3 index 30e3444a9d4..1cc1f0e9369 100644 --- a/deps/npm/man/man3/npm-stop.3 +++ b/deps/npm/man/man3/npm-stop.3 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "3" "July 2015" "" "" +.TH "NPM\-STOP" "3" "September 2015" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-tag.3 b/deps/npm/man/man3/npm-tag.3 index 2eecc980615..266f1d0f274 100644 --- a/deps/npm/man/man3/npm-tag.3 +++ b/deps/npm/man/man3/npm-tag.3 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "3" "July 2015" "" "" +.TH "NPM\-TAG" "3" "September 2015" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-test.3 b/deps/npm/man/man3/npm-test.3 index 3c91fde9806..2dd90ae624f 100644 --- a/deps/npm/man/man3/npm-test.3 +++ b/deps/npm/man/man3/npm-test.3 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "3" "July 2015" "" "" +.TH "NPM\-TEST" "3" "September 2015" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-uninstall.3 b/deps/npm/man/man3/npm-uninstall.3 index d5027d84b14..53a2fbdc136 100644 --- a/deps/npm/man/man3/npm-uninstall.3 +++ b/deps/npm/man/man3/npm-uninstall.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "3" "July 2015" "" "" +.TH "NPM\-UNINSTALL" "3" "September 2015" "" "" .SH "NAME" \fBnpm-uninstall\fR \- uninstall a package programmatically .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-unpublish.3 b/deps/npm/man/man3/npm-unpublish.3 index f9b333da5be..29f59578fba 100644 --- a/deps/npm/man/man3/npm-unpublish.3 +++ b/deps/npm/man/man3/npm-unpublish.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "3" "July 2015" "" "" +.TH "NPM\-UNPUBLISH" "3" "September 2015" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-update.3 b/deps/npm/man/man3/npm-update.3 index 51601179d98..238c5baff19 100644 --- a/deps/npm/man/man3/npm-update.3 +++ b/deps/npm/man/man3/npm-update.3 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "3" "July 2015" "" "" +.TH "NPM\-UPDATE" "3" "September 2015" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS @@ -8,7 +8,7 @@ npm\.commands\.update(packages, callback) .fi .RE -.TH "DESCRIPTION" "" "July 2015" "" "" +.TH "DESCRIPTION" "" "September 2015" "" "" .SH "NAME" \fBDESCRIPTION\fR .P diff --git a/deps/npm/man/man3/npm-version.3 b/deps/npm/man/man3/npm-version.3 index bbc5785d885..7ac421e29a3 100644 --- a/deps/npm/man/man3/npm-version.3 +++ b/deps/npm/man/man3/npm-version.3 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "3" "July 2015" "" "" +.TH "NPM\-VERSION" "3" "September 2015" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm-view.3 b/deps/npm/man/man3/npm-view.3 index 65a201f65b7..c5dba4f2c44 100644 --- a/deps/npm/man/man3/npm-view.3 +++ b/deps/npm/man/man3/npm-view.3 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "3" "July 2015" "" "" +.TH "NPM\-VIEW" "3" "September 2015" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS @@ -98,7 +98,7 @@ was required by each matching version of yui3: .P .RS 2 .nf -npm\.commands\.view(["yui3@'>0\.5\.4'", "dependencies\.jsdom"], callback) +npm\.commands\.view(["yui3@>0\.5\.4", "dependencies\.jsdom"], callback) .fi .RE .SH OUTPUT diff --git a/deps/npm/man/man3/npm-whoami.3 b/deps/npm/man/man3/npm-whoami.3 index c9e20c78957..ff9389e9d27 100644 --- a/deps/npm/man/man3/npm-whoami.3 +++ b/deps/npm/man/man3/npm-whoami.3 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "3" "July 2015" "" "" +.TH "NPM\-WHOAMI" "3" "September 2015" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index ddb2025944f..778397d3c3f 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -1,4 +1,4 @@ -.TH "NPM" "3" "July 2015" "" "" +.TH "NPM" "3" "September 2015" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) { .RE .SH VERSION .P -2.13.3 +2.14.2 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index f1b2a8d7f2f..ede6c826071 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "July 2015" "" "" +.TH "NPM\-FOLDERS" "5" "September 2015" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index f1b2a8d7f2f..ede6c826071 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "July 2015" "" "" +.TH "NPM\-FOLDERS" "5" "September 2015" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 3f1754eedb2..9bee77e13ad 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "July 2015" "" "" +.TH "PACKAGE\.JSON" "5" "September 2015" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -694,7 +694,7 @@ this\. If you depend on features introduced in 1\.5\.2, use \fB">= 1\.5\.2 < 2"\ .P Array of package names that will be bundled when publishing the package\. .P -If this is spelled \fB"bundleDependencies"\fP, then that is also honorable\. +If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. .SH optionalDependencies .P If a dependency can be used, but you would like npm to proceed if it cannot be diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 246c4a39c44..2b3c1917b12 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "July 2015" "" "" +.TH "NPMRC" "5" "September 2015" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 3f1754eedb2..9bee77e13ad 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "July 2015" "" "" +.TH "PACKAGE\.JSON" "5" "September 2015" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -694,7 +694,7 @@ this\. If you depend on features introduced in 1\.5\.2, use \fB">= 1\.5\.2 < 2"\ .P Array of package names that will be bundled when publishing the package\. .P -If this is spelled \fB"bundleDependencies"\fP, then that is also honorable\. +If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. .SH optionalDependencies .P If a dependency can be used, but you would like npm to proceed if it cannot be diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index b7c629c3fbc..89230807e91 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "July 2015" "" "" +.TH "NPM\-CODING\-STYLE" "7" "September 2015" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 8a446f1d39f..9e42d65fd9b 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "July 2015" "" "" +.TH "NPM\-CONFIG" "7" "September 2015" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index 90dff7ba16c..413d1e87f0b 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "July 2015" "" "" +.TH "NPM\-DEVELOPERS" "7" "September 2015" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION @@ -140,12 +140,16 @@ need to add them to \fB\|\.npmignore\fP explicitly: .IP \(bu 2 \fB\|\.hg\fP .IP \(bu 2 +\fB\|\.npmrc\fP +.IP \(bu 2 \fB\|\.lock\-wscript\fP .IP \(bu 2 \fB\|\.svn\fP .IP \(bu 2 \fB\|\.wafpickle\-*\fP .IP \(bu 2 +\fBconfig\.gypi\fP +.IP \(bu 2 \fBCVS\fP .IP \(bu 2 \fBnpm\-debug\.log\fP @@ -162,7 +166,11 @@ The following paths and files are never ignored, so adding them to .IP \(bu 2 \fBpackage\.json\fP .IP \(bu 2 -\fBREADME\.*\fP +\fBREADME\fP (and its variants) +.IP \(bu 2 +\fBCHANGELOG\fP (and its variants) +.IP \(bu 2 +\fBLICENSE\fP / \fBLICENCE\fP .RE .SH Link Packages diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index 42f47cd24fa..e99504da23b 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "July 2015" "" "" +.TH "NPM\-DISPUTES" "7" "September 2015" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .SH SYNOPSIS diff --git a/deps/npm/man/man7/npm-faq.7 b/deps/npm/man/man7/npm-faq.7 index 907c2591bcf..14c1706d165 100644 --- a/deps/npm/man/man7/npm-faq.7 +++ b/deps/npm/man/man7/npm-faq.7 @@ -1,4 +1,4 @@ -.TH "NPM\-FAQ" "7" "July 2015" "" "" +.TH "NPM\-FAQ" "7" "September 2015" "" "" .SH "NAME" \fBnpm-faq\fR \- Frequently Asked Questions .SH Where can I find these docs in HTML? diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index 6cf62b8de6b..de053dfa22d 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "July 2015" "" "" +.TH "NPM\-INDEX" "7" "September 2015" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README @@ -136,6 +136,9 @@ Stop a package .SS npm help tag .P Tag a published version +.SS npm help team +.P +Manage organization teams and team memberships .SS npm help test .P Test a package diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index a1cf07f1d83..6a2fd659948 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "July 2015" "" "" +.TH "NPM\-REGISTRY" "7" "September 2015" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index 5c1ffb24228..67cda838215 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "July 2015" "" "" +.TH "NPM\-SCOPE" "7" "September 2015" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index 1e1002dea70..d4bed1b7d6f 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "July 2015" "" "" +.TH "NPM\-SCRIPTS" "7" "September 2015" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index bf1c9ca9f49..d3c303b3a24 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "July 2015" "" "" +.TH "NPM\-REMOVAL" "1" "September 2015" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index 994615e4c91..3c2594da295 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "July 2015" "" "" +.TH "SEMVER" "7" "September 2015" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage diff --git a/deps/npm/node_modules/chmodr/chmodr.js b/deps/npm/node_modules/chmodr/chmodr.js index 9edaa7f02d7..1e167da21bf 100644 --- a/deps/npm/node_modules/chmodr/chmodr.js +++ b/deps/npm/node_modules/chmodr/chmodr.js @@ -18,7 +18,15 @@ function chmodr (p, mode, cb) { var len = children.length var errState = null children.forEach(function (child) { - chmodr(path.resolve(p, child), mode, then) + var pathChild = path.resolve(p, child); + fs.lstat(pathChild, function(er, stats) { + if (er) + return cb(er) + if (!stats.isSymbolicLink()) + chmodr(pathChild, mode, then) + else + then() + }) }) function then (er) { if (errState) return @@ -39,7 +47,10 @@ function chmodrSync (p, mode) { if (!children.length) return fs.chmodSync(p, dirMode(mode)) children.forEach(function (child) { - chmodrSync(path.resolve(p, child), mode) + var pathChild = path.resolve(p, child) + var stats = fs.lstatSync(pathChild) + if (!stats.isSymbolicLink()) + chmodrSync(pathChild, mode) }) return fs.chmodSync(p, dirMode(mode)) } diff --git a/deps/npm/node_modules/chmodr/package.json b/deps/npm/node_modules/chmodr/package.json index e253434ef45..54febed62cb 100644 --- a/deps/npm/node_modules/chmodr/package.json +++ b/deps/npm/node_modules/chmodr/package.json @@ -6,38 +6,41 @@ }, "name": "chmodr", "description": "like `chmod -R`", - "version": "0.1.1", + "version": "1.0.1", "repository": { "type": "git", "url": "git://github.com/isaacs/chmodr.git" }, "main": "chmodr.js", "devDependencies": { - "tap": "0.2", "mkdirp": "0.3", - "rimraf": "" + "rimraf": "", + "tap": "^1.3.2" }, "scripts": { "test": "tap test/*.js" }, "license": "ISC", - "gitHead": "2f301476bc6fc93e47d2ba2e3ab0409f0d0c15ba", + "files": [ + "chmodr.js" + ], + "gitHead": "a1ffe57f50c7d1a32e342ed1a03772d37bb4d00e", "bugs": { "url": "https://github.com/isaacs/chmodr/issues" }, "homepage": "https://github.com/isaacs/chmodr#readme", - "_id": "chmodr@0.1.1", - "_shasum": "115c8f9ec62be3ef019085782c9448e471560261", - "_from": "chmodr@0.1.1", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", + "_id": "chmodr@1.0.1", + "_shasum": "858e07efd75b6633ae6121ffaa33b2900bcfe18d", + "_from": "chmodr@>=1.0.1 <1.1.0", + "_npmVersion": "3.2.1", + "_nodeVersion": "2.2.1", "_npmUser": { "name": "isaacs", "email": "isaacs@npmjs.com" }, "dist": { - "shasum": "115c8f9ec62be3ef019085782c9448e471560261", - "tarball": "http://registry.npmjs.org/chmodr/-/chmodr-0.1.1.tgz" + "shasum": "858e07efd75b6633ae6121ffaa33b2900bcfe18d", + "tarball": "http://registry.npmjs.org/chmodr/-/chmodr-1.0.1.tgz" }, "maintainers": [ { @@ -46,5 +49,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/chmodr/-/chmodr-0.1.1.tgz" + "_resolved": "https://registry.npmjs.org/chmodr/-/chmodr-1.0.1.tgz" } diff --git a/deps/npm/node_modules/chmodr/test/basic.js b/deps/npm/node_modules/chmodr/test/basic.js deleted file mode 100644 index aba1cd30a70..00000000000 --- a/deps/npm/node_modules/chmodr/test/basic.js +++ /dev/null @@ -1,63 +0,0 @@ -var chmodr = require("../") -, test = require("tap").test -, mkdirp = require("mkdirp") -, rimraf = require("rimraf") -, fs = require("fs") -, dirs = [] - -rimraf("/tmp/chmodr", function (er) { - if (er) throw er - var cnt = 5 - for (var i = 0; i < 5; i ++) { - mkdirp(getDir(), then) - } - function then (er) { - if (er) throw er - if (-- cnt === 0) { - runTest() - } - } -}) - -function getDir () { - var dir = "/tmp/chmodr" - - dir += "/" + Math.floor(Math.random() * Math.pow(16,4)).toString(16) - dirs.push(dir) - dir += "/" + Math.floor(Math.random() * Math.pow(16,4)).toString(16) - dirs.push(dir) - dir += "/" + Math.floor(Math.random() * Math.pow(16,4)).toString(16) - dirs.push(dir) - return dir -} - -function runTest () { - test("should complete successfully", function (t) { - console.error("calling chmodr 0700") - chmodr("/tmp/chmodr", 0700, function (er) { - t.ifError(er) - t.end() - }) - }) - - dirs.forEach(function (dir) { - test("verify "+dir, function (t) { - fs.stat(dir, function (er, st) { - if (er) { - t.ifError(er) - return t.end() - } - t.equal(st.mode & 0777, 0700, "mode should be 0700") - t.end() - }) - }) - }) - - test("cleanup", function (t) { - rimraf("/tmp/chmodr/", function (er) { - t.ifError(er) - t.end() - }) - }) -} - diff --git a/deps/npm/node_modules/chmodr/test/sync.js b/deps/npm/node_modules/chmodr/test/sync.js deleted file mode 100644 index 71f90cd1ee9..00000000000 --- a/deps/npm/node_modules/chmodr/test/sync.js +++ /dev/null @@ -1,58 +0,0 @@ -var chmodr = require("../") -, test = require("tap").test -, mkdirp = require("mkdirp") -, rimraf = require("rimraf") -, fs = require("fs") -, dirs = [] - -rimraf("/tmp/chmodr", function (er) { - if (er) throw er - var cnt = 5 - for (var i = 0; i < 5; i ++) { - mkdirp(getDir(), then) - } - function then (er) { - if (er) throw er - if (-- cnt === 0) { - runTest() - } - } -}) - -function getDir () { - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var dir = "/tmp/chmodr/" + [x,y,z].join("/") - dirs.push(dir) - return dir -} - -function runTest () { - test("should complete successfully", function (t) { - console.error("calling chmodr 0700") - chmodr.sync("/tmp/chmodr", 0700) - t.end() - }) - - dirs.forEach(function (dir) { - test("verify "+dir, function (t) { - fs.stat(dir, function (er, st) { - if (er) { - t.ifError(er) - return t.end() - } - t.equal(st.mode & 0777, 0700, "uid should be 0700") - t.end() - }) - }) - }) - - test("cleanup", function (t) { - rimraf("/tmp/chmodr", function (er) { - t.ifError(er) - t.end() - }) - }) -} - diff --git a/deps/npm/node_modules/chownr/LICENCE b/deps/npm/node_modules/chownr/LICENCE deleted file mode 100644 index 74489e2e265..00000000000 --- a/deps/npm/node_modules/chownr/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/chownr/chownr.js b/deps/npm/node_modules/chownr/chownr.js index 598b8f84419..ecd7b452df5 100644 --- a/deps/npm/node_modules/chownr/chownr.js +++ b/deps/npm/node_modules/chownr/chownr.js @@ -14,7 +14,15 @@ function chownr (p, uid, gid, cb) { var len = children.length , errState = null children.forEach(function (child) { - chownr(path.resolve(p, child), uid, gid, then) + var pathChild = path.resolve(p, child); + fs.lstat(pathChild, function(er, stats) { + if (er) + return cb(er) + if (!stats.isSymbolicLink()) + chownr(pathChild, uid, gid, then) + else + then() + }) }) function then (er) { if (errState) return @@ -35,7 +43,10 @@ function chownrSync (p, uid, gid) { if (!children.length) return fs.chownSync(p, uid, gid) children.forEach(function (child) { - chownrSync(path.resolve(p, child), uid, gid) + var pathChild = path.resolve(p, child) + var stats = fs.lstatSync(pathChild) + if (!stats.isSymbolicLink()) + chownrSync(pathChild, uid, gid) }) return fs.chownSync(p, uid, gid) } diff --git a/deps/npm/node_modules/chownr/package.json b/deps/npm/node_modules/chownr/package.json index a551c869ec1..fdd1dd23083 100644 --- a/deps/npm/node_modules/chownr/package.json +++ b/deps/npm/node_modules/chownr/package.json @@ -6,38 +6,41 @@ }, "name": "chownr", "description": "like `chown -R`", - "version": "0.0.2", + "version": "1.0.1", "repository": { "type": "git", "url": "git://github.com/isaacs/chownr.git" }, "main": "chownr.js", + "files": [ + "chownr.js" + ], "devDependencies": { - "tap": "0.2", "mkdirp": "0.3", - "rimraf": "" + "rimraf": "", + "tap": "^1.2.0" }, "scripts": { "test": "tap test/*.js" }, "license": "ISC", - "gitHead": "3cafeb70b2c343e893f710750406b3909ec537cb", + "gitHead": "c6c43844e80d7c7045e737a72b9fbb1ba0579a26", "bugs": { "url": "https://github.com/isaacs/chownr/issues" }, "homepage": "https://github.com/isaacs/chownr#readme", - "_id": "chownr@0.0.2", - "_shasum": "2f9aebf746f90808ce00607b72ba73b41604c485", - "_from": "chownr@0.0.2", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", + "_id": "chownr@1.0.1", + "_shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "_from": "chownr@1.0.1", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", "_npmUser": { "name": "isaacs", "email": "isaacs@npmjs.com" }, "dist": { - "shasum": "2f9aebf746f90808ce00607b72ba73b41604c485", - "tarball": "http://registry.npmjs.org/chownr/-/chownr-0.0.2.tgz" + "shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "tarball": "http://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz" }, "maintainers": [ { @@ -46,5 +49,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/chownr/-/chownr-0.0.2.tgz" + "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/chownr/test/basic.js b/deps/npm/node_modules/chownr/test/basic.js deleted file mode 100644 index 9e4f6bde038..00000000000 --- a/deps/npm/node_modules/chownr/test/basic.js +++ /dev/null @@ -1,84 +0,0 @@ -if (!process.getuid || !process.getgid) { - throw new Error("Tests require getuid/getgid support") -} - -var curUid = +process.getuid() -, curGid = +process.getgid() -, chownr = require("../") -, test = require("tap").test -, mkdirp = require("mkdirp") -, rimraf = require("rimraf") -, fs = require("fs") - -// sniff the 'id' command for other groups that i can legally assign to -var exec = require("child_process").exec -, groups -, dirs = [] - -exec("id", function (code, output) { - if (code) throw new Error("failed to run 'id' command") - groups = output.trim().split("groups=")[1].split(",").map(function (s) { - return parseInt(s, 10) - }).filter(function (g) { - return g !== curGid - }) - - console.error([curUid, groups[0]], "uid, gid") - - rimraf("/tmp/chownr", function (er) { - if (er) throw er - var cnt = 5 - for (var i = 0; i < 5; i ++) { - mkdirp(getDir(), then) - } - function then (er) { - if (er) throw er - if (-- cnt === 0) { - runTest() - } - } - }) -}) - -function getDir () { - var dir = "/tmp/chownr" - - dir += "/" + Math.floor(Math.random() * Math.pow(16,4)).toString(16) - dirs.push(dir) - dir += "/" + Math.floor(Math.random() * Math.pow(16,4)).toString(16) - dirs.push(dir) - dir += "/" + Math.floor(Math.random() * Math.pow(16,4)).toString(16) - dirs.push(dir) - return dir -} - -function runTest () { - test("should complete successfully", function (t) { - console.error("calling chownr", curUid, groups[0], typeof curUid, typeof groups[0]) - chownr("/tmp/chownr", curUid, groups[0], function (er) { - t.ifError(er) - t.end() - }) - }) - - dirs.forEach(function (dir) { - test("verify "+dir, function (t) { - fs.stat(dir, function (er, st) { - if (er) { - t.ifError(er) - return t.end() - } - t.equal(st.uid, curUid, "uid should be " + curUid) - t.equal(st.gid, groups[0], "gid should be "+groups[0]) - t.end() - }) - }) - }) - - test("cleanup", function (t) { - rimraf("/tmp/chownr/", function (er) { - t.ifError(er) - t.end() - }) - }) -} diff --git a/deps/npm/node_modules/chownr/test/sync.js b/deps/npm/node_modules/chownr/test/sync.js deleted file mode 100644 index 2e26c56aafd..00000000000 --- a/deps/npm/node_modules/chownr/test/sync.js +++ /dev/null @@ -1,79 +0,0 @@ -if (!process.getuid || !process.getgid) { - throw new Error("Tests require getuid/getgid support") -} - -var curUid = +process.getuid() -, curGid = +process.getgid() -, chownr = require("../") -, test = require("tap").test -, mkdirp = require("mkdirp") -, rimraf = require("rimraf") -, fs = require("fs") - -// sniff the 'id' command for other groups that i can legally assign to -var exec = require("child_process").exec -, groups -, dirs = [] - -exec("id", function (code, output) { - if (code) throw new Error("failed to run 'id' command") - groups = output.trim().split("groups=")[1].split(",").map(function (s) { - return parseInt(s, 10) - }).filter(function (g) { - return g !== curGid - }) - - console.error([curUid, groups[0]], "uid, gid") - - rimraf("/tmp/chownr", function (er) { - if (er) throw er - var cnt = 5 - for (var i = 0; i < 5; i ++) { - mkdirp(getDir(), then) - } - function then (er) { - if (er) throw er - if (-- cnt === 0) { - runTest() - } - } - }) -}) - -function getDir () { - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var dir = "/tmp/chownr/" + [x,y,z].join("/") - dirs.push(dir) - return dir -} - -function runTest () { - test("should complete successfully", function (t) { - console.error("calling chownr", curUid, groups[0], typeof curUid, typeof groups[0]) - chownr.sync("/tmp/chownr", curUid, groups[0]) - t.end() - }) - - dirs.forEach(function (dir) { - test("verify "+dir, function (t) { - fs.stat(dir, function (er, st) { - if (er) { - t.ifError(er) - return t.end() - } - t.equal(st.uid, curUid, "uid should be " + curUid) - t.equal(st.gid, groups[0], "gid should be "+groups[0]) - t.end() - }) - }) - }) - - test("cleanup", function (t) { - rimraf("/tmp/chownr/", function (er) { - t.ifError(er) - t.end() - }) - }) -} diff --git a/deps/npm/node_modules/columnify/columnify.js b/deps/npm/node_modules/columnify/columnify.js index db10a011817..42b2089a348 100644 --- a/deps/npm/node_modules/columnify/columnify.js +++ b/deps/npm/node_modules/columnify/columnify.js @@ -1,6 +1,4 @@ -'use strict'; - -var _toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }; +"use strict"; var wcwidth = require('./width'); @@ -35,7 +33,7 @@ var DEFAULTS = Object.freeze({ }); module.exports = function (items) { - var options = arguments[1] === undefined ? {} : arguments[1]; + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var columnConfigs = options.config || {}; delete options.config; // remove config so doesn't appear on every column. @@ -217,6 +215,7 @@ function createRows(items, columns, columnNames, paddingChr) { columnNames.forEach(function (columnName) { numLines = Math.max(numLines, item[columnName].length); }); + // combine matching lines of each rows var _loop = function (i) { row[i] = row[i] || []; @@ -227,7 +226,6 @@ function createRows(items, columns, columnNames, paddingChr) { }); }; - // combine matching lines of each rows for (var i = 0; i < numLines; i++) { _loop(i); } @@ -242,18 +240,13 @@ function createRows(items, columns, columnNames, paddingChr) { */ function mixin() { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - if (Object.assign) { - return Object.assign.apply(Object, _toConsumableArray(args)); - }return ObjectAssign.apply(undefined, _toConsumableArray(args)); + if (Object.assign) return Object.assign.apply(Object, arguments); + return ObjectAssign.apply(undefined, arguments); } function ObjectAssign(target, firstSource) { - 'use strict'; - if (target === undefined || target === null) throw new TypeError('Cannot convert first argument to object'); + "use strict"; + if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object"); var to = Object(target); @@ -295,9 +288,8 @@ function endsWith(target, searchString, position) { } function toArray(items, columnNames) { - if (Array.isArray(items)) { - return items; - }var rows = []; + if (Array.isArray(items)) return items; + var rows = []; for (var key in items) { var item = {}; item[columnNames[0] || 'key'] = key; diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js deleted file mode 100755 index b83f63b907e..00000000000 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var pkg = require('./package.json'); -var stripAnsi = require('./'); -var argv = process.argv.slice(2); -var input = argv[0]; - -function help() { - console.log([ - '', - ' ' + pkg.description, - '', - ' Usage', - ' strip-ansi > ', - ' cat | strip-ansi > ', - '', - ' Example', - ' strip-ansi unicorn.txt > unicorn-stripped.txt' - ].join('\n')); -} - -function init(data) { - process.stdout.write(stripAnsi(data)); -} - -if (argv.indexOf('--help') !== -1) { - help(); - return; -} - -if (argv.indexOf('--version') !== -1) { - console.log(pkg.version); - return; -} - -if (!input && process.stdin.isTTY) { - help(); - return; -} - -if (input) { - init(fs.readFileSync(input, 'utf8')); -} else { - process.stdin.setEncoding('utf8'); - process.stdin.on('data', init); -} diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/license b/deps/npm/node_modules/columnify/node_modules/strip-ansi/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js index 2fcdd1e472f..4906755bc93 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js @@ -1,4 +1,4 @@ 'use strict'; module.exports = function () { - return /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g; + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; }; diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json index da92c5d12e0..7fc07677a04 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -1,6 +1,6 @@ { "name": "ansi-regex", - "version": "1.1.1", + "version": "2.0.0", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": { @@ -10,18 +10,16 @@ "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" + "url": "sindresorhus.com" }, "maintainers": [ { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, { - "name": "Joshua Appelman", - "email": "jappelman@xebia.com", - "url": "http://jbnicolai.com" + "name": "jbnicolai", + "email": "jappelman@xebia.com" } ], "engines": { @@ -64,14 +62,25 @@ "devDependencies": { "mocha": "*" }, - "readme": "# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)\n\n> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)\n\n\n## Install\n\n```sh\n$ npm install --save ansi-regex\n```\n\n\n## Usage\n\n```js\nvar ansiRegex = require('ansi-regex');\n\nansiRegex().test('\\u001b[4mcake\\u001b[0m');\n//=> true\n\nansiRegex().test('cake');\n//=> false\n\n'\\u001b[4mcake\\u001b[0m'.match(ansiRegex());\n//=> ['\\u001b[4m', '\\u001b[0m']\n```\n\n*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", + "gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f", "bugs": { "url": "https://github.com/sindresorhus/ansi-regex/issues" }, - "homepage": "https://github.com/sindresorhus/ansi-regex#readme", - "_id": "ansi-regex@1.1.1", - "_shasum": "41c847194646375e6a1a5d10c3ca054ef9fc980d", - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz", - "_from": "ansi-regex@>=1.0.0 <2.0.0" + "homepage": "https://github.com/sindresorhus/ansi-regex", + "_id": "ansi-regex@2.0.0", + "_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "_from": "ansi-regex@>=2.0.0 <3.0.0", + "_npmVersion": "2.11.2", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md index ae876e7292f..1a4894ec111 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md @@ -5,7 +5,7 @@ ## Install -```sh +``` $ npm install --save ansi-regex ``` @@ -25,8 +25,6 @@ ansiRegex().test('cake'); //=> ['\u001b[4m', '\u001b[0m'] ``` -*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* - ## License diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json index e43cfb5a5c4..2871d037908 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json @@ -1,6 +1,6 @@ { "name": "strip-ansi", - "version": "2.0.1", + "version": "3.0.0", "description": "Strip ANSI escape codes", "license": "MIT", "repository": { @@ -10,20 +10,26 @@ "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bin": { - "strip-ansi": "cli.js" + "url": "sindresorhus.com" }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], "engines": { "node": ">=0.10.0" }, "scripts": { - "test": "mocha" + "test": "node test.js" }, "files": [ - "index.js", - "cli.js" + "index.js" ], "keywords": [ "strip", @@ -36,7 +42,6 @@ "colors", "terminal", "console", - "cli", "string", "tty", "escape", @@ -51,19 +56,30 @@ "text" ], "dependencies": { - "ansi-regex": "^1.0.0" + "ansi-regex": "^2.0.0" }, "devDependencies": { - "mocha": "*" + "ava": "0.0.4" }, - "readme": "# strip-ansi [![Build Status](https://travis-ci.org/sindresorhus/strip-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)\n\n\n## Install\n\n```sh\n$ npm install --save strip-ansi\n```\n\n\n## Usage\n\n```js\nvar stripAnsi = require('strip-ansi');\n\nstripAnsi('\\u001b[4mcake\\u001b[0m');\n//=> 'cake'\n```\n\n\n## CLI\n\n```sh\n$ npm install --global strip-ansi\n```\n\n```sh\n$ strip-ansi --help\n\n Usage\n strip-ansi > \n cat | strip-ansi > \n\n Example\n strip-ansi unicorn.txt > unicorn-stripped.txt\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", + "gitHead": "3f05b9810e1438f946e2eb84ee854cc00b972e9e", "bugs": { "url": "https://github.com/sindresorhus/strip-ansi/issues" }, - "homepage": "https://github.com/sindresorhus/strip-ansi#readme", - "_id": "strip-ansi@2.0.1", - "_shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e", - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz", - "_from": "strip-ansi@>=2.0.1 <3.0.0" + "homepage": "https://github.com/sindresorhus/strip-ansi", + "_id": "strip-ansi@3.0.0", + "_shasum": "7510b665567ca914ccb5d7e072763ac968be3724", + "_from": "strip-ansi@>=3.0.0 <4.0.0", + "_npmVersion": "2.11.2", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "7510b665567ca914ccb5d7e072763ac968be3724", + "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md index 53ec26436ca..76091512df5 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md @@ -5,7 +5,7 @@ ## Install -```sh +``` $ npm install --save strip-ansi ``` @@ -20,22 +20,12 @@ stripAnsi('\u001b[4mcake\u001b[0m'); ``` -## CLI +## Related -```sh -$ npm install --global strip-ansi -``` - -```sh -$ strip-ansi --help - - Usage - strip-ansi > - cat | strip-ansi > - - Example - strip-ansi unicorn.txt > unicorn-stripped.txt -``` +- [strip-ansi-cli](https://github.com/sindresorhus/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/sindresorhus/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right ## License diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json index dc56f3f191f..bc8e878a54c 100644 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json @@ -122,6 +122,5 @@ "tarball": "http://registry.npmjs.org/clone/-/clone-0.1.19.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz" } diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json index eea2e9b0f60..fdd074d0f4a 100644 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json @@ -49,6 +49,5 @@ "tarball": "http://registry.npmjs.org/defaults/-/defaults-1.0.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.2.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.2.tgz" } diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json index 49fc6f0408a..4744d9dc3f7 100644 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json @@ -56,6 +56,5 @@ "shasum": "02d059ff7a8fc741e0f6b5da1e69b2b40daeca6f", "tarball": "http://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz" }, - "_resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz" } diff --git a/deps/npm/node_modules/columnify/package.json b/deps/npm/node_modules/columnify/package.json index eaef8abcb89..1dc803973c6 100644 --- a/deps/npm/node_modules/columnify/package.json +++ b/deps/npm/node_modules/columnify/package.json @@ -1,7 +1,7 @@ { "name": "columnify", - "version": "1.5.1", - "description": "Render data in text columns. supports in-column text-wrap.", + "version": "1.5.2", + "description": "Render data in text columns. Supports in-column text-wrap.", "main": "columnify.js", "scripts": { "pretest": "npm prune", @@ -14,10 +14,10 @@ }, "license": "MIT", "devDependencies": { - "babel": "^5.0.10", - "chalk": "^1.0.0", - "tap-spec": "^3.0.0", - "tape": "^4.0.0" + "babel": "^5.8.21", + "chalk": "^1.1.0", + "tap-spec": "^4.0.2", + "tape": "^4.0.3" }, "repository": { "type": "git", @@ -37,18 +37,18 @@ }, "homepage": "https://github.com/timoxley/columnify", "dependencies": { - "strip-ansi": "^2.0.1", + "strip-ansi": "^3.0.0", "wcwidth": "^1.0.0" }, "directories": { "test": "test" }, - "gitHead": "1e5f5ec9478d7dbd1e3d1d74343b552da7ae01ba", - "_id": "columnify@1.5.1", - "_shasum": "15fdda803a3875f87f9d302b3bc828932d664003", - "_from": "columnify@>=1.5.1 <1.6.0", - "_npmVersion": "2.7.6", - "_nodeVersion": "0.10.36", + "gitHead": "e7417b78091844ff2f3ba62551a4817c7ae217bd", + "_id": "columnify@1.5.2", + "_shasum": "6937930d47c22a9bfa20732a7fd619d47eaba65a", + "_from": "columnify@1.5.2", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.1", "_npmUser": { "name": "timoxley", "email": "secoif@gmail.com" @@ -60,9 +60,8 @@ } ], "dist": { - "shasum": "15fdda803a3875f87f9d302b3bc828932d664003", - "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.5.1.tgz" + "shasum": "6937930d47c22a9bfa20732a7fd619d47eaba65a", + "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.5.2.tgz" }, - "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.1.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.2.tgz" } diff --git a/deps/npm/node_modules/fstream-npm/.travis.yml b/deps/npm/node_modules/fstream-npm/.travis.yml new file mode 100644 index 00000000000..c225dd42746 --- /dev/null +++ b/deps/npm/node_modules/fstream-npm/.travis.yml @@ -0,0 +1,13 @@ +language: node_js +sudo: false +node_js: + - iojs + - "0.12" + - "0.10" + - "0.8" +before_install: + - "npm config set spin false" + - "npm install -g npm/npm#2.x" +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/deps/npm/node_modules/fstream-npm/fstream-npm.js b/deps/npm/node_modules/fstream-npm/fstream-npm.js index ab528952c10..5541c319719 100644 --- a/deps/npm/node_modules/fstream-npm/fstream-npm.js +++ b/deps/npm/node_modules/fstream-npm/fstream-npm.js @@ -109,16 +109,19 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) { if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true // some files are *never* allowed under any circumstances + // (VCS folders, native build cruft, npm cruft, regular cruft) if (entry === '.git' || - entry === '.lock-wscript' || - entry.match(/^\.wafpickle-[0-9]+$/) || entry === 'CVS' || entry === '.svn' || entry === '.hg' || + entry === '.lock-wscript' || + entry.match(/^\.wafpickle-[0-9]+$/) || + entry === 'config.gypi' || + entry === 'npm-debug.log' || + entry === '.npmrc' || entry.match(/^\..*\.swp$/) || entry === '.DS_Store' || - entry.match(/^\._/) || - entry === 'npm-debug.log' + entry.match(/^\._/) ) { return false } diff --git a/deps/npm/node_modules/fstream-npm/package.json b/deps/npm/node_modules/fstream-npm/package.json index e44a6dd92ba..f3ab7b8faf1 100644 --- a/deps/npm/node_modules/fstream-npm/package.json +++ b/deps/npm/node_modules/fstream-npm/package.json @@ -6,13 +6,13 @@ }, "name": "fstream-npm", "description": "fstream class for creating npm packages", - "version": "1.0.4", + "version": "1.0.5", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream-npm.git" }, "scripts": { - "test": "standard" + "test": "standard && tap test/*.js" }, "main": "./fstream-npm.js", "dependencies": { @@ -20,17 +20,21 @@ "inherits": "2" }, "devDependencies": { - "standard": "^4.3.1" + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.1", + "rimraf": "^2.4.2", + "standard": "^4.3.1", + "tap": "^1.3.2" }, "license": "ISC", "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n", "readmeFilename": "README.md", - "gitHead": "d4bec1d24e777b8cef64857d26af828cff1bba68", + "gitHead": "f6ec06b9c45d7330213a5b446fff424b5a74e197", "bugs": { "url": "https://github.com/isaacs/fstream-npm/issues" }, "homepage": "https://github.com/isaacs/fstream-npm#readme", - "_id": "fstream-npm@1.0.4", - "_shasum": "22196318b8fc2ab5ce15fd330fff931165e0305a", - "_from": "fstream-npm@>=1.0.3 <1.1.0" + "_id": "fstream-npm@1.0.5", + "_shasum": "4c1d1cbc6da95c745f8d2c52077a1d2e7b337206", + "_from": "fstream-npm@>=1.0.5 <1.1.0" } diff --git a/deps/npm/node_modules/fstream-npm/test/ignores.js b/deps/npm/node_modules/fstream-npm/test/ignores.js new file mode 100644 index 00000000000..fef5dcc222b --- /dev/null +++ b/deps/npm/node_modules/fstream-npm/test/ignores.js @@ -0,0 +1,95 @@ +var fs = require('graceful-fs') +var join = require('path').join + +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var Packer = require('..') + +var pkg = join(__dirname, 'test-package') + +var gitDir = join(pkg, '.git') + +var elfJS = function () {/* +module.exports = function () { + console.log("i'm a elf") +} +*/}.toString().split('\n').slice(1, -1).join() + +var json = { + 'name': 'test-package', + 'version': '3.1.4', + 'main': 'elf.js' +} + +test('setup', function (t) { + setup() + t.end() +}) + +var included = [ + 'package.json', + 'elf.js' +] + +test('follows npm package ignoring rules', function (t) { + var subject = new Packer({ path: pkg, type: 'Directory', isDirectory: true }) + subject.on('entry', function (entry) { + t.equal(entry.type, 'File', 'only files in this package') + var filename = entry.basename + t.ok( + included.indexOf(filename) > -1, + filename + ' is included' + ) + }) + // need to do this so fstream doesn't explode when files are removed from + // under it + subject.on('end', function () { t.end() }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + fs.writeFileSync( + join(pkg, 'elf.js'), + elfJS + ) + + fs.writeFileSync( + join(pkg, '.npmrc'), + 'packaged=false' + ) + + var build = join(pkg, 'build') + mkdirp.sync(build) + fs.writeFileSync( + join(build, 'config.gypi'), + "i_wont_be_included_by_fstream='with any luck'" + ) + + fs.writeFileSync( + join(build, 'npm-debug.log'), + '0 lol\n' + ) + + mkdirp.sync(gitDir) + fs.writeFileSync( + join(gitDir, 'gitstub'), + "won't fool git, also won't be included by fstream" + ) +} + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/deps/npm/node_modules/init-package-json/default-input.js b/deps/npm/node_modules/init-package-json/default-input.js index ef5161e7926..59f8fec6121 100644 --- a/deps/npm/node_modules/init-package-json/default-input.js +++ b/deps/npm/node_modules/init-package-json/default-input.js @@ -32,6 +32,9 @@ function readDeps (test) { return function (cb) { try { p = JSON.parse(p) } catch (e) { return next() } if (!p.version) return next() + if (p._requiredBy) { + if (!p._requiredBy.some(function (req) { return req === '#USER' })) return next() + } deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version return next() }) diff --git a/deps/npm/node_modules/init-package-json/init-package-json.js b/deps/npm/node_modules/init-package-json/init-package-json.js index 5e50e712747..87c72ccf948 100644 --- a/deps/npm/node_modules/init-package-json/init-package-json.js +++ b/deps/npm/node_modules/init-package-json/init-package-json.js @@ -106,7 +106,9 @@ function init (dir, input, config, cb) { var d = JSON.stringify(pkg, null, 2) + '\n' function write (yes) { fs.writeFile(package, d, 'utf8', function (er) { - if (!er && yes) console.log('Wrote to %s:\n\n%s\n', package, d) + if (!er && yes && !config.get('silent')) { + console.log('Wrote to %s:\n\n%s\n', package, d) + } return cb(er, pkg) }) } diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json index ad9fab899bf..0cc543ece40 100644 --- a/deps/npm/node_modules/init-package-json/package.json +++ b/deps/npm/node_modules/init-package-json/package.json @@ -1,6 +1,6 @@ { "name": "init-package-json", - "version": "1.7.1", + "version": "1.9.1", "main": "init-package-json.js", "scripts": { "test": "tap test/*.js" @@ -23,7 +23,7 @@ "read": "~1.0.1", "read-package-json": "1 || 2", "semver": "2.x || 3.x || 4 || 5", - "validate-npm-package-license": "^2.0.0", + "validate-npm-package-license": "^3.0.1", "validate-npm-package-name": "^2.0.1" }, "devDependencies": { @@ -41,14 +41,42 @@ "prompt", "start" ], - "readme": "# init-package-json\n\nA node module to get your node module started.\n\n[![Build Status](https://secure.travis-ci.org/npm/init-package-json.svg)](http://travis-ci.org/npm/init-package-json)\n\n## Usage\n\n```javascript\nvar init = require('init-package-json')\nvar path = require('path')\n\n// a path to a promzard module. In the event that this file is\n// not found, one will be provided for you.\nvar initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nvar dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object. Exposed as 'config'\n// Optional.\nvar configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object. There will also be free\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\ninit(dir, initFile, configData, function (er, data) {\n // the data's already been written to {dir}/package.json\n // now you can do stuff with it\n})\n```\n\nOr from the command line:\n\n```\n$ npm-init\n```\n\nSee [PromZard](https://github.com/isaacs/promzard) for details about\nwhat can go in the config file.\n", - "readmeFilename": "README.md", - "gitHead": "443031e837c81bb10548212a7b3700b5dde94cfb", + "gitHead": "37c38b4e23189eb5645901fa6851f343fddd4b73", "bugs": { "url": "https://github.com/isaacs/init-package-json/issues" }, "homepage": "https://github.com/isaacs/init-package-json#readme", - "_id": "init-package-json@1.7.1", - "_shasum": "32a8643779c91732d901a6fdc7505de7119fb7ad", - "_from": "init-package-json@>=1.7.1 <1.8.0" + "_id": "init-package-json@1.9.1", + "_shasum": "a28e05b5baeb3363cd473df68d30d3a80523a31c", + "_from": "init-package-json@1.9.1", + "_npmVersion": "2.14.1", + "_nodeVersion": "2.2.2", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "a28e05b5baeb3363cd473df68d30d3a80523a31c", + "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.9.1.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.9.1.tgz" } diff --git a/deps/npm/node_modules/init-package-json/test/silent.js b/deps/npm/node_modules/init-package-json/test/silent.js new file mode 100644 index 00000000000..4937020562a --- /dev/null +++ b/deps/npm/node_modules/init-package-json/test/silent.js @@ -0,0 +1,23 @@ +var tap = require('tap') +var init = require('../') +var rimraf = require('rimraf') + +var log = console.log +var logged = false +console.log = function () { + logged = true +} + +tap.test('silent: true', function (t) { + init(__dirname, __dirname, {yes: 'yes', silent: true}, function (er, data) { + if (er) throw er + + t.false(logged, 'did not print anything') + t.end() + }) +}) + +tap.test('teardown', function (t) { + console.log = log + rimraf(__dirname + '/package.json', t.end.bind(t)) +}) diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi index 93f84892434..33779424217 100644 --- a/deps/npm/node_modules/node-gyp/addon.gypi +++ b/deps/npm/node_modules/node-gyp/addon.gypi @@ -1,11 +1,10 @@ { 'target_defaults': { 'type': 'loadable_module', - 'win_delay_load_hook': 'true', + 'win_delay_load_hook': 'false', 'product_prefix': '', 'include_dirs': [ - '<(node_root_dir)/include/node', '<(node_root_dir)/src', '<(node_root_dir)/deps/uv/include', '<(node_root_dir)/deps/v8/include' @@ -79,7 +78,7 @@ '-luuid.lib', '-lodbc32.lib', '-lDelayImp.lib', - '-l"<(node_root_dir)/$(ConfigurationName)/iojs.lib"' + '-l"<(node_root_dir)/$(ConfigurationName)/node.lib"' ], 'msvs_disabled_warnings': [ # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent' diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js index b35ca01624b..eeeb60266e0 100644 --- a/deps/npm/node_modules/node-gyp/lib/build.js +++ b/deps/npm/node_modules/node-gyp/lib/build.js @@ -173,7 +173,7 @@ function build (gyp, argv, callback) { } /** - * Copies the iojs.lib file for the current target architecture into the + * Copies the node.lib file for the current target architecture into the * current proper dev dir location. */ @@ -181,15 +181,15 @@ function build (gyp, argv, callback) { if (!win || !copyDevLib) return doBuild() var buildDir = path.resolve(nodeDir, buildType) - , archNodeLibPath = path.resolve(nodeDir, arch, 'iojs.lib') - , buildNodeLibPath = path.resolve(buildDir, 'iojs.lib') + , archNodeLibPath = path.resolve(nodeDir, arch, 'node.lib') + , buildNodeLibPath = path.resolve(buildDir, 'node.lib') mkdirp(buildDir, function (err, isNew) { if (err) return callback(err) log.verbose('"' + buildType + '" dir needed to be created?', isNew) var rs = fs.createReadStream(archNodeLibPath) , ws = fs.createWriteStream(buildNodeLibPath) - log.verbose('copying "iojs.lib" for ' + arch, buildNodeLibPath) + log.verbose('copying "node.lib" for ' + arch, buildNodeLibPath) rs.pipe(ws) rs.on('error', callback) ws.on('error', callback) diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index 291fbd0d34d..e8c2029b59a 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -310,11 +310,7 @@ function configure (gyp, argv, callback) { // this logic ported from the old `gyp_addon` python file var gyp_script = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi') - var common_gypi = path.resolve(nodeDir, 'include/node/common.gypi') - //TODO: ideally async - if (!fs.existsSync(common_gypi)) - common_gypi = path.resolve(nodeDir, 'common.gypi') - + var common_gypi = path.resolve(nodeDir, 'common.gypi') var output_dir = 'build' if (win) { // Windows expects an absolute path diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js index 79b6cd38266..6cbcdb8f7ac 100644 --- a/deps/npm/node_modules/node-gyp/lib/install.js +++ b/deps/npm/node_modules/node-gyp/lib/install.js @@ -39,8 +39,8 @@ function install (gyp, argv, callback) { } } - var defaultUrl = getDefaultIojsUrl(process.version) - var distUrl = gyp.opts['dist-url'] || gyp.opts.disturl || defaultUrl + var distUrl = gyp.opts['dist-url'] || gyp.opts.disturl || 'https://nodejs.org/dist' + // Determine which node dev files version we are installing var versionStr = argv[0] || gyp.opts.target || process.version @@ -185,7 +185,7 @@ function install (gyp, argv, callback) { // now download the node tarball var tarPath = gyp.opts['tarball'] - var tarballUrl = tarPath ? tarPath : distUrl + '/v' + version + '/iojs-v' + version + '-headers.tar.gz' + var tarballUrl = tarPath ? tarPath : distUrl + '/v' + version + '/node-v' + version + '.tar.gz' , badDownload = false , extractCount = 0 , gunzip = zlib.createGunzip() @@ -272,7 +272,7 @@ function install (gyp, argv, callback) { var async = 0 if (win) { - // need to download iojs.lib + // need to download node.lib async++ downloadNodeLib(deref) } @@ -351,36 +351,36 @@ function install (gyp, argv, callback) { } function downloadNodeLib (done) { - log.verbose('on Windows; need to download `iojs.lib`...') + log.verbose('on Windows; need to download `node.lib`...') var dir32 = path.resolve(devDir, 'ia32') , dir64 = path.resolve(devDir, 'x64') - , nodeLibPath32 = path.resolve(dir32, 'iojs.lib') - , nodeLibPath64 = path.resolve(dir64, 'iojs.lib') - , nodeLibUrl32 = distUrl + '/v' + version + '/win-x86/iojs.lib' - , nodeLibUrl64 = distUrl + '/v' + version + '/win-x64/iojs.lib' + , nodeLibPath32 = path.resolve(dir32, 'node.lib') + , nodeLibPath64 = path.resolve(dir64, 'node.lib') + , nodeLibUrl32 = distUrl + '/v' + version + '/node.lib' + , nodeLibUrl64 = distUrl + '/v' + version + '/x64/node.lib' - log.verbose('32-bit iojs.lib dir', dir32) - log.verbose('64-bit iojs.lib dir', dir64) - log.verbose('`iojs.lib` 32-bit url', nodeLibUrl32) - log.verbose('`iojs.lib` 64-bit url', nodeLibUrl64) + log.verbose('32-bit node.lib dir', dir32) + log.verbose('64-bit node.lib dir', dir64) + log.verbose('`node.lib` 32-bit url', nodeLibUrl32) + log.verbose('`node.lib` 64-bit url', nodeLibUrl64) var async = 2 mkdir(dir32, function (err) { if (err) return done(err) - log.verbose('streaming 32-bit iojs.lib to:', nodeLibPath32) + log.verbose('streaming 32-bit node.lib to:', nodeLibPath32) var req = download(nodeLibUrl32) if (!req) return req.on('error', done) req.on('response', function (res) { if (res.statusCode !== 200) { - done(new Error(res.statusCode + ' status code downloading 32-bit iojs.lib')) + done(new Error(res.statusCode + ' status code downloading 32-bit node.lib')) return } getContentSha(res, function (_, checksum) { - contentShasums['win-x86/iojs.lib'] = checksum - log.verbose('content checksum', 'win-x86/iojs.lib', checksum) + contentShasums['node.lib'] = checksum + log.verbose('content checksum', 'node.lib', checksum) }) var ws = fs.createWriteStream(nodeLibPath32) @@ -393,20 +393,20 @@ function install (gyp, argv, callback) { }) mkdir(dir64, function (err) { if (err) return done(err) - log.verbose('streaming 64-bit iojs.lib to:', nodeLibPath64) + log.verbose('streaming 64-bit node.lib to:', nodeLibPath64) var req = download(nodeLibUrl64) if (!req) return req.on('error', done) req.on('response', function (res) { if (res.statusCode !== 200) { - done(new Error(res.statusCode + ' status code downloading 64-bit iojs.lib')) + done(new Error(res.statusCode + ' status code downloading 64-bit node.lib')) return } getContentSha(res, function (_, checksum) { - contentShasums['win-x64/iojs.lib'] = checksum - log.verbose('content checksum', 'win-x64/iojs.lib', checksum) + contentShasums['x64/node.lib'] = checksum + log.verbose('content checksum', 'x64/node.lib', checksum) }) var ws = fs.createWriteStream(nodeLibPath64) @@ -455,30 +455,3 @@ function install (gyp, argv, callback) { } } - - -// pick out 'nightly', 'next-nightly' or 'rc' from the version string if it's there -// adjust URL accordingly -function getDefaultIojsUrl(version) { - var versionMatch = version.match(/^v\d+\.\d+\.\d+-(?:(?:(nightly|next-nightly)\.?\d{8}[0-9a-f]{10})|(?:(rc)\.\d+))$/) - var distType = versionMatch ? versionMatch[1] || versionMatch[2] : 'release' - var defaultUrl = `https://iojs.org/download/${distType}` - return defaultUrl -} - - -if (require.main === module) { - var assert = require('assert') - console.log('test v2.3.4 -> https://iojs.org/download/release') - assert.equal(getDefaultIojsUrl('v2.3.4'), 'https://iojs.org/download/release') - console.log('test v2.3.4-nightly12345678aaaaaaaaaa -> https://iojs.org/download/nightly') - assert.equal(getDefaultIojsUrl('v2.3.4-nightly12345678aaaaaaaaaa'), 'https://iojs.org/download/nightly') - console.log('test v2.3.4-nightly.12345678aaaaaaaaaa -> https://iojs.org/download/nightly') - assert.equal(getDefaultIojsUrl('v2.3.4-nightly.12345678aaaaaaaaaa'), 'https://iojs.org/download/nightly') - console.log('test v2.3.4-next-nightly12345678aaaaaaaaaa -> https://iojs.org/download/release/next-nightly') - assert.equal(getDefaultIojsUrl('v2.3.4-next-nightly12345678aaaaaaaaaa'), 'https://iojs.org/download/next-nightly') - console.log('test v2.3.4-next-nightly.12345678aaaaaaaaaa -> https://iojs.org/download/release/next-nightly') - assert.equal(getDefaultIojsUrl('v2.3.4-next-nightly.12345678aaaaaaaaaa'), 'https://iojs.org/download/next-nightly') - console.log('test v2.3.4-rc.100 -> https://iojs.org/download/rc') - assert.equal(getDefaultIojsUrl('v2.3.4-rc.100'), 'https://iojs.org/download/rc') -} diff --git a/deps/npm/node_modules/normalize-package-data/package.json b/deps/npm/node_modules/normalize-package-data/package.json index 0ea7c541808..23878ef1ef6 100644 --- a/deps/npm/node_modules/normalize-package-data/package.json +++ b/deps/npm/node_modules/normalize-package-data/package.json @@ -1,6 +1,6 @@ { "name": "normalize-package-data", - "version": "2.3.1", + "version": "2.3.2", "author": { "name": "Meryn Stol", "email": "merynstol@gmail.com" @@ -18,7 +18,7 @@ "dependencies": { "hosted-git-info": "^2.0.2", "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^2.0.0" + "validate-npm-package-license": "^3.0.1" }, "devDependencies": { "async": "~0.9.0", @@ -41,12 +41,12 @@ ], "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readFileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readFileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readFileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved.\n* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL.\n* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `repository.url` is not a valid url, but in the style of \"[owner-name]/[repo-name]\", `repository.url` will be set to https://github.com/[owner-name]/[repo-name]\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n### Rules for license field\n\nThe `license` field should be a valid *SDPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/packages/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol \n", "readmeFilename": "README.md", - "gitHead": "43b844bd37aac28d204be7567b731d9c55025871", + "gitHead": "c0518cf9a352af940fee94b1d3144da576c3e44b", "bugs": { "url": "https://github.com/npm/normalize-package-data/issues" }, "homepage": "https://github.com/npm/normalize-package-data#readme", - "_id": "normalize-package-data@2.3.1", - "_shasum": "e2d24a5ab38a90b22cd697753407d8564f49a890", - "_from": "normalize-package-data@>=2.3.1 <2.4.0" + "_id": "normalize-package-data@2.3.2", + "_shasum": "ff6d437374188a21921c85fbe5ad11e34ae6ead5", + "_from": "normalize-package-data@>=2.3.2 <2.4.0" } diff --git a/deps/npm/node_modules/npm-registry-client/lib/access.js b/deps/npm/node_modules/npm-registry-client/lib/access.js index b671f6b5f21..badb770ea49 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/access.js +++ b/deps/npm/node_modules/npm-registry-client/lib/access.js @@ -1,30 +1,153 @@ module.exports = access var assert = require('assert') +var url = require('url') +var npa = require('npm-package-arg') +var subcommands = {} -function access (uri, params, cb) { - assert(typeof uri === 'string', 'must pass registry URI to access') - assert(params && typeof params === 'object', 'must pass params to access') - assert(typeof cb === 'function', 'muss pass callback to access') - - assert(typeof params.level === 'string', 'must pass level to access') - assert( - ['public', 'restricted'].indexOf(params.level) !== -1, - "access level must be either 'public' or 'restricted'" - ) - assert( - params.auth && typeof params.auth === 'object', - 'must pass auth to access' - ) - - var body = { - access: params.level - } - - var options = { - method: 'POST', - body: JSON.stringify(body), - auth: params.auth - } - this.request(uri, options, cb) +function access (sub, uri, params, cb) { + accessAssertions(sub, uri, params, cb) + return subcommands[sub].call(this, uri, params, cb) +} + +subcommands.public = function (uri, params, cb) { + return setAccess.call(this, 'public', uri, params, cb) +} +subcommands.restricted = function (uri, params, cb) { + return setAccess.call(this, 'restricted', uri, params, cb) +} + +function setAccess (access, uri, params, cb) { + return this.request(apiUri(uri, 'package', params.package, 'access'), { + method: 'POST', + auth: params.auth, + body: JSON.stringify({ access: access }) + }, cb) +} + +subcommands.grant = function (uri, params, cb) { + var reqUri = apiUri(uri, 'team', params.scope, params.team, 'package') + return this.request(reqUri, { + method: 'PUT', + auth: params.auth, + body: JSON.stringify({ + permissions: params.permissions, + package: params.package + }) + }, cb) +} + +subcommands.revoke = function (uri, params, cb) { + var reqUri = apiUri(uri, 'team', params.scope, params.team, 'package') + return this.request(reqUri, { + method: 'DELETE', + auth: params.auth, + body: JSON.stringify({ + package: params.package + }) + }, cb) +} + +subcommands['ls-packages'] = function (uri, params, cb, type) { + type = type || (params.team ? 'team' : 'org') + var client = this + var uriParams = '?format=cli' + var reqUri = apiUri(uri, type, params.scope, params.team, 'package') + return client.request(reqUri + uriParams, { + method: 'GET', + auth: params.auth + }, function (err, perms) { + if (err && err.statusCode === 404 && type === 'org') { + subcommands['ls-packages'].call(client, uri, params, cb, 'user') + } else { + cb(err, perms && translatePermissions(perms)) + } + }) +} + +subcommands['ls-collaborators'] = function (uri, params, cb) { + var uriParams = '?format=cli' + if (params.user) { + uriParams += ('&user=' + encodeURIComponent(params.user)) + } + var reqUri = apiUri(uri, 'package', params.package, 'collaborators') + return this.request(reqUri + uriParams, { + method: 'GET', + auth: params.auth + }, function (err, perms) { + cb(err, perms && translatePermissions(perms)) + }) +} + +subcommands.edit = function () { + throw new Error('edit subcommand is not implemented yet') +} + +function apiUri (registryUri) { + var path = Array.prototype.slice.call(arguments, 1) + .filter(function (x) { return x }) + .map(encodeURIComponent) + .join('/') + return url.resolve(registryUri, '-/' + path) +} + +function accessAssertions (subcommand, uri, params, cb) { + assert(subcommands.hasOwnProperty(subcommand), + 'access subcommand must be one of ' + + Object.keys(subcommands).join(', ')) + typeChecks({ + 'uri': [uri, 'string'], + 'params': [params, 'object'], + 'auth': [params.auth, 'object'], + 'callback': [cb, 'function'] + }) + if (contains([ + 'public', 'restricted', 'grant', 'revoke', 'ls-collaborators' + ], subcommand)) { + typeChecks({ 'package': [params.package, 'string']}) + assert(!!npa(params.package).scope, + 'access commands are only accessible for scoped packages') + } + if (contains(['grant', 'revoke', 'ls-packages'], subcommand)) { + typeChecks({ 'scope': [params.scope, 'string']}) + } + if (contains(['grant', 'revoke'], subcommand)) { + typeChecks({ 'team': [params.team, 'string']}) + } + if (subcommand === 'grant') { + typeChecks({ 'permissions': [params.permissions, 'string']}) + assert(params.permissions === 'read-only' || + params.permissions === 'read-write', + 'permissions must be either read-only or read-write') + } +} + +function typeChecks (specs) { + Object.keys(specs).forEach(function (key) { + var checks = specs[key] + assert(typeof checks[0] === checks[1], + key + ' is required and must be of type ' + checks[1]) + }) +} + +function contains (arr, item) { + return arr.indexOf(item) !== -1 +} + +function translatePermissions (perms) { + var newPerms = {} + for (var key in perms) { + if (perms.hasOwnProperty(key)) { + if (perms[key] === 'read') { + newPerms[key] = 'read-only' + } else if (perms[key] === 'write') { + newPerms[key] = 'read-write' + } else { + // This shouldn't happen, but let's not break things + // if the API starts returning different things. + newPerms[key] = perms[key] + } + } + } + return newPerms } diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js index 168a9d160af..e4dc3995725 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/request.js +++ b/deps/npm/node_modules/npm-registry-client/lib/request.js @@ -9,6 +9,7 @@ var assert = require('assert') var url = require('url') var zlib = require('zlib') var Stream = require('stream').Stream +var STATUS_CODES = require('http').STATUS_CODES var request = require('request') var once = require('once') @@ -208,8 +209,9 @@ function requestDone (method, where, cb) { // expect data with any error codes if (!data && response.statusCode >= 400) { + var code = response.statusCode return cb( - response.statusCode + ' ' + require('http').STATUS_CODES[response.statusCode], + makeError(code + ' ' + STATUS_CODES[code], null, code), null, data, response @@ -236,22 +238,33 @@ function requestDone (method, where, cb) { } if (!parsed.error) { - er = new Error( + er = makeError( 'Registry returned ' + response.statusCode + ' for ' + method + - ' on ' + where + ' on ' + where, + name, + response.statusCode ) } else if (name && parsed.error === 'not_found') { - er = new Error('404 Not Found: ' + name) + er = makeError('404 Not Found: ' + name, name, response.statusCode) } else { - er = new Error( - parsed.error + ' ' + (parsed.reason || '') + ': ' + (name || w) + er = makeError( + parsed.error + ' ' + (parsed.reason || '') + ': ' + (name || w), + name, + response.statusCode ) } - if (name) er.pkgid = name - er.statusCode = response.statusCode - er.code = 'E' + er.statusCode } return cb(er, parsed, data, response) }.bind(this) } + +function makeError (message, name, code) { + var er = new Error(message) + if (name) er.pkgid = name + if (code) { + er.statusCode = code + er.code = 'E' + code + } + return er +} diff --git a/deps/npm/node_modules/npm-registry-client/lib/team.js b/deps/npm/node_modules/npm-registry-client/lib/team.js new file mode 100644 index 00000000000..3e3794e0477 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/lib/team.js @@ -0,0 +1,105 @@ +module.exports = team + +var assert = require('assert') +var url = require('url') + +var subcommands = {} + +function team (sub, uri, params, cb) { + teamAssertions(sub, uri, params, cb) + return subcommands[sub].call(this, uri, params, cb) +} + +subcommands.create = function (uri, params, cb) { + return this.request(apiUri(uri, 'org', params.scope, 'team'), { + method: 'PUT', + auth: params.auth, + body: JSON.stringify({ + name: params.team + }) + }, cb) +} + +subcommands.destroy = function (uri, params, cb) { + return this.request(apiUri(uri, 'team', params.scope, params.team), { + method: 'DELETE', + auth: params.auth + }, cb) +} + +subcommands.add = function (uri, params, cb) { + return this.request(apiUri(uri, 'team', params.scope, params.team, 'user'), { + method: 'PUT', + auth: params.auth, + body: JSON.stringify({ + user: params.user + }) + }, cb) +} + +subcommands.rm = function (uri, params, cb) { + return this.request(apiUri(uri, 'team', params.scope, params.team, 'user'), { + method: 'DELETE', + auth: params.auth, + body: JSON.stringify({ + user: params.user + }) + }, cb) +} + +subcommands.ls = function (uri, params, cb) { + var uriParams = '?format=cli' + if (params.team) { + var reqUri = apiUri( + uri, 'team', params.scope, params.team, 'user') + uriParams + return this.request(reqUri, { + method: 'GET', + auth: params.auth + }, cb) + } else { + return this.request(apiUri(uri, 'org', params.scope, 'team') + uriParams, { + method: 'GET', + auth: params.auth + }, cb) + } +} + +// TODO - we punted this to v2 +// subcommands.edit = function (uri, params, cb) { +// return this.request(apiUri(uri, 'team', params.scope, params.team, 'user'), { +// method: 'POST', +// auth: params.auth, +// body: JSON.stringify({ +// users: params.users +// }) +// }, cb) +// } + +function apiUri (registryUri) { + var path = Array.prototype.slice.call(arguments, 1) + .map(encodeURIComponent) + .join('/') + return url.resolve(registryUri, '-/' + path) +} + +function teamAssertions (subcommand, uri, params, cb) { + assert(subcommand, 'subcommand is required') + assert(subcommands.hasOwnProperty(subcommand), + 'team subcommand must be one of ' + Object.keys(subcommands)) + assert(typeof uri === 'string', 'registry URI is required') + assert(typeof params === 'object', 'params are required') + assert(typeof params.auth === 'object', 'auth is required') + assert(typeof params.scope === 'string', 'scope is required') + assert(!cb || typeof cb === 'function', 'callback must be a function') + if (subcommand !== 'ls') { + assert(typeof params.team === 'string', 'team name is required') + } + if (subcommand === 'rm' || subcommand === 'add') { + assert(typeof params.user === 'string', 'user is required') + } + if (subcommand === 'edit') { + assert(typeof params.users === 'object' && + params.users.length != null, + 'users is required') + } +} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/chownr/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/chownr/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/README.md new file mode 100644 index 00000000000..70e9a54a32b --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/README.md @@ -0,0 +1,3 @@ +Like `chown -R`. + +Takes the same arguments as `fs.chown()` diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/chownr/chownr.js b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/chownr.js new file mode 100644 index 00000000000..ecd7b452df5 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/chownr.js @@ -0,0 +1,52 @@ +module.exports = chownr +chownr.sync = chownrSync + +var fs = require("fs") +, path = require("path") + +function chownr (p, uid, gid, cb) { + fs.readdir(p, function (er, children) { + // any error other than ENOTDIR means it's not readable, or + // doesn't exist. give up. + if (er && er.code !== "ENOTDIR") return cb(er) + if (er || !children.length) return fs.chown(p, uid, gid, cb) + + var len = children.length + , errState = null + children.forEach(function (child) { + var pathChild = path.resolve(p, child); + fs.lstat(pathChild, function(er, stats) { + if (er) + return cb(er) + if (!stats.isSymbolicLink()) + chownr(pathChild, uid, gid, then) + else + then() + }) + }) + function then (er) { + if (errState) return + if (er) return cb(errState = er) + if (-- len === 0) return fs.chown(p, uid, gid, cb) + } + }) +} + +function chownrSync (p, uid, gid) { + var children + try { + children = fs.readdirSync(p) + } catch (er) { + if (er && er.code === "ENOTDIR") return fs.chownSync(p, uid, gid) + throw er + } + if (!children.length) return fs.chownSync(p, uid, gid) + + children.forEach(function (child) { + var pathChild = path.resolve(p, child) + var stats = fs.lstatSync(pathChild) + if (!stats.isSymbolicLink()) + chownrSync(pathChild, uid, gid) + }) + return fs.chownSync(p, uid, gid) +} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/chownr/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/package.json new file mode 100644 index 00000000000..d19604dac4a --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/node_modules/chownr/package.json @@ -0,0 +1,54 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "chownr", + "description": "like `chown -R`", + "version": "1.0.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "main": "chownr.js", + "files": [ + "chownr.js" + ], + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "", + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "license": "ISC", + "gitHead": "c6c43844e80d7c7045e737a72b9fbb1ba0579a26", + "bugs": { + "url": "https://github.com/isaacs/chownr/issues" + }, + "homepage": "https://github.com/isaacs/chownr#readme", + "_id": "chownr@1.0.1", + "_shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "_from": "chownr@>=1.0.1 <2.0.0", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "tarball": "http://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json index b67333380c2..466dfdfe013 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -29,9 +29,25 @@ }, "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", "readmeFilename": "README.md", - "homepage": "https://github.com/isaacs/core-util-is#readme", + "homepage": "https://github.com/isaacs/core-util-is", "_id": "core-util-is@1.0.1", + "dist": { + "shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", + "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "_from": "core-util-is@>=1.0.0 <1.1.0", + "_npmVersion": "1.3.23", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, "_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", - "_from": "core-util-is@>=1.0.0 <1.1.0" + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json index fb1eb3786d8..19228ab6fdc 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/package.json @@ -26,13 +26,28 @@ "url": "http://juliangruber.com" }, "license": "MIT", - "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", + "_id": "isarray@0.0.1", + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "_from": "isarray@0.0.1", + "_npmVersion": "1.2.18", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "directories": {}, + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "bugs": { "url": "https://github.com/juliangruber/isarray/issues" }, - "_id": "isarray@0.0.1", - "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "_from": "isarray@0.0.1" + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json index ee707023591..0364d54ba46 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -22,13 +22,33 @@ "browserify" ], "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, "_id": "string_decoder@0.10.31", "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@>=0.10.0 <0.11.0", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "_from": "string_decoder@>=0.10.0 <0.11.0" + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index ffcccd85dd3..2a0a1611b68 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -6,7 +6,7 @@ }, "name": "npm-registry-client", "description": "Client for the npm registry", - "version": "6.5.1", + "version": "7.0.1", "repository": { "url": "git://github.com/isaacs/npm-registry-client.git" }, @@ -15,7 +15,7 @@ "test": "standard && tap test/*.js" }, "dependencies": { - "chownr": "0", + "chownr": "^1.0.1", "concat-stream": "^1.4.6", "graceful-fs": "^3.0.0", "mkdirp": "^0.5.0", @@ -39,14 +39,42 @@ "npmlog": "" }, "license": "ISC", - "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\nvar uri = \"https://registry.npmjs.org/npm\"\nvar params = {timeout: 1000}\n\nclient.get(uri, params, function (error, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (including the registry\npath – but be sure to terminate the path with `/`). `http` and `https` URLs are\nthe only ones supported.\n\n## Using the client\n\nEvery call to the client follows the same pattern:\n\n* `uri` {String} The *fully-qualified* URI of the registry API method being\n invoked.\n* `params` {Object} Per-request parameters.\n* `callback` {Function} Callback to be invoked when the call is complete.\n\n### Credentials\n\nMany requests to the registry can by authenticated, and require credentials\nfor authorization. These credentials always look the same:\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n**or**\n\n* `token` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n## API\n\n### client.access(uri, params, cb)\n\n* `uri` {String} Registry URL for the package's access API endpoint.\n Looks like `/-/package//access`.\n* `params` {Object} Object containing per-request properties.\n * `access` {String} New access level for the package. Can be either\n `public` or `restricted`. Registry will raise an error if trying\n to change the access level of an unscoped package.\n * `auth` {Credentials}\n\nSet the access level for scoped packages. For now, there are only two\naccess levels: \"public\" and \"restricted\".\n\n### client.adduser(uri, params, cb)\n\n* `uri` {String} Base registry URL.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nAdd a user account to the registry, or verify the credentials.\n\n### client.deprecate(uri, params, cb)\n\n* `uri` {String} Full registry URI for the deprecated package.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Semver version range.\n * `message` {String} The message to use as a deprecation warning.\n * `auth` {Credentials}\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n### client.distTags.fetch(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `auth` {Credentials}\n* `cb` {Function}\n\nFetch all of the `dist-tags` for the named package.\n\n### client.distTags.add(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `version` {String} Exact version to be mapped to the `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nAdd (or replace) a single dist-tag onto the named package.\n\n### client.distTags.set(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSet all of the `dist-tags` for the named package at once, creating any\n`dist-tags` that do not already exit. Any `dist-tags` not included in the\n`distTags` map will be removed.\n\n### client.distTags.update(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTags` {Object} Object containing a map from tag names to package\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nUpdate the values of multiple `dist-tags`, creating any `dist-tags` that do\nnot already exist. Any pre-existing `dist-tags` not included in the `distTags`\nmap will be left alone.\n\n### client.distTags.rm(uri, params, cb)\n\n* `uri` {String} Base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `package` {String} Name of the package.\n * `distTag` {String} Name of the new `dist-tag`.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a single `dist-tag` from the named package.\n\n### client.get(uri, params, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `params` {Object} Object containing per-request properties.\n * `timeout` {Number} Duration before the request times out. Optional\n (default: never).\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `staleOk` {Boolean} If there's cached data available, then return that to\n the callback quickly, and update the cache the background. Optional\n (default: false).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag or the \"Last Modified\" timestamp.\n\n### client.publish(uri, params, cb)\n\n* `uri` {String} The registry URI for the package to publish.\n* `params` {Object} Object containing per-request properties.\n * `metadata` {Object} Package metadata.\n * `access` {String} Access for the package. Can be `public` or `restricted` (no default).\n * `body` {Stream} Stream of the package body / tarball.\n * `auth` {Credentials}\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder.\n\n### client.star(uri, params, cb)\n\n* `uri` {String} The complete registry URI for the package to star.\n* `params` {Object} Object containing per-request properties.\n * `starred` {Boolean} True to star the package, false to unstar it. Optional\n (default: false).\n * `auth` {Credentials}\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or unstar a\npackage, though other writes do require that the user be the package owner.\n\n### client.stars(uri, params, cb)\n\n* `uri` {String} The base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `username` {String} Name of user to fetch starred packages for. Optional\n (default: user in `auth`).\n * `auth` {Credentials} Optional (required if `username` is omitted).\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n### client.tag(uri, params, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Version to tag.\n * `tag` {String} Tag name to apply.\n * `auth` {Credentials}\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n### client.unpublish(uri, params, cb)\n\n* `uri` {String} The complete registry URI of the package to unpublish.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} version to unpublish. Optional – omit to unpublish all\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n### client.whoami(uri, params, cb)\n\n* `uri` {String} The base registry for the URI.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSimple call to see who the registry thinks you are. Especially useful with\ntoken-based auth.\n\n\n## PLUMBING\n\nThe below are primarily intended for use by the rest of the API, or by the npm\ncaching logic directly.\n\n### client.request(uri, params, cb)\n\n* `uri` {String} URI pointing to the resource to request.\n* `params` {Object} Object containing per-request properties.\n * `method` {String} HTTP method. Optional (default: \"GET\").\n * `body` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON. Optional – body\n only used for write operations.\n * `etag` {String} The cached ETag. Optional.\n * `lastModified` {String} The cached Last-Modified timestamp. Optional.\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a generic request to the registry. All the other methods are wrappers\naround `client.request`.\n\n### client.fetch(uri, params, cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `params` {Object} Object containing per-request properties.\n * `headers` {Stream} HTTP headers to be included with the request. Optional.\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetch a package from a URL, with auth set appropriately if included. Used to\ncache remote tarballs as well as request package tarballs from the registry.\n\n# Configuration\n\nThe client uses its own configuration, which is just passed in as a simple\nnested object. The following are the supported values (with their defaults, if\nany):\n\n* `proxy.http` {URL} The URL to proxy HTTP requests through.\n* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be\n the same as `proxy.http` if unset.\n* `proxy.localAddress` {IP} The local address to use on multi-homed systems.\n* `ssl.ca` {String} Certificate signing authority certificates to trust.\n* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates.\n* `ssl.key` {String} Private key (PEM encoded) for client certificate.\n* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates.\n Default = `true`\n* `retry.count` {Number} Number of times to retry on GET failures. Default = 2.\n* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10.\n* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default = 10000 (10 seconds)\n* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default = 60000 (60 seconds)\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `defaultTag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `couchToken` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login).\n* `sessionToken` {string} A random identifier for this set of client requests.\n Default = 8 random hexadecimal bytes.\n", - "readmeFilename": "README.md", - "gitHead": "dbb351ae906f40be03f21bbe28bd392a380dc7bb", + "gitHead": "250563a6a64f73e5e683e75aa21d36739f63159a", "bugs": { "url": "https://github.com/isaacs/npm-registry-client/issues" }, "homepage": "https://github.com/isaacs/npm-registry-client#readme", - "_id": "npm-registry-client@6.5.1", - "_shasum": "328d2088252b69fa541c3dd9f7690288661592a1", - "_from": "npm-registry-client@>=6.5.1 <6.6.0" + "_id": "npm-registry-client@7.0.1", + "_shasum": "1184253d2085dcaa01a394cfdd66f2dad0d26feb", + "_from": "npm-registry-client@7.0.1", + "_npmVersion": "2.13.5", + "_nodeVersion": "2.2.2", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "1184253d2085dcaa01a394cfdd66f2dad0d26feb", + "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.0.1.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.0.1.tgz" } diff --git a/deps/npm/node_modules/npm-registry-client/test/access.js b/deps/npm/node_modules/npm-registry-client/test/access.js index 4081c329f7f..ba0fb2c8136 100644 --- a/deps/npm/node_modules/npm-registry-client/test/access.js +++ b/deps/npm/node_modules/npm-registry-client/test/access.js @@ -6,91 +6,292 @@ var client = common.freshClient() function nop () {} -var URI = 'http://localhost:1337/-/package/underscore/access' -var TOKEN = 'foo' -var AUTH = { - token: TOKEN -} -var LEVEL = 'public' +var URI = 'http://localhost:1337' var PARAMS = { - level: LEVEL, - auth: AUTH + auth: { token: 'foo' }, + scope: 'myorg', + team: 'myteam', + package: '@foo/bar', + permissions: 'read-write' } -test('access call contract', function (t) { - t.throws(function () { - client.access(undefined, AUTH, nop) - }, 'requires a URI') +var commands = [ + 'public', 'restricted', 'grant', 'revoke', 'ls-packages', 'ls-collaborators' +] - t.throws(function () { - client.access([], PARAMS, nop) - }, 'requires URI to be a string') - - t.throws(function () { - client.access(URI, undefined, nop) - }, 'requires params object') - - t.throws(function () { - client.access(URI, '', nop) - }, 'params must be object') - - t.throws(function () { - client.access(URI, PARAMS, undefined) - }, 'requires callback') - - t.throws(function () { - client.access(URI, PARAMS, 'callback') - }, 'callback must be function') - - t.throws( - function () { - var params = { - auth: AUTH - } - client.access(URI, params, nop) - }, - { name: 'AssertionError', message: 'must pass level to access' }, - 'access must include level' - ) - - t.throws( - function () { - var params = { - level: LEVEL - } - client.access(URI, params, nop) - }, - { name: 'AssertionError', message: 'must pass auth to access' }, - 'access must include auth' - ) - - t.end() +test('access public', function (t) { + server.expect('POST', '/-/package/%40foo%2Fbar/access', function (req, res) { + t.equal(req.method, 'POST') + onJsonReq(req, function (json) { + t.deepEqual(json, { access: 'public' }) + res.statusCode = 200 + res.json({ accessChanged: true }) + }) + }) + var params = Object.create(PARAMS) + params.package = '@foo/bar' + client.access('public', URI, params, function (error, data) { + t.ifError(error, 'no errors') + t.ok(data.accessChanged, 'access level set') + t.end() + }) }) -test('set access level on a package', function (t) { - server.expect('POST', '/-/package/underscore/access', function (req, res) { +test('access restricted', function (t) { + server.expect('POST', '/-/package/%40foo%2Fbar/access', function (req, res) { t.equal(req.method, 'POST') - - var b = '' - req.setEncoding('utf8') - req.on('data', function (d) { - b += d + onJsonReq(req, function (json) { + t.deepEqual(json, { access: 'restricted' }) + res.statusCode = 200 + res.json({ accessChanged: true }) }) + }) + client.access('restricted', URI, PARAMS, function (error, data) { + t.ifError(error, 'no errors') + t.ok(data.accessChanged, 'access level set') + t.end() + }) +}) - req.on('end', function () { - var updated = JSON.parse(b) - - t.deepEqual(updated, { access: 'public' }) - +test('access grant basic', function (t) { + server.expect('PUT', '/-/team/myorg/myteam/package', function (req, res) { + t.equal(req.method, 'PUT') + onJsonReq(req, function (json) { + t.deepEqual(json, { + permissions: PARAMS.permissions, + package: PARAMS.package + }) res.statusCode = 201 res.json({ accessChanged: true }) }) }) - - client.access(URI, PARAMS, function (error, data) { + client.access('grant', URI, PARAMS, function (error, data) { t.ifError(error, 'no errors') t.ok(data.accessChanged, 'access level set') - t.end() }) }) + +test('access revoke basic', function (t) { + server.expect('DELETE', '/-/team/myorg/myteam/package', function (req, res) { + t.equal(req.method, 'DELETE') + onJsonReq(req, function (json) { + t.deepEqual(json, { + package: PARAMS.package + }) + res.statusCode = 200 + res.json({ accessChanged: true }) + }) + }) + client.access('revoke', URI, PARAMS, function (error, data) { + t.ifError(error, 'no errors') + t.ok(data.accessChanged, 'access level set') + t.end() + }) +}) + +test('ls-packages on team', function (t) { + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + var uri = '/-/team/myorg/myteam/package?format=cli' + server.expect('GET', uri, function (req, res) { + t.equal(req.method, 'GET') + res.statusCode = 200 + res.json(serverPackages) + }) + client.access('ls-packages', URI, PARAMS, function (error, data) { + t.ifError(error, 'no errors') + t.same(data, clientPackages) + t.end() + }) +}) + +test('ls-packages on org', function (t) { + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + var uri = '/-/org/myorg/package?format=cli' + server.expect('GET', uri, function (req, res) { + t.equal(req.method, 'GET') + res.statusCode = 200 + res.json(serverPackages) + }) + var params = Object.create(PARAMS) + params.team = null + client.access('ls-packages', URI, params, function (error, data) { + t.ifError(error, 'no errors') + t.same(data, clientPackages) + t.end() + }) +}) + +test('ls-packages on user', function (t) { + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + var firstUri = '/-/org/myorg/package?format=cli' + server.expect('GET', firstUri, function (req, res) { + t.equal(req.method, 'GET') + res.statusCode = 404 + res.json({error: 'not found'}) + }) + var secondUri = '/-/user/myorg/package?format=cli' + server.expect('GET', secondUri, function (req, res) { + t.equal(req.method, 'GET') + res.statusCode = 200 + res.json(serverPackages) + }) + var params = Object.create(PARAMS) + params.team = null + client.access('ls-packages', URI, params, function (error, data) { + t.ifError(error, 'no errors') + t.same(data, clientPackages) + t.end() + }) +}) + +test('ls-collaborators', function (t) { + var serverCollaborators = { + 'myorg:myteam': 'write', + 'myorg:anotherteam': 'read' + } + var clientCollaborators = { + 'myorg:myteam': 'read-write', + 'myorg:anotherteam': 'read-only' + } + var uri = '/-/package/%40foo%2Fbar/collaborators?format=cli' + server.expect('GET', uri, function (req, res) { + t.equal(req.method, 'GET') + res.statusCode = 200 + res.json(serverCollaborators) + }) + client.access('ls-collaborators', URI, PARAMS, function (error, data) { + t.ifError(error, 'no errors') + t.same(data, clientCollaborators) + t.end() + }) +}) + +test('ls-collaborators w/ scope', function (t) { + var serverCollaborators = { + 'myorg:myteam': 'write', + 'myorg:anotherteam': 'read' + } + var clientCollaborators = { + 'myorg:myteam': 'read-write', + 'myorg:anotherteam': 'read-only' + } + var uri = '/-/package/%40foo%2Fbar/collaborators?format=cli&user=zkat' + server.expect('GET', uri, function (req, res) { + t.equal(req.method, 'GET') + res.statusCode = 200 + res.json(serverCollaborators) + }) + var params = Object.create(PARAMS) + params.user = 'zkat' + client.access('ls-collaborators', URI, params, function (error, data) { + t.ifError(error, 'no errors') + t.same(data, clientCollaborators) + t.end() + }) +}) + +test('access command base validation', function (t) { + t.throws(function () { + client.access(undefined, URI, PARAMS, nop) + }, 'command is required') + t.throws(function () { + client.access('whoops', URI, PARAMS, nop) + }, 'command must be a valid subcommand') + commands.forEach(function (cmd) { + t.throws(function () { + client.access(cmd, undefined, PARAMS, nop) + }, 'registry URI is required') + t.throws(function () { + client.access(cmd, URI, undefined, nop) + }, 'params is required') + t.throws(function () { + client.access(cmd, URI, '', nop) + }, 'params must be an object') + t.throws(function () { + client.access(cmd, URI, {scope: 'o', team: 't'}, nop) + }, 'auth is required') + t.throws(function () { + client.access(cmd, URI, {auth: 5, scope: 'o', team: 't'}, nop) + }, 'auth must be an object') + t.throws(function () { + client.access(cmd, URI, PARAMS, {}) + }, 'callback must be a function') + t.throws(function () { + client.access(cmd, URI, PARAMS, undefined) + }, 'callback is required') + if (contains([ + 'public', 'restricted', 'grant', 'revoke', 'ls-collaborators' + ], cmd)) { + t.throws(function () { + var params = Object.create(PARAMS) + params.package = null + client.access(cmd, URI, params, nop) + }, 'package is required') + t.throws(function () { + var params = Object.create(PARAMS) + params.package = 'underscore' + client.access(cmd, URI, params, nop) + }, 'only scopes packages are allowed') + } + if (contains(['grant', 'revoke', 'ls-packages'], cmd)) { + t.throws(function () { + var params = Object.create(PARAMS) + params.scope = null + client.access(cmd, URI, params, nop) + }, 'scope is required') + } + if (contains(['grant', 'revoke'], cmd)) { + t.throws(function () { + var params = Object.create(PARAMS) + params.team = null + client.access(cmd, URI, params, nop) + }, 'team is required') + } + if (cmd === 'grant') { + t.throws(function () { + var params = Object.create(PARAMS) + params.permissions = null + client.access(cmd, URI, params, nop) + }, 'permissions are required') + t.throws(function () { + var params = Object.create(PARAMS) + params.permissions = 'idkwhat' + client.access(cmd, URI, params, nop) + }, 'permissions must be either read-only or read-write') + } + }) + t.end() +}) + +function onJsonReq (req, cb) { + var buffer = '' + req.setEncoding('utf8') + req.on('data', function (data) { buffer += data }) + req.on('end', function () { cb(buffer ? JSON.parse(buffer) : undefined) }) +} + +function contains (arr, item) { + return arr.indexOf(item) !== -1 +} diff --git a/deps/npm/node_modules/npm-registry-client/test/fetch-404.js b/deps/npm/node_modules/npm-registry-client/test/fetch-404.js index e05e36f26cd..805c88a6725 100644 --- a/deps/npm/node_modules/npm-registry-client/test/fetch-404.js +++ b/deps/npm/node_modules/npm-registry-client/test/fetch-404.js @@ -1,9 +1,7 @@ var resolve = require('path').resolve var createReadStream = require('graceful-fs').createReadStream -var readFileSync = require('graceful-fs').readFileSync var tap = require('tap') -var cat = require('concat-stream') var server = require('./lib/server.js') var common = require('./lib/common.js') @@ -14,10 +12,7 @@ tap.test('fetch with a 404 response', function (t) { server.expect('/underscore/-/underscore-1.3.3.tgz', function (req, res) { t.equal(req.method, 'GET', 'got expected method') - res.writeHead(200, { - 'content-type': 'application/x-tar', - 'content-encoding': 'gzip' - }) + res.writeHead(404) createReadStream(tgz).pipe(res) }) @@ -27,19 +22,13 @@ tap.test('fetch with a 404 response', function (t) { client.fetch( 'http://localhost:1337/underscore/-/underscore-1.3.3.tgz', defaulted, - function (er, res) { - t.ifError(er, 'loaded successfully') - - var sink = cat(function (data) { - t.deepEqual(data, readFileSync(tgz)) - t.end() - }) - - res.on('error', function (error) { - t.ifError(error, 'no errors on stream') - }) - - res.pipe(sink) + function (err, res) { + t.equal( + err.message, + 'fetch failed with status code 404', + 'got expected error message' + ) + t.end() } ) }) diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/@npm/npm-registry-client/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/@npm/npm-registry-client/cache.json new file mode 100644 index 00000000000..4561db502b1 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/test/fixtures/@npm/npm-registry-client/cache.json @@ -0,0 +1 @@ +{"_id":"@npm%2fnpm-registry-client","_rev":"213-0a1049cf56172b7d9a1184742c6477b9","name":"@npm/npm-registry-client","description":"Client for the npm registry","dist-tags":{"latest":"2.0.4","v2.0":"2.0.3"},"versions":{"0.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.1","_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"693a08f6d2faea22bbd2bf412508a63d3e6229a7","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.2","_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"b48c0ec5563c6a6fdc253454fc56d2c60c5a26f4","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.3","_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"ccc0254c2d59e3ea9b9050e2b16edef78df1a1e8","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.3.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"@npm%2fnpm-registry-client@0.0.4","_engineSupported":true,"_npmVersion":"1.1.25","_nodeVersion":"v0.7.10-pre","_defaultsLoaded":true,"dist":{"shasum":"faabd25ef477521c74ac21e0f4cf3a2f66d18fb3","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.4.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_id":"@npm%2fnpm-registry-client@0.0.5","dist":{"shasum":"85219810c9d89ae8d28ea766e7cf74efbd9f1e52","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.5.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"The code that npm uses to talk to the registry","version":"0.0.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_id":"@npm%2fnpm-registry-client@0.0.6","dist":{"shasum":"cc6533b3b41df65e6e9db2601fbbf1a509a7e94c","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.6.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.7":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"The code that npm uses to talk to the registry","version":"0.0.7","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"engines":{"node":"*"},"_id":"@npm%2fnpm-registry-client@0.0.7","dist":{"shasum":"0cee1d1c61f1c8e483774fe1f7bbb81c4f394a3a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.7.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.8":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.8","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.8","dist":{"shasum":"1b7411c3f7310ec2a96b055b00e7ca606e47bd07","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.8.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.9":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.9","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.9","dist":{"shasum":"6d5bfde431559ac9e2e52a7db85f5839b874f022","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.9.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.10":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.10","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.10","dist":{"shasum":"0c8b6a4615bce82aa6cc04a0d1f7dc89921f7a38","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.10.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.0.11":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.0.11","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.0.11","dist":{"shasum":"afab40be5bed1faa946d8e1827844698f2ec1db7","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.0.11.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.0","dist":{"shasum":"1077d6bbb5e432450239dc6622a59474953ffbea","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.1","dist":{"shasum":"759765361d09b715270f59cf50f10908e4e9c5fc","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.2","dist":{"shasum":"541ce93abb3d35f5c325545c718dd3bbeaaa9ff0","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.3","dist":{"shasum":"e9a40d7031e8f809af5fd85aa9aac979e17efc97","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.3.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.1.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.1.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.1.4","dist":{"shasum":"b211485b046191a1085362376530316f0cab0420","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.1.4.tgz"},"_npmVersion":"1.1.48","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.0","dist":{"shasum":"6508a4b4d96f31057d5200ca5779531bafd2b840","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.0.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"node-uuid":"~1.3.3","request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.1","dist":{"shasum":"1bc8c4576c368cd88253d8a52daf40c55b89bb1a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.1.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.5","dist":{"shasum":"2f55d675dfb977403b1ad0d96874c1d30e8058d7","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.5.tgz"},"_npmVersion":"1.1.51","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.6","dist":{"shasum":"f05df6695360360ad220e6e13a6a7bace7165fbe","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.6.tgz"},"_npmVersion":"1.1.56","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.7":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.7","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.0.14","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.7","dist":{"shasum":"867bad8854cae82ed89ee3b7f1d391af59491671","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.7.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.8":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.8","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.6","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.8","dist":{"shasum":"ef194cdb70f1ea03a576cff2c97392fa96e36563","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.8.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.9":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.9","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.9","dist":{"shasum":"3cec10431dfed1594adaf99c50f482ee56ecf9e4","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.9.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.10":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.10","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2.0.1","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.10","dist":{"shasum":"1e69726dae0944e78562fd77243f839c6a2ced1e","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.10.tgz"},"_npmVersion":"1.1.64","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.11":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.11","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.11","dist":{"shasum":"d92f33c297eb1bbd57fd597c3d8f5f7e9340a0b5","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.11.tgz"},"_npmVersion":"1.1.70","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.12":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.12","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.1.8","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.12","dist":{"shasum":"3bfb6fc0e4b131d665580cd1481c341fe521bfd3","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.12.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.13":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.13","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.13","dist":{"shasum":"e03f2a4340065511b7184a3e2862cd5d459ef027","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.13.tgz"},"_from":".","_npmVersion":"1.2.4","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.14":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.14","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.14","dist":{"shasum":"186874a7790417a340d582b1cd4a7c338087ee12","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.14.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.15":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.15","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.15","dist":{"shasum":"f71f32b7185855f1f8b7a5ef49e49d2357c2c552","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.15.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.16":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.16","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.16","dist":{"shasum":"3331323b5050fc5afdf77c3a35913c16f3e43964","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.16.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.17":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.17","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.17","dist":{"shasum":"1df2bbecac6751f5d9600fb43722aef96d956773","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.17.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.18":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.18","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.9.202","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.18","dist":{"shasum":"198c8d15ed9b1ed546faf6e431eb63a6b18193ad","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.18.tgz"},"_from":".","_npmVersion":"1.2.13","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.19":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.19","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.16","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.19","dist":{"shasum":"106da826f0d2007f6e081f2b68fb6f26fa951b20","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.19.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.20":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.20","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.16","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","_id":"@npm%2fnpm-registry-client@0.2.20","dist":{"shasum":"3fff194331e26660be2cf8ebf45ddf7d36add5f6","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.20.tgz"},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.21":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.21","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.16","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.21","dist":{"shasum":"d85dd32525f193925c46ff9eb0e0f529dfd1b254","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.21.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.22":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.22","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"~2.20.0","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.22","dist":{"shasum":"caa22ff40a1ccd632a660b8b80c333c8f92d5a17","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.22.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.23":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.23","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.23","dist":{"shasum":"a320ab2b1d048b4f7b88e40bd86974ca322b4c24","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.23.tgz"},"_from":".","_npmVersion":"1.2.19","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.24":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.24","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~1.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.24","dist":{"shasum":"e12f644338619319ee7f233363a1714a87f3c72d","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.24.tgz"},"_from":".","_npmVersion":"1.2.22","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.25":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.25","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~2.0.5","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.25","dist":{"shasum":"c2caeb1dcf937d6fcc4a187765d401f5e2f54027","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.25.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.26":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.26","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~1.2.0","semver":"~2.0.5","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.26","dist":{"shasum":"4c5a2b3de946e383032f10fa497d0c15ee5f4c60","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.26.tgz"},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.27":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.27","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.20.0","graceful-fs":"~2.0.0","semver":"~2.0.5","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.15","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.27","dist":{"shasum":"8f338189d32769267886a07ad7b7fd2267446adf","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.27.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.28":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.28","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"~2.1.0","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"_id":"@npm%2fnpm-registry-client@0.2.28","dist":{"shasum":"959141fc0180d7b1ad089e87015a8a2142a8bffc","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.28.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.29":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.29","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.2.29","dist":{"shasum":"66ff2766f0c61d41e8a6139d3692d8833002c686","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.29.tgz"},"_from":".","_npmVersion":"1.3.12","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.30":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.30","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.2.30","dist":{"shasum":"f01cae5c51aa0a1c5dc2516cbad3ebde068d3eaa","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.30.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.2.31":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.2.31","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.2.31","dist":{"shasum":"24a23e24e43246677cb485f8391829e9536563d4","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.2.31.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.0","dist":{"shasum":"66eab02a69be67f232ac14023eddfb8308c2eccd","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.1","dist":{"shasum":"16dba07cc304442edcece378218672d0a1258ef8","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.1.tgz"},"_from":".","_npmVersion":"1.3.18","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.2","dist":{"shasum":"ea3060bd0a87fb1d97b87433b50f38f7272b1686","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.2.tgz"},"_from":".","_npmVersion":"1.3.20","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.3","dist":{"shasum":"da08bb681fb24aa5c988ca71f8c10f27f09daf4a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.3.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.4","dist":{"shasum":"25d771771590b1ca39277aea4506af234c5f4342","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.4.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","couch-login":"~0.1.18","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.5","dist":{"shasum":"98ba1ac851a3939a3fb9917c28fa8da522dc635f","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.5.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.3.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.3.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.3.6","dist":{"shasum":"c48a2a03643769acc49672860f7920ec6bffac6e","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.3.6.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.0","dist":{"shasum":"30d0c178b7f2e54183a6a3fc9fe4071eb10290bf","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.0.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.1","dist":{"shasum":"9c49b3e44558e2072158fb085be8a083c5f83537","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.1.tgz"},"_from":".","_npmVersion":"1.4.0","_npmUser":{"name":"npm-www","email":"npm@npmjs.com"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.2","dist":{"shasum":"d9568a9413bee14951201ce73f3b3992ec6658c0","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.2.tgz"},"_from":".","_npmVersion":"1.4.1","_npmUser":{"name":"npm-www","email":"npm@npmjs.com"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.3","dist":{"shasum":"aa188fc5067158e991a57f4697c54994108f5389","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.3.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.4","dist":{"shasum":"f9dbc383a49069d8c7f67755a3ff6e424aff584f","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.4.tgz"},"_from":".","_npmVersion":"1.4.2","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.5","dist":{"shasum":"7d6fdca46139470715f9477ddb5ad3e770d4de7b","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.5.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.6","_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"657f69a79543fc4cc264c3b2de958bd15f7140fe","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.6.tgz"},"directories":{}},"0.4.7":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.7","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.7","dist":{"shasum":"f4369b59890da7882527eb7c427dd95d43707afb","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.7.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"directories":{}},"0.4.8":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.8","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.8","_shasum":"a6685a161033101be6064b7af887ab440e8695d0","_from":".","_npmVersion":"1.4.8","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"a6685a161033101be6064b7af887ab440e8695d0","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.8.tgz"},"directories":{}},"0.4.9":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.9","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.9","_shasum":"304d3d4726a58e33d8cc965afdc9ed70b996580c","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"304d3d4726a58e33d8cc965afdc9ed70b996580c","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.9.tgz"},"directories":{}},"0.4.10":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.10","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"^2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.10","_shasum":"ab7bf1be3ba07d769eaf74dee3c9347e02283116","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"ab7bf1be3ba07d769eaf74dee3c9347e02283116","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.10.tgz"},"directories":{}},"0.4.11":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.11","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"2 >=2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.11","_shasum":"032e9b6b050ed052ee9441841a945a184ea6bc33","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"032e9b6b050ed052ee9441841a945a184ea6bc33","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.11.tgz"},"directories":{}},"0.4.12":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"0.4.12","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"request":"2 >=2.25.0","graceful-fs":"~2.0.0","semver":"2 >=2.2.1","slide":"~1.1.3","chownr":"0","mkdirp":"~0.3.3","rimraf":"~2","retry":"0.6.0","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@0.4.12","_shasum":"34303422f6a3da93ca3a387a2650d707c8595b99","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"34303422f6a3da93ca3a387a2650d707c8595b99","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-0.4.12.tgz"},"directories":{}},"1.0.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"1.0.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"~2.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@1.0.0","_shasum":"2a6f9dfdce5f8ebf4b9af4dbfd738384d25014e5","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"2a6f9dfdce5f8ebf4b9af4dbfd738384d25014e5","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-1.0.0.tgz"},"directories":{}},"1.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"1.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"~2.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"98b1278c230cf6c159f189e2f8c69daffa727ab8","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@1.0.1","_shasum":"c5f6a87d285f2005a35d3f67d9c724bce551b0f1","_from":".","_npmVersion":"1.4.13","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"c5f6a87d285f2005a35d3f67d9c724bce551b0f1","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-1.0.1.tgz"},"directories":{}},"2.0.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"~2.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"47a98069b6a34e751cbd5b84ce92858cae5abe70","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.0","_shasum":"88810dac2d534c0df1d905c79e723392fcfc791a","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist":{"shasum":"88810dac2d534c0df1d905c79e723392fcfc791a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.0.tgz"},"directories":{}},"2.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"123e40131f83f7265f66ecd2a558cce44a3aea86","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.1","_shasum":"611c7cb7c8f7ff22be2ebc6398423b5de10db0e2","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"611c7cb7c8f7ff22be2ebc6398423b5de10db0e2","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.1.tgz"},"directories":{}},"2.0.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"6ecc311c9dd4890f2d9b6bae60447070a3321e12","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.2","_shasum":"a82b000354c7f830114fb18444764bc477d5740f","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"a82b000354c7f830114fb18444764bc477d5740f","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.2.tgz"},"directories":{}},"3.0.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.0","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"6bb1aec1e85fa82ee075bd997d6fb9f2dbb7f643","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.0","_shasum":"4febc5cdb274e9fa06bc3008910e3fa1ec007994","_from":".","_npmVersion":"1.5.0-pre","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"4febc5cdb274e9fa06bc3008910e3fa1ec007994","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.0.tgz"},"directories":{}},"3.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.1","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"fe8382dde609ea1e3580fcdc5bc3d0bba119cfc6","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.1","_shasum":"5f3ee362ce5c237cfb798fce22c77875fc1a63c2","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"5f3ee362ce5c237cfb798fce22c77875fc1a63c2","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.1.tgz"},"directories":{}},"2.0.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"2578fb9a807d77417554ba235ba8fac39405e832","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.3","_shasum":"93dad3d9a162c99404badb71739c622c0f3b9a72","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"93dad3d9a162c99404badb71739c622c0f3b9a72","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.3.tgz"},"directories":{}},"3.0.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.2","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"15343019160ace0b9874cf0ec186b3425dbc7301","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.2","_shasum":"5dd0910157ce55f4286a1871d39f9a2128cd3c99","_from":".","_npmVersion":"1.5.0-alpha-2","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"5dd0910157ce55f4286a1871d39f9a2128cd3c99","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.2.tgz"},"directories":{}},"3.0.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.3","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.3.3","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1 || 3.x","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"b18a780d1185f27c06c27812147b83aba0d4a2f5","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.3","_shasum":"2377dc1cf69b4d374b3a95fb7feba8c804d8cb30","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"2377dc1cf69b4d374b3a95fb7feba8c804d8cb30","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.3.tgz"},"directories":{}},"3.0.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"~0.5.0","normalize-package-data":"^0.4.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1 || 3.x","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"54900fe4b2eb5b99ee6dfe173f145732fdfae80e","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.4","_shasum":"d4a177d1f25615cfaef9b6844fa366ffbf5f578a","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"d4a177d1f25615cfaef9b6844fa366ffbf5f578a","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.4.tgz"},"directories":{}},"3.0.5":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.5","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"0.5","normalize-package-data":"0.4","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"2","semver":"2 >=2.2.1 || 3.x","slide":"^1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"BSD","gitHead":"635db1654346bc86473df7b39626601425f46177","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.5","_shasum":"cdabaefa399b81ac8a86a48718aefd80e7b19ff3","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"cdabaefa399b81ac8a86a48718aefd80e7b19ff3","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.5.tgz"},"directories":{}},"3.0.6":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"3.0.6","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"^0.5.0","normalize-package-data":"0.4","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"2","semver":"2 >=2.2.1 || 3.x","slide":"^1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"ISC","gitHead":"eba30fadd724ed5cad1aec95ac3ee907a59b7317","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@3.0.6","_shasum":"14a17d9a60ed2a80b04edcbc596dbce0d96540ee","_from":".","_npmVersion":"1.4.22","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"14a17d9a60ed2a80b04edcbc596dbce0d96540ee","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-3.0.6.tgz"},"directories":{}},"2.0.4":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"@npm/npm-registry-client","description":"Client for the npm registry","version":"2.0.4","repository":{"url":"git://github.com/isaacs/npm-registry-client"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{"chownr":"0","graceful-fs":"^3.0.0","mkdirp":"^0.5.0","npm-cache-filename":"^1.0.0","request":"2 >=2.25.0","retry":"0.6.0","rimraf":"~2","semver":"2 >=2.2.1","slide":"~1.1.3","npmlog":""},"devDependencies":{"tap":""},"optionalDependencies":{"npmlog":""},"license":"ISC","gitHead":"a10f621d9cdc813b9d3092a14b661f65bfa6d40d","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"homepage":"https://github.com/isaacs/npm-registry-client","_id":"@npm%2fnpm-registry-client@2.0.4","_shasum":"528e08900d7655c12096d1637d1c3a7a5b451019","_from":".","_npmVersion":"1.4.22","_npmUser":{"name":"isaacs","email":"i@izs.me"},"maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"dist":{"shasum":"528e08900d7655c12096d1637d1c3a7a5b451019","tarball":"http://registry.npmjs.org/@npm%2fnpm-registry-client/-/@npm%2fnpm-registry-client-2.0.4.tgz"},"directories":{}}},"readme":"# npm-registry-client\u000a\u000aThe code that npm uses to talk to the registry.\u000a\u000aIt handles all the caching and HTTP calls.\u000a\u000a## Usage\u000a\u000a```javascript\u000avar RegClient = require('npm-registry-client')\u000avar client = new RegClient(config)\u000avar uri = \"npm://registry.npmjs.org/npm\"\u000avar options = {timeout: 1000}\u000a\u000aclient.get(uri, options, function (error, data, raw, res) {\u000a // error is an error if there was a problem.\u000a // data is the parsed data object\u000a // raw is the json string\u000a // res is the response from couch\u000a})\u000a```\u000a\u000a# Registry URLs\u000a\u000aThe registry calls take either a full URL pointing to a resource in the\u000aregistry, or a base URL for the registry as a whole (for the base URL, any path\u000awill be ignored). In addition to `http` and `https`, `npm` URLs are allowed.\u000a`npm` URLs are `https` URLs with the additional restrictions that they will\u000aalways include authorization credentials, and the response is always registry\u000ametadata (and not tarballs or other attachments).\u000a\u000a# Configuration\u000a\u000aThis program is designed to work with\u000a[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\u000aa plain-jane object with the appropriate configs, and it'll shim it\u000afor you. Any configuration thingie that has get/set/del methods will\u000aalso be accepted.\u000a\u000a* `cache` **Required** {String} Path to the cache folder\u000a* `always-auth` {Boolean} Auth even for GET requests.\u000a* `auth` {String} A base64-encoded `username:password`\u000a* `email` {String} User's email address\u000a* `tag` {String} The default tag to use when publishing new packages.\u000a Default = `\"latest\"`\u000a* `ca` {String} Cerficate signing authority certificates to trust.\u000a* `cert` {String} Client certificate (PEM encoded). Enable access\u000a to servers that require client certificates\u000a* `key` {String} Private key (PEM encoded) for client certificate 'cert'\u000a* `strict-ssl` {Boolean} Whether or not to be strict with SSL\u000a certificates. Default = `true`\u000a* `user-agent` {String} User agent header to send. Default =\u000a `\"node/{process.version} {process.platform} {process.arch}\"`\u000a* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\u000a that works, otherwise logs are disabled.\u000a* `fetch-retries` {Number} Number of times to retry on GET failures.\u000a Default=2\u000a* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\u000a* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\u000a Default=10000 (10 seconds)\u000a* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\u000a Default=60000 (60 seconds)\u000a* `proxy` {URL} The url to proxy requests through.\u000a* `https-proxy` {URL} The url to proxy https requests through.\u000a Defaults to be the same as `proxy` if unset.\u000a* `_auth` {String} The base64-encoded authorization header.\u000a* `username` `_password` {String} Username/password to use to generate\u000a `_auth` if not supplied.\u000a* `_token` {Object} A token for use with\u000a [couch-login](https://npmjs.org/package/couch-login)\u000a\u000a# client.request(method, uri, options, cb)\u000a\u000a* `method` {String} HTTP method\u000a* `uri` {String} URI pointing to the resource to request\u000a* `options` {Object} Object containing optional per-request properties.\u000a * `what` {Stream | Buffer | String | Object} The request body. Objects\u000a that are not Buffers or Streams are encoded as JSON.\u000a * `etag` {String} The cached ETag\u000a * `follow` {Boolean} Follow 302/301 responses (defaults to true)\u000a* `cb` {Function}\u000a * `error` {Error | null}\u000a * `data` {Object} the parsed data object\u000a * `raw` {String} the json\u000a * `res` {Response Object} response from couch\u000a\u000aMake a request to the registry. All the other methods are wrappers around\u000a`request`.\u000a\u000a# client.adduser(base, username, password, email, cb)\u000a\u000a* `base` {String} Base registry URL\u000a* `username` {String}\u000a* `password` {String}\u000a* `email` {String}\u000a* `cb` {Function}\u000a\u000aAdd a user account to the registry, or verify the credentials.\u000a\u000a# client.deprecate(uri, version, message, cb)\u000a\u000a* `uri` {String} Full registry URI for the deprecated package\u000a* `version` {String} Semver version range\u000a* `message` {String} The message to use as a deprecation warning\u000a* `cb` {Function}\u000a\u000aDeprecate a version of a package in the registry.\u000a\u000a# client.bugs(uri, cb)\u000a\u000a* `uri` {String} Full registry URI for the package\u000a* `cb` {Function}\u000a\u000aGet the url for bugs of a package\u000a\u000a# client.get(uri, options, cb)\u000a\u000a* `uri` {String} The complete registry URI to fetch\u000a* `options` {Object} Object containing optional per-request properties.\u000a * `timeout` {Number} Duration before the request times out.\u000a * `follow` {Boolean} Follow 302/301 responses (defaults to true)\u000a * `staleOk` {Boolean} If there's cached data available, then return that\u000a to the callback quickly, and update the cache the background.\u000a\u000aFetches data from the registry via a GET request, saving it in the cache folder\u000awith the ETag.\u000a\u000a# client.publish(uri, data, tarball, cb)\u000a\u000a* `uri` {String} The registry URI to publish to\u000a* `data` {Object} Package data\u000a* `tarball` {String | Stream} Filename or stream of the package tarball\u000a* `cb` {Function}\u000a\u000aPublish a package to the registry.\u000a\u000aNote that this does not create the tarball from a folder. However, it can\u000aaccept a gzipped tar stream or a filename to a tarball.\u000a\u000a# client.star(uri, starred, cb)\u000a\u000a* `uri` {String} The complete registry URI to star\u000a* `starred` {Boolean} True to star the package, false to unstar it.\u000a* `cb` {Function}\u000a\u000aStar or unstar a package.\u000a\u000aNote that the user does not have to be the package owner to star or unstar a\u000apackage, though other writes do require that the user be the package owner.\u000a\u000a# client.stars(base, username, cb)\u000a\u000a* `base` {String} The base URL for the registry\u000a* `username` {String} Name of user to fetch starred packages for.\u000a* `cb` {Function}\u000a\u000aView your own or another user's starred packages.\u000a\u000a# client.tag(uri, version, tag, cb)\u000a\u000a* `uri` {String} The complete registry URI to tag\u000a* `version` {String} Version to tag\u000a* `tag` {String} Tag name to apply\u000a* `cb` {Function}\u000a\u000aMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\u000aspecified version.\u000a\u000a# client.unpublish(uri, [ver], cb)\u000a\u000a* `uri` {String} The complete registry URI to unpublish\u000a* `ver` {String} version to unpublish. Leave blank to unpublish all\u000a versions.\u000a* `cb` {Function}\u000a\u000aRemove a version of a package (or all versions) from the registry. When the\u000alast version us unpublished, the entire document is removed from the database.\u000a\u000a# client.upload(uri, file, [etag], [nofollow], cb)\u000a\u000a* `uri` {String} The complete registry URI to upload to\u000a* `file` {String | Stream} Either the filename or a readable stream\u000a* `etag` {String} Cache ETag\u000a* `nofollow` {Boolean} Do not follow 301/302 responses\u000a* `cb` {Function}\u000a\u000aUpload an attachment. Mostly used by `client.publish()`.\u000a","maintainers":[{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"time":{"modified":"2014-07-31T21:59:52.896Z","created":"2012-06-07T04:43:36.581Z","0.0.1":"2012-06-07T04:43:38.123Z","0.0.2":"2012-06-07T05:35:05.937Z","0.0.3":"2012-06-09T00:55:25.861Z","0.0.4":"2012-06-11T03:53:26.548Z","0.0.5":"2012-06-11T23:48:11.235Z","0.0.6":"2012-06-17T06:23:27.320Z","0.0.7":"2012-06-18T19:19:38.315Z","0.0.8":"2012-06-28T20:40:20.563Z","0.0.9":"2012-07-10T03:28:04.651Z","0.0.10":"2012-07-11T17:03:45.151Z","0.0.11":"2012-07-17T14:06:37.489Z","0.1.0":"2012-07-23T18:17:38.007Z","0.1.1":"2012-07-23T21:21:28.196Z","0.1.2":"2012-07-24T06:14:12.831Z","0.1.3":"2012-08-07T02:02:20.564Z","0.1.4":"2012-08-15T03:04:52.822Z","0.1.5":"2012-08-17T21:59:33.310Z","0.2.0":"2012-08-17T22:00:18.081Z","0.2.1":"2012-08-17T22:07:28.827Z","0.2.2":"2012-08-17T22:37:24.352Z","0.2.3":"2012-08-19T19:16:44.808Z","0.2.4":"2012-08-19T19:18:51.792Z","0.2.5":"2012-08-20T16:54:50.794Z","0.2.6":"2012-08-22T00:25:04.766Z","0.2.7":"2012-08-27T19:07:34.829Z","0.2.8":"2012-10-02T19:53:50.661Z","0.2.9":"2012-10-03T22:09:50.766Z","0.2.10":"2012-10-25T14:55:54.216Z","0.2.11":"2012-12-21T16:26:38.094Z","0.2.12":"2013-01-18T22:22:41.668Z","0.2.13":"2013-02-06T00:16:35.939Z","0.2.14":"2013-02-10T02:44:02.764Z","0.2.15":"2013-02-11T19:18:55.678Z","0.2.16":"2013-02-15T17:09:03.249Z","0.2.17":"2013-02-16T03:47:13.898Z","0.2.18":"2013-03-06T22:09:23.536Z","0.2.19":"2013-03-20T06:27:39.128Z","0.2.20":"2013-03-28T00:43:07.558Z","0.2.21":"2013-04-29T15:46:54.094Z","0.2.22":"2013-04-29T15:51:02.178Z","0.2.23":"2013-05-11T00:28:14.198Z","0.2.24":"2013-05-24T21:27:50.693Z","0.2.25":"2013-06-20T15:36:46.277Z","0.2.26":"2013-07-06T17:12:54.670Z","0.2.27":"2013-07-11T07:14:45.740Z","0.2.28":"2013-08-02T20:27:41.732Z","0.2.29":"2013-10-28T18:23:24.477Z","0.2.30":"2013-11-18T23:12:00.540Z","0.2.31":"2013-12-16T08:36:43.044Z","0.3.0":"2013-12-17T07:03:10.699Z","0.3.1":"2013-12-17T16:53:27.867Z","0.3.2":"2013-12-17T22:25:14.882Z","0.3.3":"2013-12-21T16:07:06.773Z","0.3.4":"2014-01-29T15:24:05.163Z","0.3.5":"2014-01-31T01:53:19.656Z","0.3.6":"2014-02-07T00:17:21.362Z","0.4.0":"2014-02-13T01:17:18.973Z","0.4.1":"2014-02-13T23:47:37.892Z","0.4.2":"2014-02-14T00:29:13.086Z","0.4.3":"2014-02-16T03:40:54.640Z","0.4.4":"2014-02-16T03:41:48.856Z","0.4.5":"2014-03-12T05:09:17.474Z","0.4.6":"2014-03-29T19:44:15.041Z","0.4.7":"2014-04-02T19:41:07.149Z","0.4.8":"2014-05-01T22:24:54.980Z","0.4.9":"2014-05-12T21:52:55.127Z","0.4.10":"2014-05-13T16:44:29.801Z","0.4.11":"2014-05-13T20:33:04.738Z","0.4.12":"2014-05-14T06:14:22.842Z","1.0.0":"2014-05-14T23:04:37.188Z","1.0.1":"2014-06-03T00:55:54.448Z","2.0.0":"2014-06-06T04:23:46.579Z","2.0.1":"2014-06-06T06:25:14.419Z","2.0.2":"2014-06-14T00:33:10.205Z","3.0.0":"2014-07-02T00:30:29.154Z","3.0.1":"2014-07-14T23:29:05.057Z","2.0.3":"2014-07-15T00:09:36.043Z","3.0.2":"2014-07-17T06:30:02.659Z","3.0.3":"2014-07-23T21:20:42.406Z","3.0.4":"2014-07-25T00:27:26.007Z","3.0.5":"2014-07-25T00:28:48.007Z","3.0.6":"2014-07-31T21:57:49.043Z","2.0.4":"2014-07-31T21:59:52.896Z"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"url":"git://github.com/isaacs/npm-registry-client"},"users":{"fgribreau":true,"fengmk2":true},"readmeFilename":"README.md","homepage":"https://github.com/isaacs/npm-registry-client","bugs":{"url":"https://github.com/isaacs/npm-registry-client/issues"},"license":"ISC","_attachments":{}} diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json new file mode 100644 index 00000000000..01da3002763 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json @@ -0,0 +1 @@ +{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}} \ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/package.tgz b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/package.tgz new file mode 100644 index 0000000000000000000000000000000000000000..19da9baa7fb191637b058d52d7f1c94a67e2196e GIT binary patch literal 58692 zcmV(^K-Iq=iwFP!000001MIyEfFxCUC_I273Uc0lqgR`@ zIy1||b=_OtUEN(f)m2SZ^~^MTS2Quny*CeTOpF>eMiWIvG>Agb5Y!~<^>wci@Iegm z{w4~F(M0qH1pe>)&aSl4-tXP?}Td&y_*YmBu zQ~t?jvtuJ82L2r%8>PS5JbTWH-?`k_*!XB}B%2-W%jWW<`EhuE>buhVX#}C^Lsw3= z9ySz1{{0W~39TT^^e>ppR@ru}{*qS=GC%J=ZGC=rpE_Uv(+8&JW}c!pdanN*uK)4j zvEk9N{OAa*|J-mkzqS5<7N3S&vizV3bpKe8_WVl!&$~lgpP%VRtpBpPVi!F(4PU3c z4P5u5qn*}&esp|{)_*=fJ`CIc81DaL-zepE`93zx%JulY<>Rk`8@gLlYOW0&*}UVfBt#*@n`h`P;Bbo&;KL# ze;fF~wRAPCIj6pjZv1~9kNTsu|BvLdBg60?o&QI+`2U~DXXlIe%ug>}dvM0sw=}nZ zvVSL{0RFMe(qzA3?5tU#X;j0op0ciM*ekmdz$J#38>Yf$-AWkzX;&h&*1`-H-chWY zeqe>W4lV6XZA%!L_SIaIIy9A<_G)!AvY&!~-a#@V8?ge&ed+vl$w%4qZNDjUFgpu80I955N z9|bQAy&C@HIacjbSOv&uvkLUy3XItCR#PxOvk`hN>1z{4)h?ARSG-BBT7_jhOvxNU z(f1sf+sXv=p;4^Leww8crRGNKYev=>hGywYPP^v=Vx@eB5IJ}oc#d5%E-DlXD$iOf zsG22j6$S$T<*|~BipAm%*^zEpYTor--fI(JrbDlIlu$dVKTNFH0Bx%zXQgBZb;kr~ z6&$a)97Dr`W2!X5omGzR1<#Q)RWtpH?WSnL5H@;0B0ZU?B9LX%FvmbGQY8zPqRB9T z`Tpdcc8ioG1h z-p1kFTC1tm+h)e}j(5Twz4|r{w4lZMP(#%V)FzGlh6!&~J)As@j%HhDY9vcjg|CeK zST>5YSlz1WyD)RIvi3O6=8CNbLKU3|D`GxAo|W{RHBpaMJi%6RoV00u=gS%vbITGI z&5VqUMDk9U0OJ*0|1k)+Y%;7sHJ3E1dH6RB|3={7DEu3fr35k)4D#9dI=Q1h(fb~v@`VK zU#VrfU_X-kK{g5qEw{F50DEBM@GIZC>>7?N(LxxCwqJB4&Z{;h>5n!ZAp-)7vJtAt zM=iF~T+93*f|OwBbsxtc#-~+Kra8|wi(b;0_FUNK%s}xEECpGIn&)~jQ$=mj>a&#B z`xPax+gb=YpTc%@oWLGND2Rd-?$UZ?ojDPDN1J$L`!1DAdXDQo0$V%chH#7Yq63CS zO97lCg*rkghE7?ARHL!MF)oBPIog&9Q9Wbe$wt^1*0r4(&JFL(utUI3WQiyH@f8qA z!!7|U&h}(r+F|+wV7UdqnV@`-(-f~H4&Mn|BAOv+3|0$+;yi> zTuw~VpWd^*hO@oaGoKB(1z)}L0V^2p1|YD%y>cUAtYdcmV?DK7rCAglu_pLK&vMm9 zxeP09lK<$HKlG-2--LegA3f^_0t%JGcQohDOv72n!Z)!EwdSeGlUwd(+Ydrq3-G5m za>0?hyL`=TgDBK{`911RUde8B!S{r@7fE%wGwLbU%g6rl-pZJPP0r~HT~(i zbbVw<@OwQ(#0xA&MBvA!P|PbJL!c0Bo;{xwdM#T>-SNBE5LQg5VL@K@w;h&yZjHnRy#)PT~9e}T% zgfE!6u0dNL`>~GvwR+g3{P<%X`5mifxgnKcKYN$qya)f$J3m8FEWm!Pr-e!b`x3BL z_(ShndY3rRs1=Yvh+pgI88R;x^^1P>F0tG59LuDk@SnZQ z>@isz__ufN1*%D8*E+^+9-u*+2i5~4$6*lay$jg^9(>^xWtFgqeApC)Y=pLB z<024eYW93m6w>vkJ-6)Gh{o!7&ta7SZK*5bS5E?B*O0u@pWa8FHFoG(>wWA&ZmeO= zmKa}#zj_kjplH?snb_ZTaMD0aiI;}IJx6KP>JFi*__e8tE>=z3rIjm$5j^3frkZL6 zdXInBwH@-^a8pA-Rj%60_v6z>1Tt0RR2?q@0Z1|SdzDBvJ2NGFMaippg;Gr*MO1YX zW!ai|NP)?&RSXh??MiT2>hN|HP#Z!_Ikp|15=P(`cO`V~uCk{^?QX&_op4toBIx2O zY3yfRc11QUppB~XiA<&fC!|Ip4Lno^TA`f*_U1-OYbTS?^x6mm!ww9S*T>02s$e;x z;n)S=^qWT6^NlOa6?3uZ+x5^0t7d4_eQyQUEtE7IFEqR|BwM@^!N-^mW~=ySt%e$s zpixH!Fe~5m8pf*Ea7u=?RtKarY`4RZpo-8#5jQh9&X{#OF?moVl49Nz;24CS#>=m+ zuBQD)p_u}JPz3}8nq`3hj0-^WQG!p#EQ!el$ci-%C3&5NMriPZr@NT6}R*l@gsc<2$A2!nM_O`dpZ8bUSVa8 zHPJQGEwvOzk#zyMF$S%~o} z)!C*4$FdTvGN%sxosbP0c*28uN*c#tQUaP3F$IjO(#w)%)eQ@oM?iW5eOo9Q;Tm{` z=i>Z9CdaA(84hsf#AL??7$gn5jPm&aR$LMb*F1nA^uza71LzveH1xd@SQ;|8CTiUb z8~Q`crOChwXa#V9MK?nNUk(=?WI}2Sk7Cgjr0A6Au~rCW1dzQNgDIg*LCFdVlbw-Z z%D}UjV}+K&GV=eyFTPxs;HPnkS*!0bc3W<-S~LA+W3j=RI9?GD7%nR<5ix*@OEwg0c>9Ig8CKKEUoPqlH`j+LQD#~^lP{VNYqDXx^GmvE9Ug}zoEa@A7=P)0u zmKD;nh<7gp!Uovb+P}o)%VPC+o06TjwpYHeGof))JTIgZkh^?o)eRUq!~#SfdyV>lmr)jV$p<^ zJ{2T}u)UobXo0sy+G9E1&=)`Pp)@JS)QGSIlY3x!J6;`!VqC@TT%_s?S*@@XtH_=l z9$zjbfwCje0KWo2P}+VDI>>&Pff1bcYWyr|N2-9|{zkf(g8iPlc~G)S>+a$K;1>fTd(xOVZkz!ePaW70z;m83VQ__EU|@H$)J_#9&hlYh z);yf6xjn|<0vaFs))k9GVxLPZZqZQsO@V4A=L$s^t9g1I(G4o4ppt(YgG_CJD~rpl zhBPFR%qLR>Dv%Y#K$)F{&=D3UcOto)JetPmK{OSB{R!5i8G3%wI83IKYvB=SgYu~g zb)72NOe7|!@XthSOVahLtS7!;Q}HuPZ6OUqYZ4O+V<%__f|Y8q{SG$GrfoUIPhm%i z3N>KU1cCzHz-@~684JqF#h#lciXF>^L;?k#C9EW5@A+_9>jYiet$}bTI*%H2ToP$x zhV^8{E7EN8?Ks{>(S%v#3kbF)%Q8$MiJ8z)I-DHjgM}t>&rOoy#t@NJ;4aD$&>(?p zN}NN293v1~P??d{Q78H5gFL9}VqCs}b*04*E2U#Kcb%k`(o zG|-dDevWO2b4eqgG=`5PW%)s1vWJetMsE2b{oY}m7~0Xl>yk>igQW%x0bCLo2|P%r z)1uPjI9Wh*ld$J_@BMiD8O>-23nV%W#t?Fd zFj?V~#;+PR3yw}DSvkWY1dhbm2JS?*3mlVKTJMt3F*dq1Hn=1@BQs89XI%CzqEzr; zTxtyK7NVj8o~ z!Egn_AtG~iIIv!uksk`vH^dm=$n5sFIAMVDUKxOfNJ$ zA#X=yTrq*+24vV}$mwc_nQY1;_=!ozOEC?wC~0IRB8~NT!60tw(-V!j5l|eLDEZVO z)P$IOe;sIqECJcor=T9MXft{wOu^Y+t}v%{N0b$5G$)td*0u&Y{A6^4#2kA?e`SS$ zSa2jo2A{dWAX`qAro;u2_SU0BCdga5ib= z09OukoH;y_G)9jc*+H4m3`4^$eflJBnMtECWJtU+(To}xq`|@vA=cp|ibP@63^@Ve zu-W#g#*D+d;25(TQ^gJ2*8QHh9LPN}x_ff|QjnP>hYoJD_=*g8h|NSv zS(MQXXnSoS_lOddHajX}vfOc5#ZXAGeu3w?9BU9VbT&4D2G!{>WJtD?WDA}ZxC0?> z=!nQx1k>^K2d8TsMOR#cBd1GfLK7hfP|{%YJ=S%Pyx7PayLO>5wA#z^o$!L00(Qj= zA?i}Nfhng9JCscFslg7MD#4<`K|*7_EU{5BDLZtpC!%yDVTu`30OR~va(yhlnD&6r zI|2FRXCA502o~(L2{Dy;*ZoH@2WsoVl#O6ObS4-03e%<_${$N50Ok-UST;?VLUW`h zvh7^)rO(#3S0{fqOUQfW6m^{quT%;+t)}swg2~8H@zD;GLDsWfW`YcB)il84DO-h7 zgxzBiimBUaPr@u%C@4bohOP*PO-*QQQL+^lw#pIIOv<&_@%YTwR7~ow^Z{KC83?Y! z*y$u55Zs32B#nWl6%4>M9!(3yxSXr9=>%4Xd2*ZG=gDnG=E-gHc{(hHedHwQC08$O za-x(jt@lKAVxA)twTQ02DfEbG*dY_I2ccIF#0DsKXslf^Xk|ufzH`~ zf}~#GIuHQn;V_%`ET8%$n`XsPVV~Mhx->=aGV#(%T}?hu;s`)6->_tYwBy0%C!NnP zw+>(jFAlD@n`a{swhPpTJ-KVwE~*PB1gWi1?%H(< z2rP#Wj}p}!N5VBsvynRjzX#B_U_k9}I8&oMo0zl?n;mz)=rT#%FGI}{CGaV#`(EAh z!zRMB*R-H=)dkkdMugW+m#fH7;99W!s#)g~=K+2fy;=>jz~M1fGy{UBP7ArbZGz28 zF(fvVo&UVD>=`Gp-6aj7=T$7^G7cX{Trnn$ftqIlUBaU%y2QePPrh-0k!{L%qmg&T zhVQ6%W7!jM;1m$!t-y3)Zf&{}&=!Umpo;Ma)spBiW8?zURXV#CmCmkhY}@P1Btlho z4S1?{vQ#0)jB5?p3emQRm=rX+{?Jgwa!HdyEf#&OkE|P-fG2jb8d*ZTBZ1+Y?y^<- zxy~`dSIJs+)Alx7a)*#$Of0a;Gd#w!?INswWJ z1F{2Y8iQ6PP09+#aw}n#6cj^U_CXH4^&bJ}%&?jc*qlbRVz`rzkY-_+w$ywFYAap- zy3Dfl22|6`lVbDSYjPLs4l(bBQlB&NePE#mi7I7`43o*@+{LFZwlF$RVcVr@ikaiu zDX3k|uY@u0N+5b7r&edQB2|keu2rWFKV2qV!0~V{jr>j;XDU6?eY(qz=lLxYempl} zU@cHK55HtpC;Ihf20RzHgn@9?qd%y&!jtI$Lr}G8A0LKF66gv7`!(cFK&DYlq9O^X zwj<4u9-%!5hjbQ=QV*W2A7ym9-V4VLF-dH}cG1u^uuLBbs%M~h*azxoab*xRVE|ty z32x-*qMu5b!iNqfB*hObqDzFg@gpq|Bu0kdT@6lCc%q7D8qfv4R23B=jBT}%(Ds*> zeFYjp%b$j(&LY}`#0M!PQN^-G@On@l0eRXy^6+mM{*B;9lEpL8s6>w84wEn3db>@$ z@c7jxoh1!&9qxL!2UbdL5be*GkW*vDBhrSLahc_&SM6mR2#{@(Z5cjg_S!+!@-Lpr zU%V}Q@%G_sQDSgZ4wSu3QL3RiGj{_tA8jj*kLX)+f_9H~rrpvlx(mFe$FzbsPg)ne zr}0GNhd~Rb51MW>tTL$!EF(03#MQy9gi2&3G?e7JS#38q9ey0gb&4u8G#(|RgjypM zG8|~fR8COR#HS-r2PLsolu`{-RyC9k9J^=@=7??%D)>jF*qG1(-psAM8*-CJsfO9` zyaBXkVkl<9qU*Oio!Q%A7q-~dKB4m>=B91J`<$>nx2uXo!V$g#fRhWJ=I#gqZI|w*Up>X$HSs}|O1XmoP2-pgQ zK#Z(4685QvTHq^dEc;$fV??`(uh{TA0b5J&Kw4N3hb};8@f{Sz@p%*AR`A^@hH}h| zz`H#F*NdPugiavKby6hufD?;up(_zJI1$&kQ6d05+I#e| z^yEyR;Dr^0J)Iix-9U$}z)%z~5-MdKV;>vM1p?m`&&af z=-S+N4K_XW3dTp@Ql04ndjSP9+~FD_g7&}w%C95ZTasvZFs2ZpR=VwjA_|MP6S5?^ z6oM-B*<0;NIQFt~%nX%WU?Nj7NGuEUvJy-n*?KqOz*P^c%#O6_HDrZ#PLX*B7^|*O znn;c30*OcU0&5(-284Z|gKiStc0E2$gyP{m*CQN0JaPm+Eg(i#Z%2QRQc2PQwJFQq zcaUJp2sd4(Nd~`B)5MeHG+oM&djn##-m3;hAEsMW#6+BYg9!N%>q*zl*#SFw64#DY zO?R~GGAm+O9C$fWjWWR$3OjH`td|Mrp@6!8l}8CuK&6DiOBrL^`@};hYDUPZq!jSc zF+63f?J{8c8KHN^jLhF04??v-lL&LUK$1~wlbkT6W)#_Vlr^G9RBYyg9{fHVnx?sg zv%7?GF3ar$bL~){GD4P4jG!JxsVg_A2UyZsLY2NL*b9j2)>8;LCcaUXbBn9aU^AEl zNJIn5Ws6Y_HJ9LRXaXX`+~_=XfW01vste@x5LF89Dpe4XOFbBn-xK(YcFlH7pDTMc z+LR>D+;6p}BK9LfV@_;xo+b~-1Mmn@wl!R z?YJ&RI<8afW3Wh4vLoH)kzKh-Mjtlj|50kx9lL0TR;rAr_^3Q9G66#9)oM&3>t!b+ z&9;K=&t#}i%xP%_HwR?~7nxvKFicXYXj@&J7Bp)R+#isqA0t~Fqxm4W?7 zS2CyK`G9OSjd5c=S~US_l#DY%T8)CqHEVI7mLxZ^bTz<6C92ZftSec)PTQ=+PSuuy zXpd#Yl-Q5ZOdXYjaQA~|RI6|!2YSh$R0hl7qZOgOg1G>d`3r@83)uukh9Q>KZ) z{8CQ0TD4r7l`6Wu23FnlbvKHV8JgTLTO-v)4|YAA27MJvz836^WSq z0Vs_UBU?mNFtMO-ui@A@Bg)1`o+ALhv{|n^%?JmB{3sy@MjzuEeyW2^@dHlp01vC( zu>mLNFjuBa%{kX)6R)U?$+_(xXYXTnUx$S)1Qx-JSU}oEU>&RgrZOW5tW~6T+^Tu# zzplHqG@Mc!G$je@CKWA$$ZbTV5L2f_tibrGfXwc+JwVYcMVfphBB`7(D3hx1_PdBC zu^^>Sd+$fxWK0_0H(bXG(9nJ$Flsi@uXIPuleNJ-RrooD8R1L1DTyUVYFJec#y4mR zYRQj1VaRDD{7`bHHpCLh9y*zuf=WizSzXx?HmMpXlJ6x`iG+{rA%dE1#Um{_f=e66 zA5OMNs^k>`|7qXn%74wQ@MLkQ1z$+G9vz*U9nE7F=tzK9)$|Z*&Bi8yDd6L?G15W8 z#e#Bn6LGP4otlgb69y0CHAW#cfp)QY!Vj%_&qX|?#)msC;B1J;ZfgyO*-SBA1dv+f z#c6v%cDDljM-uh{x73W9tN~IpZ*>eXK~fUXM6ttLvqA6%I1&yYl)s)szZDcJQ6;~~3kump5 z&*MfFh-uZT4RzEtQQ1N-=dwb~xeT8Nl|_f}yx)kS?QW=o#X1o62%KRuTd#0T20E%) zrYqH<$St8}BO)zVltcs@NGj%ys2p(6RhwdUNJYOmG0Bz`r!-$@ftb($8VB2|R#O%V z@&3c?q{=osHP;j(n{k(2VDrdn7MUxXnep~?Xu-COUCM%`0*4lq4=UxXNHJb&3``gU z@CV18CTpq_JNkJA+7xQmiO7bX0QReDqp=FU9F&L$i4z89Xir*Yu;3n8G!=D#;YouE zgOrW+`f!M(r&6!WN(Y)URL3LIaZ#j{s9UktCYPC#F&ZAI_=d<$?ASJH3deehiy4+o?2I9?JuMHTuD2?Ko!E(|ZgxKgcV;i~rxHXq;sdxf1zKGr3 zVY1K&L(jd+wpIZ@@!k%{ELaX?0mM|nat3fgdG0g@3^G&%vq2fcVt`@^StSkksUq^c zrLy}d%u2LukzK8lcD%~q0Nv_Cac^3y=s$s$o&s%EpJAP_xO0O87pdMJWf=yB*m7fi z8%SznP4ltHb#^r#23epy%tHi?jVP&gg+Z6ji}HX8_{c1g(&-MCzal_)mo+M5cWV~F zEJ>sHhpTX|6FW-JRXWGY<3g?2=oK5MnXvU2&0wY#$`k7Qhl&JEY zZyQjqVq>7cXm}pZe0A%gajXFhSVJ(`%#cCUFRJHLros>Ev;;H22)gexb^)&;D%!MH z#4%vd9ikN~d?k%b95i({E`y&Fs_dX^q>S7Utf6QU^66+R(_TQ!qQZBR&9Z>;nphSS zH1u3G?F}*`b0{=(>}A?90xMjyYnGJIGLjm!pe==TCwVTk7dh9|0D*uW15qgjQV1x0 zCj}n1@D#+dGzI$U_#SrzYUvA!knE7f4rDt|x9J5krHwTSo z2^Rrj!wqew>0qbhkQhk}X#zV9tU~A#j7gWy21=^m5JnwQLdi?ySfw?MWL=zP|wmnfKL zH?2Sfvf9Q|AB1MsK`!Vf@&O3*lEGD=H{R+{n%xCEC`)(V48+A8U1@{3vqL8j zEUk4{uxmB6LJqCouArUJ#1OUj!jh=Yj!>Zv(^{ukdKg!2%_=sy&=iRekxPB^7qcCi zWybaaMX6(3KzNFp$sLA!hq_gxrrHs7?2ut}$vV)2Ds8emFl7`bLfR@EPAyH{V~dMS zQ2Rx~MW9hc9Z}3vXPN_hg=D^ap+alT#D*p`!lh)sFySl6?xT{~m^1xlib+*uVKp%T z2&|N1gGC>v_&!Y}b8Jt+#u+xr>hxX|EGz@O7;-^+h~idcmKdk$2U`Tn(kcUm$pV9R zGEaLS4oo5QODLKsS=MJzM^4(jVa-=~|0SAmE)n*Z5+m*0eTGsMrSVPMp|xD9=*A2Z zNl0G~M*um|xJRH@e@z&r5Q`ImKgR&%%`kid5TlaUC^!}i$r>;%U?OM~fQ}@@nS{ta zaGq>l)P6|#NhsJ2&XNf+uW#;WbBe@6E?F__7JG@(wkY*r(>kcicOoBNFVf+~$cCqr zjCIq8I2DL2f1;35!(=m?q#y zi6!j1gUHq`!UCEBCM%y(axs`-m2a@+iE*4FGcv&ha8^x;cF_*32fv-E3yN@hr^N!n z1YnvQt`_m@6yZw5LXY(MMC|C0C+lLgjiVApmuR?L;Es2FMCO*9(`cCnO}7Z!t?M<= zoD-GNaD-G-3=9mgYr1Iw^dM;X+*m=dEL06gQbNNr%tTN{8p}97jktJ4c1G_y{cK-A zCkGa&he6lH=QQ)1OY%H)B%$!8^j3G{gJ*Ui#b0UaBSw%OJkG-mPUy{?;HOVO8ohD! z0&cj3D@hJ^95l7X74s&Uz_vF@^n1iTWtVzs#)$B&GbcW7v^||Xul7Zd1L?pJIm5t0 z1v0Mh4XoaXhPKtb#14gAASzBkp#FKxIn1C)0p>N};xU4p)XTKez_Lf^mPQ-% znn^*5eBIuY_ew+!lyY>mK_48Frsfs#o12tZ*)!55vi;I|+VWs!5Z(__j;?4$+7(QS zW0r_r^1@elLGZoeGG-GyBMp{%|IC|Jt+fkBZ&TcWa^3^;fX)(MdAz7nk$ zGIjw*gjz_q36a);Qm>-pa)_J-Xoi9fg-5&wyMhS56Oh}EU}uJVf!VllAja4q|wWlw4n z8&PNboSJ1MTC3S^ihB|So|35W%TpL@4*l?v!_qp=hY|n+$m$3iY?nzmkmHuDO}G01 z7+~Yt_~SB;P;1N|JqQtG=n$sM?iHoWjs@w0XQ`3D6lv&ssa4!VMpwSGkey7U#$`(@ z%G}+H+HMUO=99n3k?{is*n+>1 zXJC^MS2x3US84D|Vk7mDLsA3Z1O%57MHP=6`2aAl;9Od{0&-`m+GNditQGc zWJ>e@ z67mF7VsVg)+(|w2is?e5W&&+PeA``i02Gkycrba|dTUpE+aevfcXsb@H{P9H39NDM zn6OS>fe9BVZU-IJQm_h9YD9IkU5#mqNXTuyJ?+|O{D>u{OgMObg(gfq_ZUf%(WmsD z=;j#9h7u)f?H5+3kY!%!VZ?+Lb(<)BkCwIhd%^n$o3?hzoBxsV+F-|g;K=_l=kDh9pprcLUOX-^x zBwD0S$(am!c41EpR-siI(j2NsvKV=-J<8Cv*j-SDZp>CF1CJ7A@K%vt`ectEXE}$+ z1H4iavvGk+E;D8+B5~1lbU_K~6*&6=t<`vdp(UtOg5LvZOfRz9WkEY4pOlA zQ)UWnQ!=CR7L4Mq%V@QF{AVqe?OQMiiPlQ-;oq3lzmN%Viju|XT z&NbQ2^_uO2Y_$c#h^R)UHFO&$vD>~Kkj5J?_+vPL=PJ2j>H)HpNWILAJ=B#aC?)~e zA%{c`WL>vDpq2&-6JmS`#tLm7;E@V3W*NpD7>7gL$Pq3{V0*#_3u0@qz^QCBxVC~Q ziLfZg`eu(^F5i9j*uC?S*~6p_9idx7DMxuB5tnn@D|{kR#sNI@y@VFB z;W*lBuW~WSbVLje&YsAj8P4el!jqp0B#8w;+Bm+5zQu5cQ)EnW7_QX{UUgtlF-l;u+tMSz`;V?`_^-{U#}o+*aRly=I8 zU#4m~6uRRx>p&`(%|%BVc{}S;jqAF(#13{dlZzhU;JKpk;EAUgAeK#X96cLz6_qie zy240w3S&mC4+4A4p4hO*jN<~PoO*5vD(yNrY87n;>BrEz(0#$G%&c{nc!*5VA+oen zK1fz=*J1LOGeFTY>!WDqfnMYcsY!&EnFmhs&{U+cG^@d2(Kbmg!~B{fQfZX&3rh** z-7LGR9lE)HmW53KaNigRnRxviAVUAvKLURAlm?nD&!l z(^(A~MAnZysw2#*GR+kSSBY+QTg2RQpb^>_<|Z+Di2dkpI^cTKo?CY89tRthO^2LH z9qa|L%bD|p8~UEqGbWBE)H*AmLkIaI21-Hat-2T|oI_hyX0}M)5b}qlgI^nEVq1BQ zatS0G4t+Q~+G85O%&a?_@k|jM<7pc^1WM{ABL6cDH+jHuf~SnaxM5E8=JxX7+7OIw zjX1!TYi3dHBXr^p-2%y7QkkezG{pniph>WTv3`xGDfLz&>`+fJ*{&8H0~2TM(yoj{ z=~V>d+p8hayt2C@!mdSaJ}6<(UH>%>LJ6TH$)cnJpo+Om_MRP=`QY#n?|^7(6 z>56Z<;nj9f9c11-9j=O5>v>tsTKu{gNLVM`pJH}}Xmm=^gHiph&pT;d;H{6V)8N!b zS$we&uNrEQZzk>)fPpmU%E$KvlZq3~v$@~3$8?R%7m1NP{sme79G3^EJfC?HK@uV7dcIKsYN|Wem!a5>$PH_nYd9;+I+LL@=I2PENvB=fj;Vx27QuzqEA~;HqC};$e0g^x$ z!=swXo=D1NM+Vv(?gTJ<-H$*lOT=)8QUs3mn1UI~tX=BDJO%KA4tcW-dL-ho>yBBB zTsH_y?Gm$A-@%nx^z4L@$4d0^x`r1`xM(duE)qnz8%*5G5>c0l_qM^R>}FBJMm#W$ z;l7f_evAcXP|u7x-9|Fenn7erbPAOXdr+@n*^ottKTDCSCt(uNb4Q4A!ou3D6fvqW zbt_uwiwJ1DL&b*>DB3F$16OLo##yXdR$$@fVt%7mw?e#bGYA{yax{7ZuXeyirvmtY z0Jan|zK9KZfYqk~UeudtlbIUQ@`~EqPf2Li>P|1YfXEctqIue&_`#%eN#igE-otQl zffb^Y)H*JY^lEh*?LoAg>P4*qTQjk^A3T5?zn@-<`9U6>!e=h(*C{>eQ2EHsFN}iC zf=H2eVT<{`beriinL^a8hbS*IN$kP$Q~ zMiNS7`K8)QwQG!p;=tC#^k6{DIOurzIW!p6&|(q+t{o28Y@>&wW|$QX3&~jx(ZB%O zWLbJdNj?{mV0ymIog-myOL^sTlKP92sbAGBIwLFNo#MO;_uGqjGGcIkZLvhGPZ$O& z=n8*Gr>T32Y4^9cLM_c~Vwl4`EiN8$hMh5F-AX;q**mVUW!J(tX$I92UX*p=^y$v5 zP=T=Bj4B{nh+mPdVeZf@XoGMU;Yd#h3c?hW--{xhY@8Cx%OlaxTp!T@d6$u3h|b-b z>Xuh`tYoXp3N=JcJ2w7o=>#TZ*gMuk%OiOR&Ldjq zRlAT^Ye}V3;kIw6Hth``zC?#8j4@+D4lu>HJT=0C0Jto2oMi!sV}^i;3T7IJ^`F&> zd%DVoPtls=`-)mG*YZV0vOGaK(E2ar);36RxusQ%yruc^*VeBlgJp*2G8UFxyV;hU z@p&u>MPk$Gv`zyzgT4$asKFvsbZEC%(oq74-u4&aLR@E-l!U#2!I9L_|*! z&l*;JvsUn!A1%760%6p5iV~X`S>Ya%gvq-?WIpDl28{d~yK^oqRxv&Y(Ck3%;F7>7 zdZ@PqM5kbe=%&M}S8Vw@YnIjO7vwRgI_3yUJHFi3$mNc;#5b)rZOJ-2k4CX1GQLQR z`&Yq^bk2aEMQO#<%qBZ=QwV;HMM*RpFs#6B@dZCi?k8$Ow8#NT&D>G#uQ9{53iPm1 zAcM7Irt4&C4UF1SwbI9ei!cUC4YUnt@O^Z353vubdvEgl7fiFTs4(^0RW$hmjL zv>lp3Q9M2fb)*spWIRP#X3$h)Hd_o+^qG(H7VzeZ#icZKf}fHR7c|^B7KBUIS~!&E zjzbqu?&v2bLscQ>J*H0~`)jggndZMbUJNK05}Y|rIEfc+FlD^-UQ2nt%|h;?UB3hZ zu4JTq%CEL$)x~YkE9i>%T3{o>$R}0PSBXrikW2 z%+aV7<*7ZQ!TI4xpJ#JiTlON}p1%x#AS;#>lQt)k+=8YqnVywiq2NaeUz?k88H)VVasfGxLr%r;9pSf#6 zia~KG^jn&lFC@KVw*q)EyQqFG7);Z*i*&m>WH?TwhD^h;H2K%e4%85T2yc!dwLwk? z6TM}#nV`^~qF7!pW&{ozYEvu+yHX8VId)|xCYIu*hqcoC2x{?GtC-r_>`0^_Yd45B z%wV+~sHXebEm_R>fLzEy!Lx=z+geyu%Nhaiyqj-sfuWh0@hKX zW?*TDG3f|Qz+mM0KmTVVi#mqf4qYX|vh3)`E$+mS^4kzjJsQAhI&icEAO;CYqeIP! zE(Zs^Ev3Z6hlQQ477l>}>*jS}@`XV?uN)E`e>$Z&M2y?Z7>4GzCz@l3*$ni#LX`(OsZWXqaztdwu(BT?t6)QVJ5;|n3 zPQ4Tk_W*+d(hbIIVRzTI^S45KR4kXzbjo!5$*I+IjtcB83s{xM+*jZ zRQKpSKx||kV;OMH3ovpyNKEd>KU_hy2+TC|k6d73**ag+96OEHY=6aa)7qg_S%0MA zOr1$+1|*n(q(uvPW9)C3z%Kh?JU)sRE1buSC$ljwxOYsq(tvr^@B1P1TtM>q`GY9} zBa@q!zhM|{`rZaUExw1nU=(Y}Dusbntm^n4a6f}X z@uV26Tz&T^qn1F%HUgGL0}_uRj&-B}rgpu-4x&-RDtKShG~;x=3P~BXMB&AzCrR@T zme`Tq;MJ0BxU6a1Q8wKRgbR&A6Ii4;w)v2pDtSfX#1IY{+9s?ZGXn=d%g4D&SHqf< zm{bXb^}xO~oSx0Lb6k}y+p&O}O-vpXDO}_yta7Krs_ zT8=T*DEk&l{@Wl6nJr;>(zNYmE~>E-8I+c#j=`S12c>L$0yTm}f=PYR0IyTW(24*w zG}d(N0x6qui7ANm>hHlOFr{vrP69Fq={mh7?BdmDa7@5qIRQs!`P`8JDOnFNhmOaD zJ*ey0?{OA`Wo(D`E$mhei4EW8=&)0csJ#{PnRt2- zqP`@Hm+plqSwefTNSzqQmg&;0a@j7DDh+Sp(S&1s`6@pS; zj^|0T1WM|9ccwlxJBj35qFLdmodjJ(*drM_Q|JrB6Me$cI_hMixYL44Q_QH6LzTrH zibgBo0{Vz$D2qUWJ8PseeqwaUK-LkV_GRQCes{6As#{7?w6BxsvasrkcA6{_g%-ES zMcn+N!zeCbAEyq^3jPzjCnUCNtD)fSt8GHMZKA`>wQNpjeh{DHdd8bwWtC1x2()gb!tnV8~k@ zxrqz0uC%*(;xg)32(WeZc(1)?F;hf#mob;Sk}Q#?HmI9^V8w1;-ViYKi>D(1A*w0^ zQHW4K2AB3l>e7gT$--1%%m=A=X@u&ESk>GnyDP(+w{$i%mx;}1XsBYQ>(_JQN17ca zTS+C!)L@{(Wut8SRy< zK%|%{@r7)P7%@I-TLjv72n(|bLc$v6EHS@+lBSgcGO`O+DT}y_GHop4Na5_UOjnip z)-lg6Zfu`e!1GDSuWfQl!W@Lc@&Vms4T{i&*d;DDq+75s^0!xyatIVa5F^F0bt?U& zt!4d?V!U}m-(X6AAyjhPEp z4S-rQrsnn-g9{ey0={*{;*dNukPU%$Ru)!^C3Xn`!_!EOanBD~sj?k#JXqT-S~YA% zcr7^^Bp_$cLTE?l9JwsCtYLC87^t|{J2ImRFL)oOe#Sl6NX}O=BfxhiC5#-7zDDX-K;|?4y7QYwaWa7?aP9OWF|ecEV5mXo^3<(kQQHl<(0+oTRp5w(UqC zH#EhI8rLc5uS9=&NxPKwMQ+mG_|n~tGICarunW*Hr533RsOsg;IwoTY6(4U#IaX^8 zh440R-Hf}IZp>Jm8!-$nRhb!si`qalpd)ybZ7NZ!#&57Fd8ArQ4?P9AnD2m#2fP*7 zUPn$E8K=1l6plQrmbt9STx3)`I@Vh?6K!pRv~d6ce8nP#nY1x9K@hRY!A~^8oDE=A zS4P^t)U)yJkP}=U3e@y19_-GF0=v-U#Yz4N%SR85jO3NWX7Hln(cF-L#)c4%vwPff z7PNikR}@~fHX$I5q%@Ku-5{xyNP~1q2$DldGeaX%64EIMNJ=*&4bt5VJ>(2M3@|hI zci(mYh4A*T63=<>Q1M zJBv7pI}wP&Lp6T#Z@?z^N1Vbp!E8?;eQgxV^E_XD zM*KAuI-Rlj)GXnmt(5{;8pT5q^(5bcTRb+0O1Z;7o}qvFHZ7YD$V#U8i!1T;`%voK z8@eGML#@QG}%;Avf$sp0hp`2k=v0>R^ zFn_a7Ef)MtjpkV_zsTIFB#UHg&gb{IKs#YTBsyRg#}t!oZ@< zaNg~1Xiw#r(?+(uH0V0{MCwYg@w)xz)jr?5Zux=f)sUvfr1=d^mtUc{|_hGd9K`v8r zZ5lw0J?Q!S7n7L5+W5}P?7z0x#6K6@kh7mIBS6n0n7UPU5n=<$i<1XrPam&`alWfd zEg5xq5FJIH+qo^8DFu2cw#LQ$^M3iw)&U1taBShWRP=r2@t+w`Q$0lH&+KzclW%1X z`OmGR$`xp2-|$=zojobx>3+uVTv1&g{JKX~3N&;>z~4YU8p8WknC0d}!VcRg&AQv0 z>A12uI(Y_?=q>)|B_)U7hq9*l!kKd;*Rm?=3HJg=y{)R~SAwKzjTrYEs1^X1ZR1sqU6QJW(h>3M$+~!f><6Sd3C|wZ-uxa$awW(9ru|yu z@vTfiA}+Q*b>fE7C2q)A0YYH(D6XGRE3Y@eyoWGquK&bo`{O`<$~~jhp>~3l;zX^W z9_GlsCK)CFXkbL@f4$EV_ldoD#T)Tfd>mTo!b#?*aw7Bxhoe;G z_e%q=`Rv({-_|b`D@>X9wtr5^6ULc6Ez0;~Ra`c5(4Vm&($VJ_;27lLLQUQxP~%J_ zG*~*b&yQ{5VT8ncVqh<%>U{B!S~E@_Di~Sa1=+iJDNLTkRVKK`gp=r}R3szay4QH3 z!pci$;!o9_W5))uYwjQp~fbO-4Zt*`9erWIFjyCXU5>ovYC5MGd5rZdl-2{RYW zTN4;RANYX#cpoT{Z)se$^Sg=YLH69t*RU0s+DDcB=Xf^sv6vf3&OXQg6tMZee_$(| zmN;Pu?{`B>#2~;-i_ws;K)}`GiNS6Pw_T0<-gvrdp8tHzD?S=ENv%I`yd3Yui$o|s z+G!IX{t@9k`uRaLD?@ILRKt?w{==2!yn!nL^NT)#&pFC(S<+wX4#?ZI#T9$aFLO1J zbEh8#ve()yw9bD0tLBuoYJTw9SNr9;Ok%j1afVQ3ess|}NKm)8 z^hw8KpWP=qiLVd=$~jcD3mfYnR_xZORsB-70 zrp-6Iu2yI=nXKu>5@DCQ^Tqn;Zu{uB6V>Bho2r_3WZWzUnVX!HHw(&#XozGz0>hhkqB<8@{8p6r$b^#1SAPC0|i` zM%sq0L_F3c;`wPUj5s=2P6vy@I+t2niHf%(Iv#u1GpQZh^0!1pvgvT@Rhk6%?$Gzc ziqx5WJ9E-P6+Mcy!->kH%n0g_96YQ^gAXYlnr-t1<+QxAKW6Tu@Py#qwgGHzd^nCx zq)ayY#>{56L_#C5F?07fF8_h>jz1d`%o5;ZB0>~lb`$-cq=%_#S$W=?J?`VEn=>-x zn5wYh5xa|?T7YfyR!I@FTp2NO#MyHPrcQ&u@BuAe!Yo4jEs7X)g!d1do23cQ-x%5i#elR#D`H-%*GM?Z;S8vO#+>y}WF?I%iHa&*iVV$Nr4|E`?dg z^Uvohm1ADD$Vox`XA<$;xK61|9*Ni_FSN2Wwu@xCb>o>+Cg_-m;s>l9v#GV$4!*i* zyd0Aa-ZR$lVv>e%<7Bixjhv@cx}Z5Ld%hD5a1<%?L9s<|w%{G*1t#=Ozcs;aI*CSM z-?|izh3-4}m;TJj6`+1)`e%%j8|rp=VGXhTQhk6GI8{79!Fl7n*Yr;CMWJof9W zcR}{3RC?{75wcP_f+xBD3?sCop{2bN4%0H&lO&Cuq&J4mu&VLb144Ic4OtUg|2_v< zsF#_M?=Ek48Z(`DleNzIkzI@KI^K>?eImmeYhlfT50u^wet(y2*iz4+&nF}Bkdu|5 zpuXE%r1zbPBJI6>2g{?PF)?G9-J9=OT|cp9X@uKP1Fg^}?oPH{6Z~2iMpUwyRk-SI zfSn8wQOQKusYHOI*9_BvgTM{TwMZ2;b(KUXwfDgh(cgI0j0R+HQZxN&lQ6E3igHrr z8NVOr%!;J8*y^WMx5k4YM;fn*YKHivSn=RS`{(Xpw+gV9CDCUQXfO9ift*jvJ_JoK zsrMwfBsZjE|FolF{m*O!y+s`y`zkbWKac>eHuDMO4 z`sA*vCSun}^b2{0zoU4keC9@mWaPcMop-OG;O;`a<3g`%?F%|JCON`+m*FYqurzgF zQVprdr{Vj&!PH4!CR%~Jj?a@vD6EX+G}bS;GdVSBGtERVoX2LxY&DCPB~wMNf zJn`&BbTy39?MDz;Jx%0uCteX@4tRN-UOt-2GqCOkZF_m$q~Oey<{0p{)hf-6I8nFl zv6d|QM{sRo#}k$^HsO(J+M^5{>W28e18uKV?Pp(;-ll%AlvT0*Hd84sMZ~e7D;0>< z^v7l1jn1gY_wd{2h$G=XGQ*=JJ^sMSo4=Go!E&&HaU$#bIq}=C*CWO=F7}k(0!j_` z!~z%M2JP2=^oEh}&F5iTKil0TbJq$qweXd0r`f*~R0tRSRhpJ$dy+ONj>Ka%rD?CX z9nc-XaX2B+z{hi~eA_zrUBM>mb;-NfTnoFiNfr@zi?QDtymGg}FQj;sE~IRU7-UnN z4Ws(wh~gx*&&0gEA=#~mysws-x>iMYJu9W6+W0w~nRo41y?bNnWcqCM8$87CMPpQ?FWt&%76*XgjN8n6aq z-R%mHpIZ`%7!ovAl&S@U495>gII+dKT-Yq(Hho#KUmJ$#dxx%~E20ND ziFfB3Ry27P3;v`~{Hf5BUZe5beST4$)a*!?=lD%Sw3>3|P}Lc~bCa0cf3ua3`g3L= z10cl5%;UB2r^J2yYK}GaR8dAOUWBn^r*=Y|%h1r%>_-{keZ zD~&wBUABsd5mHXsRr{p@$Rdn2XPpgGWRLm7qdge0oW{eU%jg{3Hp^=s)x6}K_#uUTD9^QHMV)G z9oQa4er)$WKX2%-86Kzi!VDZGu65qDfy-R)d*HRWS>#IjNP(TCykwZPlOBXb#z zIvckl1_f<7)@V&)q7r1)t16m8cEWg<{LT_@N|^iQHhA|u=Z9E2>Eqq`14Pqx1~51otM(P zuUy>DCg1XiOr=L(;yW)sx{dQ2Ff^KoH5J*44DnK?*oi$AUe6GI1$!5-l&uMv^SJ*N zDt@d@Ui8sIl&$SGlxU2ue9yI$0MgYQ#4ao9=r1{ON!ps3Qq1fdITOux{cX(smrh65 zM%`*{Y#+}fW6BR#PlW~sn- z0X}-pe2bpxVmfT0>us`FJPrk>KXPKC@SfJs+|AuKGnz=NrzU((U^f+yxi5@ph-R;G zc$sA>UZ2Q3i|ZvilPF1H8o7QzoFuGK15jSAHE#IcKIb9b*hDcxx7{1jYbER8mH}q= z(A6xN+xVxF;o^5F>V6b9MR@n@Wn`&qNGTNyeRFi-Y?Qet%AD z3@R4+wp+cp6jbO<9oHJ&nyE}$_+JFC=!iMlu)t^yMI-h#w7%KM?|-O0sx#JB$Dfe@ zTY!`)pjQCAPx%g))O``dU%SxF=GelJtQj%W|2$W&3pTSG>vZ|B*Y>w=z z(l@oxu5`)y18rT`>i{>0I>$lN%QP{Oalbz$hSOf%&Qk*YGkU(JBeCx~N`yIIw0-j8 z{SbC*0acuP?9n-zw=Y?|PK||_d?$UL7~>VAtf1fgb64U$2`g#QY*I6y z$fwh7q4EnZmp-p$!XezV_eJdtL0Rp;2$y_nm{+;*0-~yn68;Lk`cz8)Arrek!dEy? z()Hk`z_k`%YuTdzFP#4BbE%j*(p~qc!$JegG1@Aql-Oy(v24RLop*)r+T!76=fnGf ztfi07+a*e2S?jY4WIuXq{uAx{A!)$t_Sxw#oCzPs0#LCgZVsCv#E&>^i8J61iqE`o zAhP}~LkQB(5M6<^-pH)zGEY;U^D0kLW5LURCb~(=N{ZTTK`!d`?{g;_o$eD35_>E? z+}uLMrEqjZS1c8z6!77N-zEnX10;&ctz=e$mi0)G2*r`u*hZ&%O`M5Nd$t-YfiV9( zOjmHnP2ej9I~2Syzd+`X^i_J(OehN4Xm8(!9&VH|Meo`Nnqt~#wlDrywDL|X_@+$P zq=1w*HX%f^Q$G5cVj>?uq*5Z0cQS^vq)P>ac|$U>}#&ZhLRCS>(X>wCkrf{(i(~N? z5lzmR04zch-d<_)i}xdU_xkI}wE?B`wlOu!1TSzn#rV@Sm-!>Z*abawZX36%Phq0K zruPgtYQ6Q5F0(IJu$L-}{t;2edvZ2@rJpL=h}oA$trO?C2B^T>o(XKQB`lGPQHc2T zSE@%$0A(l{>l`lz7viZEgwHEfX&+(&*Zye=7i(l%>CtIjBZN|l1vh0a(tTh-FMNNj zUA#T}B2o27qk5qhOXxv3&KXMmFN>4__u2H#^MTKXPxw82OUcDZ&)~Ttv`~bgm3*_X z{kR|l0o_4e&W2dy@H;JmJ|A{xOZm;3(Xuom0tUge9D=?L&o=&-ITHh*N2Yx492dg13l=0G3O ze^0}^iKqXKuaAfS5^o~XrWZ5mjjV42xL|-TF2@wt!0>x1dC>W4^vW1Q;0B%x0XyOU z#{p8BD)WOE+G_U}l_7K|CVLxla&kLDV%|?E3lRTDcdNx5hl-^?In(aN%xN}W5m0c? zT@hr^Zix_B0VzRN=jGS8;sOuys|e z`nWQ6-{9ovqB!6DHTq`!s8DKQ^**mMc^QMWk;V>y{q`s!z$hjK%b#L6+D}J>9|;~X zo|1|k%@_>7LO`zz4xT9?S7Mg1?~+Hl9M^kV*{G6ynXzJ(cHHAW;dSf~^5rmd(pKZH z`?bqKZFOg3no}2JW<7xyjIMl^&cSq+F-HGs108vonGJ3~AsVtJ)~G1hqUzKn0M*NO zUeKAWa3|>*IpX?(6pKmahmg-@llA+?%pDZds>OPY5IC~ekB$)wo^o&Kn%^1;#?Te{WznZ6>2bsIf9Pc&F8)%%#BIh()}upxB(6SeKd-%* znVE!wECsz$$rKpHyx69h@=E15fp0VIu!p18irzg-J;ngQIU0|VD!EA8c0TI5qM0;F*32(TXpJvp{W zka6yPc1`ND_0+C5jBG+Iq?u5rdXOq81A&{yZyN+b37pw990WH4EWy7y>w@^C%8X8|QLLn);Mf{h@8F<= zL%$}&*+lfIlW`x6i?>0`vDePJU5pPaHh$-&jFeQkwd8Xb7r!Y^&QkYI@p}KD5FwAP zm5UHRHw(d5cez&owegXbi^sd=WlulZ3CE_-n$2%}2C4*Xn|DvDjQLg#YJ@po#~rVI zn3)|{kX0fRrZu8=@|o!n%z0%kEjb~H_soL*OBPn>&tF&>#q@c?ah>_4n#>osaqnE9 zc7C}UCo+#2Kl4x2=dL``RmT?EDPN#-E3wjppLO}Ens4RVh5?DV*@R7WC?D4f%+I02 z+-hpTo-Grjt1aO)dVM|4$Jm_uGu?}X-W;TiP!^_cVi{KMHx$!IgxkUR0jz7;&JShoqpk}N^=Co7uCjD_w@gzu1ApAp z>`O}eOS-Z$n1r5TubnTq)Tivd^LsGO=&`LF@(H}nFQ>khC*duT$#CL~`!#eF%&5Kc zG*tQDNXra=DD)^ey$2g_C>Hz8c`#!rU>NRhc0W1eU(geK6dcu~ew6zUhcaz3Drq&q$QN8*6C&LI3A@tc@N-64|iA@B+B_X&$y7#P57EICZ>y#Ma^1oFBCse$t$-8)p+FZ)y&D>7Jg*aWl<=S8jcV{LgQGgVg_gw3qFMy9K?@FDO{!?RmQQvDau)Mmy9r z=-ccR=VvP=UZ+uMj_-c=W6O%xW6!&TlY^33TeqdpWB*z06V&du(_GLB!T16Sl&SV5 zT{>$Tpcdvyjci_(Oy)h-F7?*)u19q%FgdmiX34-~;+G4S@nt(*H)nq9GU!K=<11n8 zV`uk=bx7HiQ|86{{=wV37&Tl)oxe+0~G3FM7N%WXKSEdJ_YTbG@^)mYF3_YR>|1CYx_|yCoZ8v%ilwWK1C;9P4_~8?TpJL93+A zgtFkB0K7S~%kb;1{7n;?2UU`@#wtf)=!?%!2?<%%4ktES?mUASLjwHtn)#2r?K>Cc z0`c&El2-oLK%uaIB}6%d%BqW7G#0L%GQ$)5Lx$zZKVjMUWJ(t z@^j1lWsJ@U+PJM}Zm_;7w)4AD5A z6#;N`rP*~7MvF1@^kdg)Ym0vptT0VU7t`jk6y-~4y81?&-niJef>j4p=jW*8PUXm+ zstrQl7?N#v|HTI>Fg_}zBuopKeQMl}$_gF4?3Y}rqa2+%g;KxTn=Hdd;23{I>|f&f z?S?^jAdSj(WMiU#eE;6aVvS_X`w&|{#d6nBjD5STmgbB{(qMNEza9hry)?MTyEZ(P zpDN?Y(`~uR)BIvRzJ0@U4$s_%D&F2CcHz%X!GeJhXIP@*F0c|Ka2d$59>$?`9KilG)o~~H0(`d zg?Ijk)=n1Yd71x&UlZ%d?ncZNJmQmdV@AO;XQGGubI5{m1*gAT1-I8?gR9&7xjf(NeohB;FE%N6a^#dJOClsBz3VK5j$WTDxAw5kYJ)W+#R^fu z@U|}qRiVJiJ|3ce4s;#R`JSE*47?zKJlcvp4~5ApUb|+VB2m9)$9XW~Ou?HF=6lE@ zc=NUcjP~BeAX~d}LFZ0j^tROFggoSarc>dv6@i}PF!^Bu+$D#EK9s{ApsdL@z%QR} zq#yxv%!TNGtsw6=kfU;CK%rV_&``E6>o37BX#}xuB#UKc+xZc43BB1^Pf%!jH%lI4 zV{li7sj4fq4$%>Lj@%w}vLh()8a?E}kiEVrpW>TfVj!-;2y{-j6W~@7>jJys>tYoX z#P@ls12RWM91b8{VV19W&0 zyF>;-jSeeb-wvbK&LD&^bPHoT3;M^{Wa!xvv`553#_MJnbKRW`_Xq9A4`%`}4;CI^ z==PcqIS3}k8Z_qb@z8oLi;=-h&+u%X+Z5jYZABx))jdL{77$%qEzEQUKHKru-n)gg zkW&`SDkDPist$-4SzZA9uTj|mPh;Vr$DLvu(g{kh;(V zAM(e|e4D%T{z4S%Ad;K~cy-AK@7(R3A;8?&C_HR+C&Iz7U;uJjf~r}TweW8JG%gr` z+Ed4+-5IQ@F@qEmy=$ujT?Te?Wrg zX4++857%etSnHd_V1N1BJ17cbs^C3E&WgGX&0I$u)*ss`jQvwFUoFHG8k~9@= zeqgR4AepPtV^R#d_S#AlbMR#(t@ z+$YQWCj)fiF4c1oo(Xa9xep|lzsQBZvTlJ#Zu2q24?3-HP?(^B_M=CH9K5i|+cJ^+^|foocB>1+bv ztOtgt^-Vppg0g=vh~= z7ZeOCMkCkIs0DaX1AGd2KLXfj3z`^aeH@Zu4cYq!hun4#%`n0P=OolI4^SJVYb@j{ zdTRYLTwO<6YW;qK89oXDo*hR95_EJxOTc#~tqSN$SvYE%6^xLIXRQEjZM1TE1Z`Rs zT3Z7#hg6E~SK(3{SNE8kWz9OwXfx(2QWoU=vjJT1SBFH6O0A1r%&aNgWlv#NvXd1q zGD2Xo@W+}?Yp<0x_}wK(r{J1@srQ_eE)#Okz4dX#40&L2RXBz@U(|*89#)aZE-pip zQEhjJ-I$a5>q6`6eRUSlU@mJu_;C{fJi$Xe9!C3jec2JPdB|Vdd_Z4@Yr51i2CIJr zod@DVN5fIg59mk6WF|}_U?XF+3lY&S1bp=c z8XI2++PVdx=4v6R8S=u@&SO>uQ2!VllZo-#neNuLG&PleoT(z0yS_DfV$;ckXkG%z zKS05a4^%?HrDR4S^J=-vyX8TfdlyuRVjwco)jrK8%}I>uGSk)2RW~->S|v_C?Jnkp^DcxV(5DSLec-! z(0>Coj9`^V5Am^fHoyz5(Twz0FipVg*P*LxEbTRq%U57z_XBJ9aSR8Yy!SpGYv@&- z{IyAM4Zx-V6aejH{R8a%GR%tpX&7FY)!rTEVIDoUOm^C>yE0a4$eqlM^1aHhg?qfxSd6PVv(B_ zOB)J-LWicS;t_?b+i24fStAEz|twNZW1 zf_7*gJP#fMU7M7F$RLDn-Mj8aA&}+m`N$tUAVjTtVqGM$@y!scNFj9&47z?||?&9Ex0-qo@`@-JSUjqDlfQjhpNfK$vc zcO?*4WbaBj@a|}MDL>$*5VM;*sYbN-F+7hsWDS&`gFdJoLx7OY`ItpLHvhuF{SsFO zhQ*MgBkd`4aQNdM#1Z{y!&1n^hz6H~E|kI_Z)FLHId98+((vri7U7RG^_p{dm&1y| z+&-7(nogOa`%}q^g)y(J18x-;nZf(l8#W?DdsVuR5BL80E-17K{N?vQf1!nCg$WY{ zg5P;Cc7=)RV?V>k6nVd6uKv2pI;8=E+&0vOZWJ#zaFDabp-#GIo#zn0P|R+;+7ys2 z1kG-Da|qW0Lg7w2v?KmLen!EN^L=7Ws}c}JZgFdap1Q$6W(ruD9=kj0Cf%Idkms2; zm}mfMLisrZ0-<19f;19F$ln@3lRUjl!FK96V}F9Cpe9 z?#J4^rb6W>hkm?{9tH*6i`j!NV9-KT8g4m@h0v=u|J%CqLRJC>GaGZ?+3x3&abnr>T-J!+J(W}JLsj*t?-hGxZj13Gs$Gy zQ(gX-7jU|FOrKGM^ZRgJ1!N~e;PuU99ZI6;V#!I<7vVtHvuI2sdUT0yGYEi(P#qubKwA(M8 zCJ___%&oB`h4$VdXJ)3ZF$b+49e;kFDGDZ`ACncXM`k+7{NImCHny2%po70_D1+huahR{i4zrWtAkSyqs}SyV(dUl90VwsKFfnt~8OwI4U5ppO(F?Cs_I}}% z`FE`Jkr0_Xha;gp18|2HVd8ZvaQ4lB%W8z$v3JYq@|%q9u9$TL#H-h!K_fW>#Otiq zhL+e9YXAoLr#3DVo32~%t8WVyD30@5i?4gxo10Ty=r$ z0l(%Mi7aWJV zXk*qJ{ld(%;Tx0Kf9qzEmQ4gU1V2useD1#4SfZ5ORs8n6y9*Xtg8Y8XSzO`QF3;qS zNO6kSAE>P@r)mTh_z!m@gGEQHO({wM39DKF2U=oK?iqDJ$8P{MLvo<0pl4FXc3`}1 zS*lGSd)0Q&o7-xDGOljwQ-Xt}yTiDHn_WpXK(p-lAL)sjCGnfffDE_8z{oJDs( zt-z>SRv`}Tfo{I2&c2%V#I_k$WjxnxJ8kU+)>jl&#b*4JgE4on@@hUbzDSX>Qt6z_ z?B=r1(J(<*g&;d80tgS$OyAd<)6ZN&7<>AfrbZG2jbFmMgj{Fy3aSm~SqM&DM#*;Y z=Usy+2@>PnbmcbFMsD`*WZR#xu6vYUGnj=lcrUqk$9-5l)!@8+USc-0QGQdurxoRaBOaO8f>hWZJV9x>3=z?Oiv1u~t zo0*~m#d@}LjyPb;-FBTn#HG0OnHmIp1MwJJTjS0MUU2{>%DrD|wKT2V^rTw1XN`I= z=t8-JCREr@`V1XB@S>5Pud>A`<)|b!nB}NiS*x>nPFjE=z1|tlJ|>~9|E2q3G*gN0 z5(2@PXzz0YwtWRWPcafz00?~8mmlKr$Kv+ztIlI;Kr8l1u!ek?g=Za>`+V-yfx+&Y zUp&4?c#}3@t;I|ZLNWzdn{kTA4L&Vjg0V|&wg%^p1mhXihVp)#Co}=j5mtZmh6P}e zd~ff6Z@#P6w=g0!9xc={gW2PScJdm}t8o@mzqrbLpfXK)%T;L6!bs()7XMK` zE@YP7O~;>jh3vgs1kBEbv+rD+v$3tboy}Iu;qWSo2I?k8UT7a@>!NuQfT`Xad9kyq zy-~Pc=&i`paP(}-hd*Vz-)-)ttYnh=vQPc<1o^4kAm!Gis~5Yx#8k^7>nDQ~_XPmd z7bs{GT?sD#lEn0H>q*DVDIMu9w%BF$9HQa_@R1=(Az=+D1+j+Uvwz$D@H1OnI z-0oQK7G0?2^0ymj?Z#-z&`$X$TuU{|hYB3_362TZ%dn8y-}W490ny?r*lDIQRUwM_ zWYgjWpOp1OH5w)Iq1T@boad_@Gq|2oe2YXatWtp}va-#e0Vd>QtE(l8RLy<0W66Q! zm({J^%%Z*pB8Qbps5PR{!%>F>LierXFZQ-4@?otKeUMf5e?o2>Zl4-t#NEfYUL>&- zuPI=|1FQSbU9H88rO;-uhV>@|y@c+o4P8U^_Fj8tuJq+$V2bZMHwYwdiFl+k2UyKlbXiM@q)6 zpGW|)MQh|2F)^JNBHt%JzAY9Y{QQrXYMY6|E3?-cAVqpVwDC?e*HBUWZRQ~Tj~aZU znF>ie&IU;@$vv_E#sW%+W=Nr|&n*ldt~y1%I2+})2*$^skn!JaH+A1I)e`y-r znawnj=!L(;&Rp$w(sC-#%jX>CRIci#Uru6GoFzLBS6$JdqrmR7G`M&9%^b!1W4v93 zxZowRzu#-7)|C;~RV@ ziER19p6s^i>X?eARn4*T#Jx}cYmKsB{Hjj#u{AicN%K@#mD>MR(Lp+QV8=SS;1y6z z3g2*OMg*|v=Q=;KFXp%yxuV9i!Y9}@m}opy3b!pv80yHMNDjWCc9LUQiuB%M12e0L zkk1hjT;%^IrJq}dGrr+VDFX89{>jEMSDr~)PDU`sbsc3?(uRIgcgkI)JTk3mUAd3A zdR6ky1#G6gFDkM3A^tf)=lQ0sqx;O>Pnf>pwl=U+?5m`gtw9)}??Je>f9>I6(~qm? zrp?a}4W0Cu(9wkT&0_ye@zlxC?WJE4;q#Ezc56y_-Uc%!AqjiV8|MbLjBamNj%%cJ zDi`3IlxmXZvo-EJZTc03jG;X^_)6)-HK}9qJ`eEO%eb#PYQVp$LMT(AcwCsHEbsK^t88tx+N@RJAsr#S69^O zjV*^JhqMKJEGO6NtL^8+CyAA%2_NI#PCTg0h7x4=_Vn*bPRNL-YAeI|AyTpDJi8CcM^YUuP{uV(Q&$-R3dYdM<@}4C1#RWy= z`R172XA(>+pLC|sO6{LkZ< zmE&a8u0cu#e^j56Tfl+z$XpI|@%Hj}pLUL*=W2QahuW&uDkD+ru|I7G5$=6WP&Y8Q z=N*9UzfguHV<~N9s-$2wJ;HHcMRY~K*Ikxf7FIX2*=L~QAOdFfth7?S+m z5-*BRz3JP%nP%qqNOS*EmL}LlvV{WvN{qVIn~C&8I8g&`4{MY)gc!vf3kTZ0jr&^Y z=u=U3Mzpv9#5*}Yr}Uc2YNsO4;tDAz%Oiou;bk0Y6Q@q+U!M}N^lDKgo^o4^;7c}P z6EKGiGewnUGJ8Fh+hUX7WRqEElV4?%U8eA@e&bhRt12(`A6r$KQP-19{G58!3*V2u z&p)g9R6mA@Of+3_h)sTgO{R}c<}aIK51VY4-tl3CJIQmy*9rO(t~9!XPZ(#MO$U$@ zUBV(psoK4JRKm#Xv4W755GwI2qAY);lhvh6CSZt07~<_{QR@V;)OWT(_m%paZ8TI=kQ1bCh+we5`m-1+};T)#7 zEw{RyKK9&AT8+OpN6AF7Q{CU3dHr#r|9<889YAG15?LLoX;MkkJ!_ozkkj%;h)gNi ztbyJj^;hsSQ$<4yq<8_Rs#2w;`D>HrhuQEQT4s^yEjfTGkqFZV7JhFWm0TK|(G6(g zZ&Mc4cWpCf`^tQ*=E&)PvBnBbm&HHGYeGK%-xgQM;g^%c9|E-}hhz-bE(~2QzAw;a z4MT7PFUs={#t@1+&|gUU%ta;RQnZNwM>SU87m25Se+xs)g@Wm<3!r?4$)Ehn&u`m{ zPOL*fwYgE^ck9;2i}Z+^xAbE4h>cgibEIBXdcKJW2i04@8YPWm}m2EkmZ_Lsmdt;+IUE8$w zTkdbEkYj|&kcJkLye$?S{;elhP_p2Z=Mmr9nzJBrw;6cWG@2U_9s2}lhg`GlV}y~3 z|48mDagBYI>bJ8#gWJkN08hYIzWrsS;Dh)*lN)#DJ&n z>sNUujEZ;2LNfGF%K1`j2pT@Ts&Gj@fH4V|9Lii@*cci!sZOMGsA)U;b?=@|Y4+Xe z91$`f8a)=-rrlI1*|6gJc90YlI4B=?GU?>nCK%GPDP`&Po&!Ajz`9^?FUjz;RJFb}vkp}@!J9&t*8L4eVlahsUxq*8OKVSVYv@P0PFBJf$2;(nAE*t6tVj+s zXkc*kU9Ni1jpw)0CdF6xjxur71UK3fxJZK6Ja{Mfy;FaaA}cI2wT zejYdT>5NdS)zS84$a=?N%ydsT^|r?XjK1aK+k7Ub_(AS9jrY|<0PemuetjNFi$IM_*nSS)K>s|a#~*G#S_yjg;F>u5v8tOsq-fQ-m#G~5o-J2qHK zg4hHqd%}mv1Ka)Y*0kF@1tmM${3Yr-m)gJNgk+T^Oq(lewIlj_vMqCzjmEo4-_l7X z=4R`Qu~1UCkvV;lrIc9((>WWr&S=yH8AE%dJARtw^I1(CyJRiIWv{;=V7}$ymizLB zV^c+%x*$ULiq}e zAX2OUx4@lZc>#X`*62}F&`?kT=7)rJ6^49&Bno5=QNY5WUOggC&XE*I_e;U76%_si z1}jkL5rO^k2K&-g98t0-jr1RRU~Wj{Xa7$t#ahFfxNwQOBM$u}8#297lh4t(p-Z79 zO#r(g-YDIsi#l}boKpUW_f7_vSCQkYgQwiF463Vr>#WFgb$z|Je}o+7?qn=rziKZ2 z?d%;?CJYLCRg+)#M+KBaaW)F$aqgaC|0@!vpdeFf)7L&K-n3!$QtRy+-YkMR=Shvf zqDdCW&ZT0T{%zS5?W8h0+cYY~cJsQvXU@U8fA6R>>~IVC=Gk=)OP&Nx9(v z%H>qks~XG<**SQ2q|TWm6QmnyJVen)bnmSC>*?QVozRU=2!ALij_zsPTYPb+ApeWX z`x!oT+4*@)Qw39Qe*ufE=7BCP(b3!nNnv9Y$(tLVx%*F9`;ggu1u`S?fO;@VKQf*8 zL8Ib>W}yl@dA{vU+8jTWq)05z6bm9CjSmSm^=lv>DapqQ<0TzVY&G}qvW>|b?!hWE ztmZy6hlnc_lmz&JbV=-3Id!brGDjm~iZvjfbVS52S9Lp6LTDM@Qj+A~{JfKE|Bd}M zpkW)wY&tQkfL+S@t2cu88x4Jj%H&&G&R_J0KK$~bn~Af5N>9F#X3m_c(=(H6+>vVuqUuWLpP2Iv-qo@^8&p6BtE90U zyQg9XTA7$vBW6-A8KRp1O5)gRN>NPkX7oslB><+vIdNtkG$mikRP~E z%gqDI5nnF)7?yv#7}Exf&>RD23dc3EsgQPBZYUfR5TP>j3L)ct6rUll78`{S0QEQEGC;{E*YSVK}O}JnLB29?s|~HEsw;Qp-2o0u&@lX4LK8U%7}{1;#Dvb zbQs|5EepubQ)AFogG)6V8a)SN$IvZ>@fk3UKwATcBuNRsaP2T8jgycbnlUPW;71Dd zo947bY6e5%?;Z+}Q>~>(t^AaDlXN?|3;SN-Xc@0Gc2?%Om$Bt3`?3nL0h!{{;EKk_ z(8SDrI2;07OdL;L1-rnsl1uOkneb;EL%Ue&?1@RhMy47%I=gZ%AA&~a&al{dEgZ%~ ztRISasOWS6luM4@Y8bfqBObJr^$7R*FDWM(yke(<_soQrInHUWK-ugBlaVHII$1E% zEaaHs&Pr3_4?}`mnG3wKf!2(R!{YsM2#kz4e~66L$#S?E74Tu+A0PaVW#pbY*rW!a zL>7ZexL|c${18Z~P#Hou0PLfRf_TW23j40X*qMhFMu>hB;HZ-RZ8+@I_x4s+KZ9Hp zA^-d#*=<}waUJnv761$A8lX)$aLIe~g3!gSak$9*5r(FDTX-mx4~B4CYMheM?c4() zF~C&vre*sI3z(BH@>uul!+~e{ATSHZ-nPAGi_m)&1J$bo93QOBH!XH5mOY*h6mx|l zVF4U2f@{uC2jTtKc9`VxCos_Jjnvl|@FSx8!pbYU027m5*6s3qVGK`n>K>8SXbEVl zB#5e(_!Z#6hNqU+zg_HA18v2?^)r!o-I!@?JL2A$Ga1y4fTGuNl8$m}h*bi#N4Geh zi0?*edxOSl+co(k0Aq4}Lp6i@Z$Vg9Ft8Gx#H^CYju_q;R+6Zo&T`CRb1d!S;o}Hg z(Pz8|hp=H1`9k13S<9PdoJ9Qv+UF(nZMmgwb{CQ{-s!g0U}Hx(qhQXy~sSo}Hs1>CD+$A~Q^ z)@{Kp0e(C#G2C}sm#eG}#iw^vlb_QqSIaS+>=&n&Z2?bUhqJ8WR0SRTx99x@rnV?t z4TBkOWOw8rJXbEy`Y1V*ztVVq#V;~vlt}GWz>woOgdo8jb)1M%h5DU-STgnT zjrPpK6a30&LbGyJ{|Wi58)a2}ZY0Xc>0lJIW6zA!&v37x2j(3;>?Y!fIGpq92;32NalB&!bidWj* zj6&xc&-}Jf6rA`u+Kh%0gnSNWpN2=`&GDM<5#@++)xKBQ+z~t&Awgj>2hW})Ah!S> z%HrdB0jedR)$=ylGW2`*s4SlA9=A{usfRjO>9T4Jl{8cSS$3W^iagYrdm9%>zouM4 z^d;UxZI&@>Xn7zDYaB}Mw}-C9wB$+bsO?AUDy7RZz^N9dki4sh{2>oaN#SC(&49gJ zuw5?*y@IlK-o7OoV);2XZl0hC#wpSmq~qGF{s1I?*Ae)WW0)G>*HNPY;feZ=s7l9^ zQ_O6A9>lbO%^{y3s9z3xy5rTk*EJvq+TlD{D2JK<;woF7IRDQj6y972oW+7nNS)=L zz>Fa1l`fR%My>#dUIEc}F3E?u@^0afLo`!7BBKudy$2Q=oEln{a-%d6!qw#>)^?%H z^T|T{ibnaH>fzMtuH;v`TRN_$`F-WB<{o0zmGi7!);(+Dgt z5h^STICyzkV*H_0B}O6zmB^eN;r=VGI_qGA5Aw`)PPbP&gr&Pes3Tq7_HHR!|F8o9 zo6e18$Ba`^FF&PY)^8>@H?#uy@09F0tuxDA%dE+6JFj0PzYD7S&Zm>zL4o(bet}AF`P2nM5DA7=$d3b`oq(o;-ro6?(5!kb>Gx|;#IGf)0NO2!-@W)GGJ~I#dp*@|OsSfxh z>3HOZKit{QbXQMsEvkNed97~s55D$odot^uR~hn0XN*E{ANFpQKZOpx+n0=!Psnq;-)~(98vE-XkCZXC zZAITuVns%IW!*WEDVO2gan4&(30n6Xwrx*szo%T8xwdW`2Uzlv2v)Mh??x}QMvw!fk?l*t6HXXS&Uz$$tH19MW zAvWWiPU2f|N+-bse`b@5BC2V8nm8%sHXb$}GD(l2T{ZR}n6I>^lkJ!7(@8fAHwhH| z$^oTxFYK>2rk=l*3{zWtl7DM?mXmAUEc%#E_IlUTc_sJ#Nb3>*O)9fn=8#M=4#=Q; z>3#Jvo4i^7%_#F(@F}cyAO46uog`Qnpqus%`+?qcq;Qd+LJ^?-)k62e`f6c18GjZ( zktA3jpr7{M{`z|=iFlbfnIeBlVKOP8>Pt24z2y^#jPX}b^VP~vrTAU)oBXhW|yApJk~A&d;msP-ns$#Y#-pS z&?V>nRRL02{<2?oTHb|)0|57t@s0c??%dvAB!CuuP+DKI zte-?0lI=t;XMINU=#d`X4(-BGatVpd`ffq5aMq{9RcswVxLszeYjLU!eQd;?Hv6Hw z*1K`N8`^+WEwx`~wRA+__l8p=D7H5yO*cOV>p5fo;SA%wo&CA#zzi`Wtg%#cx3mRv z%8UeKtLhWJwE1PJl4yCG>XTh*Gj{5nJyot>dG0KO$dj^}(d4$}hnWyL$>?cj=ZjdV{ zDNKRZXTUq6#4`)Q;gg?SDKk6#jr3B$d~SJzXf3yVK3{!f86as@i!5nwV(7XNkBsDEJ+_omi#5WZaeR^trUv+p0_({TiTU~d>Q<$EO6tC`8>_|uuFK= zrQF7&xMvvDRoMg+0@V&4ehf$}2bg{TfJk&0%`u0hrOCpS8lcHU0g^2Ei9H%zSzKL; z&whkD38;#R%k)9DidzaSPw`QtegaPRu^j9(0>HTaXW^p*l^$KhIKAgwi0xR{744Zpt5q_9ZW^XVy+-xxKMdpJVvknWPCH>F3uvPI&(Ny?U@) z-Au8CQw!6wcB;VAq>*MpJ5@MRZdCe7o|NJVvwDLsa^f!xnaeNon3WzGoXjl_BUAgg zpNUz(JvG>GFeI#h)5NUwY2Z})H8Ux{*&CHub~kwHm0^ry+hMCiTw8d)xEq-=yoG}3 z(z2hntpXM3lLf9%-4e31`bu6Q{8r)}_E?#_C2VE&T{O2(<>|9zZRa3l{5=!w-q`)n}a=eE3_lb}sR+LybDTo_gR>H(p|qoD%M$OuMfC z!c=pyZvfN5Z<3lQ!Vlh`t4+xP)eYXy+>ONn%MH@*fEzsZamCNsVe3L0v+<&x0h(Wp zmLByS?kNsg;_uz&byL$0$YMut;E8*P!2{BxE;a^ZG1+A5OEHI5hQ#6 z>f;zI%%RE+7a74kWd(86DWf`sDxRIhDvsdLlbt-}1BI*Hp)3g(Il=ghZt}vpD!0NK zmLMzKkeu}uE^zE2^P|kQcR9g4c6&kU<%la*A>1JIqYfJ5h!8D2_62eHDUf;56_pQA z1lqZrRN$3!_%$wrRS!^@pg?l$rJKu{5Lo>Hl^P68Ui1XYR!v6t;2bQeh8PEYL1r_}6u6l}SZ8+YU!wC~{@Ryx+o$8YVbM$6XUFn@Bsvn~! z>OkWkXCQtj6J)>vWbq8d57!|oi|%$jD=mF7V{bz06cej0eSuC{zGn@d9vD_x`a-EE zh5dÃI;>WePy3^COVU>l<1G#2mJg{#h<-54}62@OySqT(3m4{3Px!Rm?*X(81X z?|{7cI5cu(R9roRs`xl|VOh~(b&xNvf~ zMU}<7R@RiLxc1^hzZ&-Sv*(DYxWA^=XP&@n;MB#(4ayhq?8$CP!^hL@x>gvRwe~uH z!t2h0yxgh=;Jomxi_z&3c;9GyyEtS${X4$%mZmYhxx&W6XW zH}CMJ&Y^W)qi{@pIcFJ&3R8vBOmtxYuSrFwahWs=O!Yoo4WES;G6?GM@|abFo=bniL8j?G$PAp(Rl0ghXO;EL;^ltUM7 zIE8Thxbrle0INcMF^6Xk89FD^PCalX^-%X_1X2OudaMRoeaQLhJujmM)!QD# z+Tc?gYu*1cF!>Cylp*JRP*nbbcA@o_o`5h+z8h#@snLkay%%Xm^?#zi4s%RC2hr-i z7rX+s+a6>_V99Rji>dGG+&+RHJ&*h@M(azWEZoqweOYbwP`?u zIjZl!ky_fo+rSUTPiqg(z&pSU{7lBA^x%{hLiO%p-R<4iia}%lfyNi;dm$;1v)5PJ zfB5%Q80>N1e<)qGK0osUr3I}XflLleE!m%ve}ygDUyaFS405LU?1ZQxUDt)um^7T) zqj4HHb7W@`5|{5ls1s?`^PA}*c!v8q(@j&yW86nz8>*6tPow|Oz&X$A_%ud%-Tjo- zSIw8E0TRd)Df#@Ry}={^x5ObUa%@p_|_ ze-;bh(?|)xxFWsR1s{d{aG?)5nx+EBBr`xPiAr3z55#$4p{o};`qy8>CxHF6&M3kc zH%tTd{$I-?J0e`T6cFh{n63tS*#w?`mQXJs)Q7-Z_58evD?K{Cb$2JQRz)xHNjRc< zcSj?jKRRCh?1@QiVA`+h%NMTxFRzc!k(!7$ib~n(k*2PXQVLV!W=v*uwYtNb*fkVN zXms^oPh9=i6US9YS6Lg9*i`=^KcmK1yMgQ2+N(W%L2D20)cE{?{XZfr>hN@dCaxc$ zB0>J9wtp0}7NCF~{oJPVcF~`p8c2Y8RfE;|5^<^1;Oi&mj@|U1t9&_*h^pOjC%GZ^MAF-SSsC#~bNT2FtV`rRkZZa>{E0l8f0 zn~NppwE?iJztsbW5XY}55Vei~FCvZoPc%oMfVu+iFOa9%7W9--?FcX{pxN$+VFwBj zOW^+2FML)y2EcXzISkd%w`#`#Y#ll#6-hSE8(2!lI`2UXi_!jjYjbJmOSI#t$ z064vixAd@bSa4XqeB1(vdxw0|e9R5K4+Rg^Le?&*;ZWr`C!*f^MYoN}$d2G|QIlF9 zNu#t9_en}I1Xf7#!|o&qq;p|PFAS{T@fJ?&d7_oIUAL(%>5Y=H-%cP-f-@GunNPI{ zawampjmxrX^a{)_Xv~pENVq4{n}P#unyrrRag%cuw{oOUZf{}z|LP!vH`y5u>u}<~ zh~g_pcKnO@qV(BKV?|S!E!op*yDCGK>;eX$Nues7LA2P*nbm|B%9AY;v!YSvvbF9y zm^-V_B)5Dw8F^Bn%DBPNVg&_U6E{mZ*JSN7gTo!o%v`I^O=wk;%Z!cPu(SRM@~TfP zgZ^{dULnqRv$>o;rHz2~BeU@-yR%W2Mv&)Zt^--t3u?b4vRgu;iE`Ykn|%s);uWz6 zWjX`K*pxCyR=!+cXpk>u8b7kACJ(}u&gy8UC`T`ni_j(eT?)c-fI0zGd063YJ78fV zE;5{7ogs+ajY%pC!`Fp|^*T@pe4tN#Mq*gaXUT9k#_~5FBmhU6M_Pg=cWQy?yL*Pv zVus$mKABa-?--*$H9If+uy;BLOA@rhio+_>e=NyMneD7S1b!tqNF+zVoj5=<&*B$j zg!;s^B(gP^#qyn6&upcP3~M0c;8uIkF=`*hZxt@?s^+PkNpBgKpr(`qPQ#fSEppPt zxbMuFpzI3;5+}R|qRNq+Val)dG65Nhbkcp_kyD64wF>;8%Uu<2wr*q`WC>-TMu>m% zZJOm$I&exlch@d9=5RtM`#kArvtp8|5BT?tZ^GP%kGhv}n97>;vnE7}InX3dEyxEk zWsGrIx3Brz@Z~bSA;4QZxJm!Xlq&wT?)@!wRM`~SVNTU$^9|xs`iiq&eg_|o61c}p zE!*_Wg7HS@EUf4mSs1FE;W4 z#Q9iex3*z0_ig)F9q!uVPzwi$MZg7e8YL1a5{t4J2Zaf>YC%O`Gu?+imH8-Q)s~Pd zN@WZt=dZ&G@mbIhyOC??-q3Qg+rL}evqnQ(JFuEELsCAfVd2Elm|#i#*!Zl6qgqnK zZ?!d$Xc}T~MF4AADpo(gf-gx{3GY7_8G`i$MWaGb1E@oldMw{tP`SvjA#R!YUaZK> z?;i@~!Fb80#y~JATa{4j_hVXGez_+{fw$Y~d|xu5Ov+4N_Ky=xm>Q|f)fXnjNDGRB z3==%%3!0nHYV@7s8HiTI@|J{~F@A%y&KHjjObhjXHDbNCL7)PokI4WAu@q0$rE(zY ziLMx-bw}O%mXzk!joEU#EEs&>YENsV0A1zjMD0tM!cq~=NG>jDD)hgJsBz3;P5%w5 zjoKaJzn!;2rRh?@I_xJZU}74pq}UXk<4Xz$g$_OJzown64wiSnhlE2Z^($^AMEwiL zT5cDGayy&2edC9|x-WXf90cpP!*f+EYYfVDoa_10rIgA9JI*XJ34z2A(=q~_MK7A> z;+~S(y*TO>KVMi%cRI{*)5SlO&`>QfV9+$U2lN>wX1yXRl$` zD$Ae9HsepHqe3LV+|B4v@N_m%()A_<$T-_9IAfY%Q&rwpXF82NF80!V=h8@-2w(0> zctfSDZz%{2f_U0sd7wdKXM80jF1Isc)AvTr*TqJA!J3&dr%mj-!-#)68C{5!fL=KR z)}Um!tw)716+g>%+4L?@y_bGS91236e2eZHe6o4@K+bte0#i-4`lgY(TNB|Y#1HfQ zWVnZE7K9B2et8_&+FNLNHrFIKpAX(3eI+<~6K>#5((8P`vXC4!nXyF#KM$?Jf0MAB+`CLj|+gDfXq+ zN3~5bwk0(+B)fGHverp<{a2HzH;D$5CvQ#Cv0gVEFeJJ!YQ2}EegV(=wa=W&lleo8cC?8G}M}bn4d=r)SC#XoQz@G=`<&Q#bV*`PE?ndDoI0&X$$@#W9gPst)tVpqkAo3% z+$0L-uHP0(Sob7+`%Ue=NZq{orrG!}C2!Yio-KdDeQnyVb4M0r%-0=LebyUxnr${1 zcGzuwtgi4R^ufBrXv}3sZ7VbAF`G+`+f--PqS2e#|B_(V1i^w@#9x^^V?YlOAL|Ac zpKLn*<+gGsOTw|(F=OQAJ+)@kXzPuDQt`l@;V@%zFbu&}f_ji($)JCoiksu8rC4gz zcIZAZU*^s1v^HN(b)>j5KZVmpyxo{YCHVBR!f8E0GFwa0QZbjy zWH(#WA2X-FM`N{_s-P||i^*cKo~r1LiQSa3uftOMAH+ZCm6`3@imn_kyV**Ll8VHC zOr1*c+IHPc7K_bP4Rv$bKZcR8xh#z&_5abGqUCd*@&7N9qU1A)(`w!$uJEtw|IY?I zbGg~o|5vg8m_+SPrx(Pk&r7r6IR8+IX6XCSyV_isVLH#u`jp+S`dJ>0$UlFMrj^&2Ql z4hA2C1(GanT2$y+BGzUt`%g=>XT(v@hIULPx|fhL14x2R>HP*?HTbU_0| zRnm228j4DhS#-$}r_hR`eWXn|?~t7`LLE6ayzRrSiF_VXdRmQosF0Bkgi%3!(d6ar z#wLm-qCt4atD0EK>1bDw1?ir$w%0zM$Ae@&l~%F^hdAZw4I2I3pD%5mj!u_*>DWz@ zY=654|7Z@)nyrB&gdj?eJL)K_eil7oc3UULpXgd{6-w@{Tl&Y^(w1LfaAO5$DMx zW>8D5?YXT1q<=7eNx%$9f70u)meB-(b^E5a#LQ8K4bPr)zP6u(XYwvCRi;lNB$kJR zJsvT~VFiC%HuMZcD~lrKc-tjr;}h_j174Wxw8pgc8YAj@^%1pw z`l!*m?NM}SoqbHz+iiAW4=wb+x^-knt?w`02U-Yuin$r-=|2=M>)77ftNTax7>V?z ze~twVk95&K=zEK(+ikR&JjDI+7nuN_*ai3VqcxGo*=F^NJ&7~HBZ2P)=7s%!wkz~V z$vNg7>jh#m5z6`dN&u~vgb2B4*+lr{-$|Dvr~7&GA4o~e8Tcc zr;`B*Ekh+Z$$v3!`&mQNhyET9A#@_-{0$l6QzmJ?y|gkMAs+tA>JBTi{Dml>FgTvi zsiG<5(gKQ<>R1Bk+K_@+Ce&@q<$I%o(I2 znHH}DB=)n!F|mwnbACAfW}%Dm!PoYf&DVcQCpYw_9{St4$hj`cMLN|Pf}L{OA;}Y2 z+#mGY7o?k81lo(eN7iRU9se8#7rf@1=<6{@Q-MC78;6 zGNbyKC1rj6U5P=$noAAi$0vHr>EEYEpH@w0i2e$Rgj=wFe}>VH^6dV zUbqg5qNUsS#bBcI=r_MV`~rIgVI?TW{d^IHhF8{9L^08b_0M)9>SZA}VlOjcbX0eC zNe^{UpHC4yGM4hW*NS$<{ zVgmcX6lbn5I8ISOZDo9WJqDv+ZZ)|8}2f-{*0)IV3^l zfl8EvcYkg8heXX+ba%WbP>Iua_@VZ(0Kt7+%epP6B*}aSqc!M8XU*w-RNk$}WfOpT z#5$HS1=nFi;tP}b5!vpdQGPI!+U=J6_MMA7L$F8pv}XX+2LB7f>bE_EX&#=#i#Us5 zv3x#Ll#egGW2>9@WIsObsp{{ZO~uo`6f#z1^V>tmCva6?vE5E_u{21}n?Uq%Y}vKFkHt*YWcehR~xO z-h7+E>nZwlTtrR3`KC~4-NWX%x%8{Ld_?rczZkF|Yd45H5cHCzOiAWhT8Ws(Yx7*9 z!^<`q;9sNd4d{NEy*{QhFaWUJbwrsH84`HDy@TGLhtsKtvZmvXLlP^S7*+I6A62v`Eury^CUPVYbbqcwGXUc-7QFj0)NGG)2CgMMG7E&<*x z+rKh(7W-POE&*?CwxU4Q%7Qn-{*MCzavQX*EZW9>1^-o*zxtmhHQHivLO``8P%=Vf zZI)t#-O2*g)cfz&|8e`)%5p&k1(dn{{n=BMx;VhFT%W!^MdkES8oS|dvSPc_TWN6^ zCr5wie4Vcav!DcSsPF`)qeG5R!Q5_x5tW)VFh(b@N`RY){s_7kFy*$hQmCS2=@-2a2k}vF?Hd)??aq{-V!uQ`Gx+j$sO2mJj)r!%P_h}cUjycg(<_~Yd6hV)N%6;g@wzSvR z*@c5KRXY5&HXUZx%+QOcj9&zN_>)|QmK?>HEQi{BZcLd{xK0z3StnVqjk*lIWv%Ra zQO9>_t(v5%@$E4pmoNKin$|t+4(MgAeg4p-pnme#^VXdyX;T&;rKSufh^H=xv9%pu_ zW?u#|{cGy8)%v9LSM*np3ELR(R(4%|U7d*U%vVILCUFXu{J$DM%$GnwcP7NkvBf2~ z(qdXyd@e-z*^`)OM}A_pH_2w4AsVGDS3qqx+997YRH0Hi5_b==RF_I@W8!LRv1GRi zVOteQhpA-BUXZ*KO_q$c_Q}$uPsx?cGO0Jx8W9F=zPT(kbh1_3wXNc-aQrP9OWL$& zwTTruL849j!G6O$z6?tSZ5=}zG&Lnf-qMlDS|gSw0?RJ!fU6TyO0zEeC?_(?5sDO@ zuU$3?Gd^^;U}RG=86i>Js5mxrd{-(TU95CCktju5BB5=fmykd69gQvVqaj+kgQ3{W zz;>n~NhVE5{MM1lq-5EgZw1qZ#dtA;7ChUwu_>Df?4#dwlIa~o)p<$Oos1N61N55- zXhI{Y6mRJyj2j^nOBSwN%Sd3$GXi^N^r(yM09~A`*lmoH1X~X! z2RF|~$Jn{A$>F_bdi%=U`*TC4Q>r$Bo_$UHV1FY!&w^ub!6n`^P4KSek!;{2rM*-s zT3KStr7lCrwq2Y(Pl|i%*3fPuTI|~R^E`!2OxmKD^~S)rqkbkkzI-8_JT~TE{sROy zY_RXk@Q6lf53U#y>l1kPx&-2D&|aWVRMOGhrjW(If0{6%#kP~5jZW&3&Ccq5tDq5J zVu2|^HG8b{l;O!IL@(w*TOBS|k{VMN4>*_042fN=_`&T7ffK(9CoYMi^Mo;E-uP`# zcmjla%&GWyBZZ6*RKd9;!dGOth+bh`u{o)YacHbzfUw1piD3XfJx|;HjBBbFvz$_;QGY<@&0Hap-jx8*oZ9xGk$SKsK~IV8LhG*hAGZP zvD;`)7tV(988xFeGC4lCH-=QEG-qfRmre|kxLDKTc19|qL$tZhQ>e<~u;lPtaY_Nb zl}>tTaW_?|-Vb%x02!=RvuC2`R0Z=px1O_Ft+BvH!WBy zcpL|j_-mu*Sb05UUzdLSkdI`2P5kT8gOycyhoAYByN5WtKk3WIW^YArhlhMRJYs)x z4&VGtH2dp3?2`3&aBAu1)_pPL<3x-jCmK#}A5dY2a{-4eY4>6I6Ujw{Vm4%xi;wuq zT1<`y3=I{!4=cuwNJN37yYEL9Z(h_XI*IU~?ojNo!jt}@-Iy~+s+oYcKOy1lfNGnL z<4?KnxAv<|T)Ps=#zg7ikb&=Kgu~e7Rq!8LrZ!S z_jqcPvgQRd&cpPAvThefk`rAstz>#9_s1>N$xV;IX?&T?p^?b|0YbJB83cPN4zF^j z$asFbJA4o>4LE!XNLgf&p3ENM`8Cq`&~V`}!eG!KgZZ@O_zPE7#uJm8i=sH&YlDe8 zNg?cDH_=aTUA4GiDnbru+1>R)DoJ~;nfo|raLU58KqnZAg#mdcj&ktyi0^w_(gK<* zxm*i}Oe#JS<|&&`boI7+I@mXa?5*G-7>RilG8c$S9&DT79V#KbvYq(emSMJc#9EBf zON9o9e4%l#6-)$e8Rm$ikf5?cab}8n+ywD>dSpsHbB|QTlLv_?`o;bU(#ZOkU9j&Z zvMPu6n=m|Td*?@#1NlQXaZYIE6eT|)reuMS^Iv2;-uM=Xdq2$|V2qs%Wy$1E{ z*t!Z?k`@p2yY5O*R;wxoU8t*kgq(z674@{xUF##GI>o??vgL|K9h0YCi+>MRyb^c1RGO(n#StGaWRsG!{U9_k#xu>b!F!O>U z?suLfLUuIFYJw%Bzzv|We40pHnpKX5SOLulY)h;V9{Ck9Vx%Tkj8C|^P-3`L;K-h- zw7ixwyzecLQxumHdwMV$NLADX35_~KX`G#N3yb7R&=tjJwg0i9ZZE<$2`D=%K(ZY| zT97VYl>3(6&OPTEMf_nD*B9v;%j2DA4)HC%iaBj!T&@aWvlncr;&y8p7Nho#2NzpMy8*5pFD2R9rSN2h&7_ zy09zI7W|cj-S(EgqHTC0)(DY+-WQ?SD<$yv&ndz^Zn1~9BbbXP*g5rZBkioY)0t;H z-qVT{ov`A@M_|;Fi7R4#bQXOP+zR62@QQIwP+UY*czjoBYv{>xoX%vY`?j?DwiA8B zA^W3GZTHrr+9NM-8ZqvV3?k@s*g23H+IOj#p93Y!yK&^ohVAF`F^MtdW7#6phIwe9 z)$B3Jt@}aGhS;Cz>^bh?R?&N-_EhTZF(~3aeUuS;goA~$zg1^;g^04>2!l;;&EV4- z$6S+9WzQB-Mr$S!=NqDe>L~|?EKNp3guX$&JCc}pIZZ6Z zhYiJUhYL%`9MFpRm7r9Cnd_=474Ob7fO#YfxDI0QaKOM}^)D>KM#2J=>Ul%in9ku* zqcDXD_W9Qee%{P)631puORm*MyN()l@$lei*K+B7!$ z8#>17AjK0HDd;AOOnDdTF8)1G!>lE^11xyIS)g|*yUI4XGC*TA5OJ72@OwO5ife%4 zoW`BaHbR^bnKhlo#AQMy(OP)U4l*q%t9E5{=SLs9Ll5yFY~Zah&g3Zm=Bxn2uh2(^ zFUiUd%dF*fhWKUACH5AIzF)O~aI%-;&kSuW#F&FxF$)yjjROLk}?}+)a}R&P=PmZmsmYctTSgG z0UY+w6&%T768Q+I-_A*Y$?Riq+Z}{1#r=hTA}R@3@ne`7c&Su1 zs~NDd4} zlfCHib4V@hZgDm1IS{sO3)E8A-uo)VF^!@x zX?+l?Jad-Y=>=;CD&DS;)H)ia3wBSi9=e~=xkaSChZf0l`IvP4dSpFI&*==3V=_HQ zY^Ny7GhImGY{YJqA201M^b!Y|xqXGDYja30ZL!rxW1JIqn6dCy^lk$I|80##v>bHN ziOz&3er`5^RhG>J0d53;hHB5z$b&g48C=P z9gGc;kcbdRtB=5!yJB0D2s=q|iZW4Whc43d5G`z`8n!tSXF6WOMJDY?Y~1BZSE7ud zlJ=_g_}ecL<#a9UI82YjAE(nD6R~gZ+~B6%>_ww`=7Ia@@YzEo7(a0KT35Ab!i3ub zJeaZZoVMUbFj5iI>tZ-(*Gh!9z#=8q7WCgl_?x;XN>n zzYj!>Lx759yJxLMdf`l$k)p=q7$&o<8diT6?yBO+`Lo2~$9A?V{&ut$;WplJF1S0{mgVzWTcM*DE5aBF&@)cv;j|(~{?t4*2l9pqi zDMp-(qFDZ-(&})Y{cCAr|SUB3E^#j_k~@Z3p=*O?8t`9Xi=XuA~t_? zHs+Y|1~sO;Ef!86*Rz0Sm&kA+fhL{D@Nl89jsT6h0@w_B_(+}#fkwIs zIP=zF{1ywAsMto1QXOJO!1Yq7YZ@tlvC9lV@2C~Y!YDCr2MBx$RQHSV+GmK_*o3qT z7w_?^@>jfw+N200#44yo3a`)!uI3cLPiQlKqmUvVTdhj+uWxTPy8Zz13m0x57Gy9% zKdi#~U6xQyL!>_b+JEo+?7qlyX)L1;C+~j zEJP#rNA>;b$#xDXUF~&}Dmx-cabhJr4K~meHfaZX%y|Knc#o1!OokjdESbZP9zGRf zGC4m?kB{Y?Ko)asye8E}427oE`Z}zbpZB97aq$}|mVf?OUsO!j$)O#UNs(;1$OWy% z&=sR-6lgpvmNpWvK?~W5u~7=LF{z=`Bf}QIYTU5;lM;sqmDGsF_mkSvHt~EQVwiC% zS~6~;p>?=GGZlwM%}P>B6EnmlNI6v`s)0sWKR^2V0$iGw)-68*29{<97FKk-13;ugAHrc2y-9PsD$6PZie@aie zwq$rrDg4r=dB5&ud)@cS807oU@`&ml45N92ri`f_b+)TNGMn36UYxf|YBkGGN zxv^-hpR&1QuxBNZv(Ku8rn1&r9jx#+vUj!wJAD1l=%qBe+S24HJndJ~XT#84vU<4@ zMtxgak8^AHO#zOFyS=eCxA~5T%Fm50%sD~hvL;-x29slsNPW(+`@Y$`ZE*fe4o@9f zf_3(Mcme}4sCY%DRNM&!TufXz{6g8An07nee~|P5|#-)k`uHEIGI*p8<{IK_EB{b~}>t(~q(|Tsrnie)Fs>8#{&`#MR!#2_7kp z&GXg;_dk+~?2=yn_DtOo%z)#9)X({A^vw?=&r)84Am=nDG-%CGE{LhaaTnqOBNCe@ zreW-UtoU};*Oe;BKvB;1TsbRg%%i4zmB4NYJAdQea7z01L)`9M8ApB>g4h&fET!Sc zx(z|6yHTW3^}yB}-b-6uZ;oYCU`$3#_cIb%_NXE~{ef+9toz;A@hIZAUv?~PUGK&X zpKQ9?*1=B5Q70Tuh%DFCVU`=9Ycm%-G8%_{rPZPWvs8+jH}+<+PHa8H8VhQu4UTtg zEtbEkFNuuC_+U2Y?hDH@dTYSElQD~68eT|NTjkg&%b0Ve!<~#VPJ+~ou>7M`iXA!R zhLydftWDqrPO}VUd$+)3o3Ej_yQMus>FYM0-4VBBNbCBTZLB0&i`}eDuT%`m62Gm& z5TTDvoynw)%>K+|ZRL_JAp{#4e%!S;v4F<=g$4=$c_HXKb1iXdc)i|0>^$9ZpV$3> zeOq)~J-3h@bfo*$D?ikO!bz1YEyHxb7laRJ;|uN5UxLnC$v>@seqT@Je+vyLoeK~r zMdfcA3izzdZ*4kk0JRvntuJ#i+~u+1f)5MO*yF?boc)l+`BZafK=`WS z!aorpC?l+^UuUZ@2}xwXLqNGMK3b-${q-;oZ$CwfS^Ed4)Q~b2E!=*1b3vFESAmc~ zB!HMTJV-=~6ZR6FWem}j9J@IfZDDlloD(Ud#S|~5KXuANtAPs% zz6|LKf9YpBg*7UL-Y{0FTKk{NB;$FDcfibjMdq~ijQn85i83C4M8STd3Ez1Mg>q#} zn2~YHbM@H zmP}?-Qry+F7QHSCI*?-}^`0M0MBjCJJeI+tqFls#8o0ENXz0AJ33w08dcVi_nDu%E zgYlCnOsCmh>?{t?$9OR4lu;O|8m;^^w8V-ivXaqCYn%{P!4K(5AbqKsv=;3};WU8- ze;mS5Ohykc8n@m7?%^%Qxijjie2mcljs-ps;GB9SjGdHpK$TH_>;7GOSYyLaeMXO0 zr}b&YKL49bYWI51gm>nGfX)d`E2yG#YSVGTb?@8J+(Oe>#5o$@9>od@L+WTM+SE74 zOb%O0W$4h6tB_Z_V?;>d02^a7@UpI%=DCF&hFNu~>@(qJv@1HDHdahYvL0KljJ!o7 z$Kky)LN=B=Th`dKX{}+vC-fUjxGHHKqM7Uh1#UAnTgfB9&StSKHZX^-bS-K1pb*i?{DTebserUkOyh|`;j zGc7XhLX+^WciO#8}77y=`trRkBH{4k3AkS~ zn?Ggp!2mXnW$ARTMY%KvbeFq>@E4#VEs(KX7n{6(745dww-bDr$EZ*xcn9JglI2~D zPn0UA6MT(CG3paRiLRsgkRoc&8Cj(}0bFiU=fR{g{Pr~2Ztmp4m$`=iQ(}g zI?QH7Q4DP3FM2ErMdHJ2(8rhaDA+0zS!_)b3*|AEOheVlPQ$L~PIqE$*Qv_)7@Ol9 zX+85eXH|ThKQyELMJ4(1i_3d_vZ#$O*etf1dH54;QW#-1u{>_epk8d<0~t(@&JyXx zECc=GR8X#@hCLLiPF}EHJcLwCyJ4@K41X>9=vMjt%<=kZNBcL_{w24mR{S0JE`k}Y!B9~!+F#C!JG3EbDa znrrg*Ii#(TWrjSqx;kD)tQYg9-TDig1LP^FqlX;&(xp?OmAs161`d!0HhO_FVQV>; zY&aOoVyKo@aZGz@$RjX_i$_|}p~&DwqS?r1Q!$HiF!x}v1#zpFk;taB{mIn9B)WlA zBr-!)YE;*}C0IDvghxn7<~k7zhLuM)IHEoQp{Z9_O4wocQljE5;gJ_+h3LjioZ=x) zV4+oZorSOWVUK-x*s}7T6!k-lbCbZL#E`BjRXXHhWS3t+4}S55r-Ne_H~?v2ZWAXj zAjatNn%P{7)|0RdBm%NCJFh>)_z=(V(~hy!S}Z*4yOErzQZ-d>P~FOl8?_?!<&H^{ z>Kcz3m5~#dF_EO)gW^jnNKP*?tDFhBH*i>3`ity%@x>J} zf8f|S(+8U1@xb_@qATQtRm&a0PMeEKq!&H+K za1DsL5fn;h92e{lj+sDCwokwp$8FM%8#y0YtCTOggjZI)plL2!v^*6pM5l%U^EgPQ zN6ar*Y$1}16-UIDDw^pLDt1or3d+>tCc6v#NAMI|#v3+vd@?KLg~f{{D%N2J9H^X@ zFb$lIByCO*8xee|jk1N`idDxLxL{kJFOm~OVu1!PN~J0n*MKR5(1c3YW`vh;a_9EX=tER-y~loRb*BHX~t{hmYtrC|8h;IQH04yCc_ti?mVbY?Avv^iUl= zx*8X(#AXUG2%M+#I4#zOfKWpcP7pV`a5cdz^Q-7+0aivB5 z!zwlj_{j3D1lQp50-o^|CsYMGi=$d|gw-tY3GmL`>mIZ^MoesuRVE!98*_VLw$Te{ zU`W_06RnBP&zvwG+*4)x4)|o8hW%?XdreqSoYvu|F{{x{W2hE~g6`fG1>3cGQKd^* z74^JnpF6@jo z0MV7#uHeeq^*C6_uEx0=s8~_k*W~~MxNZunMTOF%FQPU_a{{kbu0#bJim8rW-#TI1 z?dy54!;YRl?BU|D=IWOCc{C)IdS0#FtdviHEN(t&f^L=N6VL`PDxY{SO{#%UDrA%E zm`m2a=uFbjE`7p1JZhKO*z>EPiua6d%JLF%I!g*`c=1zh>-q+@gFzQbY0JQALpW`@ zhKK(-lxTf`=HVR3PC>}QqH;8~ajke(JUfBv5 zsYUCVB}a3B99z``4zn{41j5boZ&1O$ zN*l38F{%V3{V>Q2Y0s3Ekrb1g>{u$Fh_kweX&|VHH{WR46wYp-j&Yd5;4B6PGHzyC zutDGoD~WGN$(lwcHs)v%eq)Y%^r+IN#?rMYUCY!rkvhl%0>(g&=&l7?1NVOC!7&R= zLK7BTOG|kNY1~3ZPP3Qu>~-s0VkSn9Ry+Wu!Tzsxk}1Ee=V)ME%c*E_Y#_nCfglcH zrVe`5wK0N0yD@a>L2<+6Do6cv+6V^l0;z%S0FJsB<80kVk8eT*7(MEQ(C142ID+m4 zM6X9wsv2RDoQagz7ux4JkX)*^ay8*BRdk#CRhwOXw=c=_Ol$4y@_Z(SU!5mfkoloW zdN7!78j6KRoO23k;hb(g9OQY}ZF!u_^{%aXx?Mx>;iG#=4*%Ndu-=vqcM^Kr%(*sm z>`B&$<1JBrjV!ioS#sGj?Vy!N*gGCJ;7(Q>*ZA&L5bp*MUJ^J&L!E~3qQIdRx-+_L z*=XL##G&@sm>Jv8>Vlz69fZ1as6q~=GW*%i>ku{Y_HG3>j^d6Lvwb$hJCoVmKx9$bRA!S z=49D~?{xPel;GRS$>XIAt++f{ zP&rB2ugEtorkrzGrI&uthAyTMzVHdbE0leGV39$`@>IgpTvpl-QvY;ZW*vz z$9zaU(g~x?Z^r>vaIZLeu;WD}G|Z0Cktjk_+->SZ(-ryS-7Rp8D9f~MJVJ=N$)fNdpivmzayhkJgmHM5vTHmA`0_tH6oe8)56aLc zo3eZnOT7E9>>#@@W#x31u46}hinfo<`~l;59*^)EIkOqhj!8Q}W89tYjA1N$0-VwK zgqR?}h%-k&tWBiyP=X(2N~LqWGPYX+Q$A3nbnkXF1yj7Samm&RyD@@`CO%NnWT`UY z%=Yu9{SygqJd)UJcpHj40{(S4_m(;j`x+9B4xvzt((R&51`O5#1NR=?)Ji3p zYtOcPatBkk57}ay43FwwtF?#hPI-2RZDHY^a>PYzDvp%%#XpD&*K=#u#6q9&2mq52 z&{K>v4R?xTI6sTwx4AIoQEEkkNN?!fC%F|^W7h&#gSl&K z3ltfivl=#Y2T{nlSIBB9LRD*WiBY3{>u@6tIKi_m{8&p%hkesV*3RjoBv0GwV#dj=e2`bT0>AI*`;BppB zd`4~$&MR=#9W`o`8iNVg;NZ;0aLoZzY?aGq4}2ja3b`i`B@M{)ID`lDS+|QNB2KCE zgUcw4#at*Ane zcARy(x!D&DN7%~5}`!otaeIibx;1LuN^<>eLPM!uE8@1({RbIVuo6ApAzopPY(c+a(uThXFb>?IGB%~o}T{h@gobj1JOioNsvxB z=Cx0yX*@&Od2Nhpy6uwkr1X`#0kj5pl#P@xo_EQNgMGD zI(TXW-rGPOKM~%V?Vci0yFE7vIvXxZE7HhDaatCgm8mALGjAKNh|UYI!#VOi424{D zY@ZXo`+3dgK7309Y<;k-jC&nl~Rn;3<z49O_4*4+50dgU2C$|=u#WVaD*^>_zqoVk*WJCKZPIm_s?~4@w)a;Xn0*)bg|*f z5e~gDktMrEyxSVUYa;flA!CRuKO5v9Bs!L_0aJQ#RuS=gVEd6v&lKFKG)moinvjbd z@hF6jRAF5ahL7?79CLJU;JLU%mUvMqHW(!sD3341?rV5KwL*gMdj0URAwib& z0)t3;uf?BpQG#7kC?2$zwsfrz$rgwjFBHnrt-9n!W1OLdh4VR?a9~FO69%r}w_axe z0wTMw1#)QPJBmlC1b`rgZ$^p2BTalxqixi0h`lQ^2;pmk-e@p><752)ChCvbW=7Q^ zx?PTeUI;oW0)doeP!|In-}F{}jBLq+W)H2A{#}tZ||^Sk1{eRE?tx_}i>lK2ZMc(60Xa5WDxE6rbDX1t&+t|aWRzXaEBSQ_169OW}*vASdt1FWF(?E&%xSj)2W+v z$$R$f-d|NaGRVM<<_-kSFIu;x%Q5&wN^b$)rnvULOSXURss`__Ale;2TF>oz|3JhB zZj&y(j7*|9qoQ0ft4V%d9^=bO?oyBSY-%+!NDU`B9c(-jbmF0BlusJ?0VglN0mbC* zUPVNbtV`qK<|dyNunoj~vTA#%qp~VWhh!@=cLk(_IP83OMRpI6L$aAFua-41w;~6G zbI^bA;ANeGKZAlT54o`7^Dz9sIS)H-mfJDQqq4n7P6>7#wssN~D$>^sLmzgSwjrlv zn-f&Z-{(_u4-fP;r;&!3qTvSB-gRvw zPFi=(h^(w6ap+7_>rsFr*|IV+N85R&&U#L;uuU7dkxc*$3R(js9~{ayR$4EbbBzz& z(D>u(7LN{s4#nLW*(uz0i8uJPnxRSLk}`spa=wYJk-Hl@EL7svonzB49NhvQ2Tcya z9W%D|oIuXw*1G4{95gvtbm?!o@s9>=CQ(LeLwhrz+n8F2lQNa6GJSc-iDTUTkeGS{ zRkONLf2}A$PL=J^AeR++t^}`-s>%CEhL=iO#O6V8>=3BPxDiP)2gzg9;QpCy9;jLj zRLk!Q+C91uw(y3Q;TL}t=ev(070QqWdO?>@bmzPx!XZH9-yI0)Hx{;{BzgE4ReMK~ z;J&w&CBl~v4&-%G4EC_sofEE!C8CwTjw|P^(T)W$)kQ8o7iEUSw`6Du_$%^{%|Z7% zq<|a~5b;xT;`2pOj2B_17X;T5@pLhlp)FMoc2gz?*A&KJ~Z@e#k9f8quBb z))`r1Q>ds_*6TWWuq~kXxZiffCTSaXf;wVP5ZoHC1UF?Lw%`(Q5mdgT!enh_EGtyS zMKGg7ZT`Y6NAi#q*zG4Zy4ZGe6q9NF9cR281a2_cA@T$2UG`eHV8g_5$O_6 zV$O@fNcR`U_WmX#2m?i zU9pw3R>4W#LU5wu$Uwb`Vkc&7IkYJ(&tM!LIo#i>bi%Q0O=Qz_dSd(9I}>8N5#JA)|p!V;f7Lq=UBsWl#Gu^eSdH?9;!z;=Elp>IpK5ac+v1mEluvK6hFA--$Ek`tT;3plY5M`RmK4l$1Mgg#7;bw1xv#Nl-5frFkWIp%XmEScof481wVc>M5v zvu=&!ap`>GNRy6bU#4Y)zAH(V!K^M);Kir;l`gf`3`Kutq1cYKm{uA~(TxT}--N*dr_!sw;R- zn*zW;J$*ih+xh%_Ecdn($sL(uJvnRy*xx6K7)!xl$T9sncusVj#_k z#q>T9c~;)ThZ!=&OnN3EDUergl%y4? zE2@E*EGjk+>lMbLsh!ILhJurK4DYO9R^#0-cTqX!I}fdpgpHA>mRhOMcrYGWTZhBi zViHt5(JG{3X1t2=tL)XdJu@a1WmO*3`Q*79^`O@ zh2`#QVH2c6=Z{zD?wMjd>O{76qoW%ctHUsyBw%SMt# zpPI?%zGmc)N)=wHW%%0HxVS2-I)9EcrPkrQ7gk&beL~1oWJ0_!T&-s(%FtlluYrOD1pl)T1{9 z=hUK1q#&;luTZn*Q1z2$L=D|Z)JK_H46;)gn9h$dZzQMjWoSGY`4FiqdHbHj`V4U$ z=`@12Uajod#~>h@G>cQ4&GLM)jyY0L$||yGtDPZ>f5*cSHwY=*yx>DBCL1&teJQZB zBv#S!LOjOHBhXJTweg>z8jc;S8(BF}Qh5wac|}Qper+A928M3(2)<#?E_)#@t&riC z(|$TZf|QNCr`!&1oO{qmn!39dVSiTvl=W9R$ogs=5Vo#Lj)Xu*lqsI*;5X5?`;3(P z`^RxV(G)4R=O)K)HtaA@Y$A>!y0KhXVIu!OY+F6z(X~7Q2F8wa6x@d=c+&#=PYwZD z06gi|iRi3kM^DGviMvC*gKb+{hCrrnDp7n!#8EhlZD&ynlBsEA8FVm7uj<89VtKjGj0z|?Jj-a)n73P zvaFJvh!?A3Z_9(W;z{y-ZBVyVJ*gbye6TG&3!H3xB20W+L*vUr9DS_9yh{;U6Y7H> zTd=a^+t)v8aL+Scy9C;8)Qs=!5DX+kWm(PgpUAiIM4ah1j47KZdlXqT(4O&SFk?go zuVi+bH6^Z)wZ@pCfQW?7ii@#yuITmC=9+UsC8v-QYtKeNF{VVel!pw|4#t0G%h%@{ zN8P$&>BUyM*@_sdio+a`yK1)UkHE#HMi8{@>|?hYi9>{-R;N2NnbaNHm!*_l%6m_Ef%c zrBH(&H;qPlx8xd#+v0T8P`N5wWsZU6_)}Ruugc4LFf;!%&}k*(*1szwHZSE;Tr_KOtt(GS4^D zY!R+E>hb%Ze*7z&xfa#jx!mR4Hj1^YoolV8?@H5s`C(M&i+MK9_YS`}1l~OTBD+}} zr|$9B{1}7_|MbuN^eTS3%TNEls^aGF(t)LT|*nVm9yE5 zi&SGLuV24WV+lIB+~)JS=6-(P$^IM}`P+dv&bW{JH&DJ4hWn}dS&GZzFT>>G6#rL` z1^V2dR3Ze)s`gStWr2e4$s=b%MpA%lofjx8HGBsS#MJFvS(hMyRv6AoqE<1ps?^1d z6f4Bl(G8)=a$ZJv3sAVr!m`5fi}1U>t!fs*1#S-8FCX@?`O~C`GY$XcgVMO6-`f>t z1O4v5{&LVPKOjZtLho2OdX6>{GPX^xDIC>Yx!K>55J8(u9A~4!_}QGy;Uv<9u7vW* zOKQ((nm2*y#!_j{qnuiIH2-If5R-vr`ZIhfof`SDY z8k7^3h9aMVDR8s!+hVnp3?PrxLV>fK)2%YM8n)C!*sApGEPYD=*hp+BmU$be`SxqN^Q%6GY@hsGP8kxIMx3b=STu5);X*I zPu}6#*hMb2ugd6+J$k9WEAN(f`~tNf;0uCAOeiGaz84RM z9ue>^AvGS|!unLnYKDrd87J&gjz_8Ms5M1TJJ1chbxq?VyDV*4K7$(~)KDPQ5$R*N zp7&DHAF^LFaZ0@@rge27Cy18W!0AW10dVYx>beBZuqm$6rd7*X$!H)=p$`BBmvqkR zNwFl#>gf|%Q){%_lQUhj$hgKl`p%a#cQ+{(BWIDDcaWnfGX_>frXn|F;;caW%7#Yr z6ktstXTgtc&z^$xhyGPv@~2__VkAN<3WdZNX(jtA)|~l;-KA?{q-E>fftOpEUD&e{ zi3bG=g@i6y>vRX#Ekh;vMyX;D4%*pdUQK^-J|JrSO?EFX7W*eDrpZCb2;La3t--XO z#85~`pc6$kY8G7V2JMa&sLH4UY=ta#vDzO9H{x!(e^x4|yN4@K5XceQPj&~;B;9?$ zH2j_Pd*|}0bFj{Da zXazV3hkcO;lj@GGNV^*ZgiG`Wy4! zSuSoMx+SDA$_4x*uBySzfKYUC``GColcWo0>h2?7{AP>3a}T^ij(CVWyAQkkhTYaI zq^6)?K^2_@1Q^l88PcWb5#_YQBGn}RYF|LKxeKHIiOqQwHr(cpJG}u|h?J>dM0-op zd&LUX5y&_lsVGZ!$;WTkMPssZk>XfpVz^N8Mnjb7zMvPkXiGU~IJInf&;KOSl87?B zs+%Cwx?2*?nnrZSQKUtv(~!0N9-ROuT;K{#gs)$-6o3vb(5(t?*A>;U3T) z`HUQ$cT8KC&v7n6B~V%PEzg@m=X>0Zbv3<8fng%vqcLwrNb{_P8C>Q##!hu2#j8JS z3g!j7V!M;Lt-PTVk^Q7tTJ|AT9gvtLy*V&#Lsq{8@S?dcu$YSci~;g~Q`>QW481)U zhjk%gY5F1q(%X`vGaQPIzUx8B*4d3TkffE^yBM^)BcGK@Gia^r3i}}4#c8^z7D&F) z{|Nt=vd;LCU_l?Mn*YZD0QyM)m7ceC9Z~iULV^>X${XA#-lOB+w}IhcMSG%K!o$fn z$ZvglJt8+WY1iX?M9U$yKd+Q{6??>hARCgmjSq5SdTk+0o4 zW&L;W$=9*b4D(1wIs30oi9|ZSJ~qxt^{8D-LKr(jc$~!jATUAzoqzfK_xbPh-{-&2 RfB#SZ{s)0Zq*MTO1pt4+z1;u+ literal 0 HcmV?d00001 diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json new file mode 100644 index 00000000000..d899f11922a --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json @@ -0,0 +1 @@ +{"_id":"underscore","_rev":"72-47f2986bfd8e8b55068b204588bbf484","name":"underscore","description":"JavaScript's functional programming helper library.","dist-tags":{"latest":"1.3.3","stable":"1.3.3"},"versions":{"1.0.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.3","_id":"underscore@1.0.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.3.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.0.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.4","_id":"underscore@1.0.4","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.4.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.0":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.0","_id":"underscore@1.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.0.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.1":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.1","_id":"underscore@1.1.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.1.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.2":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.2","_id":"underscore@1.1.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.2.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.3","_id":"underscore@1.1.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.8-1","_nodeVersion":"v0.2.5","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.3.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore.js","version":"1.1.4","_id":"underscore@1.1.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.9","_nodeVersion":"v0.5.0-pre","dist":{"shasum":"9e82274902865625b3a6d4c315a38ffd80047dae","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.4.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.1.5":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.5","_id":"underscore@1.1.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.16","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"23601d62c75619998b2f0db24938102793336a56","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.5.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.6":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.6","_id":"underscore@1.1.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"6868da1bdd72d75285be0b4e50f228e70d001a2c","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.7":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.7","devDependencies":{},"_id":"underscore@1.1.7","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"40bab84bad19d230096e8d6ef628bff055d83db0","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz"},"scripts":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.0","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.0","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"b32ce32c8c118caa8031c10b54c7f65ab3b557fd","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.0.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.1","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"fc5c6b0765673d92a2d4ac8b4dc0aa88702e2bd4","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.1.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"74dd40e9face84e724eb2edae945b8aedc233ba3","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.2.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.3","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"11b874da70f4683d7d48bba2b44be1e600d2f6cf","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.3.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.4":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.4","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"e8da6241aa06f64df2473bb2590b8c17c84c3c7e","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.4.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.0","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"253b2d79b7bb67943ced0fc744eb18267963ede8","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.0.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.1","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"6cb8aad0e77eb5dbbfb54b22bcd8697309cf9641","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.1.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"1b4e455089ab1d1d38ab6794ffe6cf08f764394a","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.2.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"time":{"1.0.3":"2011-12-07T15:12:18.045Z","1.0.4":"2011-12-07T15:12:18.045Z","1.1.0":"2011-12-07T15:12:18.045Z","1.1.1":"2011-12-07T15:12:18.045Z","1.1.2":"2011-12-07T15:12:18.045Z","1.1.3":"2011-12-07T15:12:18.045Z","1.1.4":"2011-12-07T15:12:18.045Z","1.1.5":"2011-12-07T15:12:18.045Z","1.1.6":"2011-12-07T15:12:18.045Z","1.1.7":"2011-12-07T15:12:18.045Z","1.2.0":"2011-12-07T15:12:18.045Z","1.2.1":"2011-12-07T15:12:18.045Z","1.2.2":"2011-11-14T20:28:47.115Z","1.2.3":"2011-12-07T15:12:18.045Z","1.2.4":"2012-01-09T17:23:14.818Z","1.3.0":"2012-01-11T16:41:38.459Z","1.3.1":"2012-01-23T22:57:36.474Z","1.3.2":"2012-04-09T18:38:14.345Z","1.3.3":"2012-04-10T14:43:48.089Z"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"users":{"vesln":true,"mvolkmann":true,"lancehunt":true,"mikl":true,"linus":true,"vasc":true,"bat":true,"dmalam":true,"mbrevoort":true,"danielr":true,"rsimoes":true,"thlorenz":true}} \ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/test/request.js b/deps/npm/node_modules/npm-registry-client/test/request.js index 68af9bcca2b..113bafd348a 100644 --- a/deps/npm/node_modules/npm-registry-client/test/request.js +++ b/deps/npm/node_modules/npm-registry-client/test/request.js @@ -81,7 +81,7 @@ test('request call contract', function (t) { }) test('run request through its paces', function (t) { - t.plan(29) + t.plan(34) server.expect('/request-defaults', function (req, res) { t.equal(req.method, 'GET', 'uses GET by default') @@ -173,6 +173,13 @@ test('run request through its paces', function (t) { })) }) + server.expect('GET', '/not-found-no-body', function (req, res) { + req.pipe(concat(function () { + res.statusCode = 404 + res.end() + })) + }) + var defaults = {} client.request( common.registry + '/request-defaults', @@ -260,4 +267,12 @@ test('run request through its paces', function (t) { client.request(common.registry + '/@scoped%2Fpackage-failing', defaults, function (er) { t.equals(er.message, 'payment required : @scoped/package-failing') }) + + client.request(common.registry + '/not-found-no-body', defaults, function (er) { + t.equals(er.message, '404 Not Found') + t.equals(er.statusCode, 404, 'got back 404 as .statusCode') + t.equals(er.code, 'E404', 'got back expected string code') + t.notOk(er.pkgid, "no package name returned when there's no body on response") + t.ok(typeof er !== 'string', "Error shouldn't be returned as string.") + }) }) diff --git a/deps/npm/node_modules/npm-registry-client/test/team.js b/deps/npm/node_modules/npm-registry-client/test/team.js new file mode 100644 index 00000000000..638690c57a3 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/test/team.js @@ -0,0 +1,210 @@ +var test = require('tap').test + +var server = require('./lib/server.js') +var common = require('./lib/common.js') +var client = common.freshClient() + +function nop () {} + +var URI = 'http://localhost:1337' +var PARAMS = { + auth: { + token: 'foo' + }, + scope: 'myorg', + team: 'myteam' +} + +var commands = ['create', 'destroy', 'add', 'rm', 'ls'] + +test('team create basic', function (t) { + var teamData = { + name: PARAMS.team, + scope_id: 1234, + created: '2015-07-23T18:07:49.959Z', + updated: '2015-07-23T18:07:49.959Z', + deleted: null + } + server.expect('PUT', '/-/org/myorg/team', function (req, res) { + t.equal(req.method, 'PUT') + onJsonReq(req, function (json) { + t.same(json, { name: PARAMS.team }) + res.statusCode = 200 + res.json(teamData) + }) + }) + client.team('create', URI, PARAMS, function (err, data) { + t.ifError(err, 'no errors') + t.same(data, teamData) + t.end() + }) +}) + +test('team destroy', function (t) { + var teamData = { + name: 'myteam', + scope_id: 1234, + created: '2015-07-23T18:07:49.959Z', + updated: '2015-07-23T18:07:49.959Z', + deleted: '2015-07-23T18:27:27.178Z' + } + server.expect('DELETE', '/-/team/myorg/myteam', function (req, res) { + t.equal(req.method, 'DELETE') + onJsonReq(req, function (json) { + t.same(json, undefined) + res.statusCode = 200 + res.json(teamData) + }) + }) + client.team('destroy', URI, PARAMS, function (err, data) { + t.ifError(err, 'no errors') + t.same(data, teamData) + t.end() + }) +}) + +test('team add basic', function (t) { + var params = Object.create(PARAMS) + params.user = 'zkat' + server.expect('PUT', '/-/team/myorg/myteam/user', function (req, res) { + t.equal(req.method, 'PUT') + onJsonReq(req, function (json) { + t.same(json, { user: params.user }) + res.statusCode = 200 + res.json(undefined) + }) + }) + client.team('add', URI, params, function (err, data) { + t.ifError(err, 'no errors') + t.same(data, undefined) + t.end() + }) +}) + +test('team add user not in org', function (t) { + var params = Object.create(PARAMS) + params.user = 'zkat' + var errMsg = 'user is already in team' + server.expect('PUT', '/-/team/myorg/myteam/user', function (req, res) { + t.equal(req.method, 'PUT') + res.statusCode = 400 + res.json({ + error: errMsg + }) + }) + client.team('add', URI, params, function (err, data) { + t.equal(err.message, errMsg + ' : ' + '-/team/myorg/myteam/user') + t.same(data, {error: errMsg}) + t.end() + }) +}) + +test('team rm basic', function (t) { + var params = Object.create(PARAMS) + params.user = 'bcoe' + server.expect('DELETE', '/-/team/myorg/myteam/user', function (req, res) { + t.equal(req.method, 'DELETE') + onJsonReq(req, function (json) { + t.same(json, params) + res.statusCode = 200 + res.json(undefined) + }) + }) + client.team('rm', URI, params, function (err, data) { + t.ifError(err, 'no errors') + t.same(data, undefined) + t.end() + }) +}) + +test('team ls (on org)', function (t) { + var params = Object.create(PARAMS) + params.team = null + var teams = ['myorg:team1', 'myorg:team2', 'myorg:team3'] + server.expect('GET', '/-/org/myorg/team?format=cli', function (req, res) { + t.equal(req.method, 'GET') + onJsonReq(req, function (json) { + t.same(json, undefined) + res.statusCode = 200 + res.json(teams) + }) + }) + client.team('ls', URI, params, function (err, data) { + t.ifError(err, 'no errors') + t.same(data, teams) + t.end() + }) +}) + +test('team ls (on team)', function (t) { + var uri = '/-/team/myorg/myteam/user?format=cli' + var users = ['zkat', 'bcoe'] + server.expect('GET', uri, function (req, res) { + t.equal(req.method, 'GET') + onJsonReq(req, function (json) { + t.same(json, undefined) + res.statusCode = 200 + res.json(users) + }) + }) + client.team('ls', URI, PARAMS, function (err, data) { + t.ifError(err, 'no errors') + t.same(data, users) + t.end() + }) +}) + +// test('team edit', function (t) { +// server.expect('PUT', '/-/org/myorg/team', function (req, res) { +// t.equal(req.method, 'PUT') +// res.statusCode = 201 +// res.json({}) +// }) +// client.team('create', URI, PARAMS, function (err, data) { +// t.ifError(err, 'no errors') +// t.end() +// }) +// }) + +test('team command base validation', function (t) { + t.throws(function () { + client.team(undefined, URI, PARAMS, nop) + }, 'command is required') + commands.forEach(function (cmd) { + t.throws(function () { + client.team(cmd, undefined, PARAMS, nop) + }, 'registry URI is required') + t.throws(function () { + client.team(cmd, URI, undefined, nop) + }, 'params is required') + t.throws(function () { + client.team(cmd, URI, {scope: 'o', team: 't'}, nop) + }, 'auth is required') + t.throws(function () { + client.team(cmd, URI, {auth: {token: 'f'}, team: 't'}, nop) + }, 'scope is required') + t.throws(function () { + client.team(cmd, URI, PARAMS, {}) + }, 'callback must be a function') + if (cmd !== 'ls') { + t.throws(function () { + client.team( + cmd, URI, {auth: {token: 'f'}, scope: 'o'}, nop) + }, 'team name is required') + } + if (cmd === 'add' || cmd === 'rm') { + t.throws(function () { + client.team( + cmd, URI, PARAMS, nop) + }, 'user is required') + } + }) + t.end() +}) + +function onJsonReq (req, cb) { + var buffer = '' + req.setEncoding('utf8') + req.on('data', function (data) { buffer += data }) + req.on('end', function () { cb(buffer ? JSON.parse(buffer) : undefined) }) +} diff --git a/deps/npm/node_modules/npmlog/.npmrc b/deps/npm/node_modules/npmlog/.npmrc deleted file mode 100644 index ca0bc48dd55..00000000000 --- a/deps/npm/node_modules/npmlog/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -save-prefix = ~ -proprietary-attribs = false diff --git a/deps/npm/node_modules/read/.npmignore b/deps/npm/node_modules/read/.npmignore deleted file mode 100644 index 0db216bfa4c..00000000000 --- a/deps/npm/node_modules/read/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -npm-debug.log -node_modules diff --git a/deps/npm/node_modules/read/LICENCE b/deps/npm/node_modules/read/LICENCE deleted file mode 100644 index 74489e2e265..00000000000 --- a/deps/npm/node_modules/read/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/read/example/example.js b/deps/npm/node_modules/read/example/example.js deleted file mode 100644 index cf213bf88e0..00000000000 --- a/deps/npm/node_modules/read/example/example.js +++ /dev/null @@ -1,13 +0,0 @@ -var read = require("../lib/read.js") - -read({prompt: "Username: ", default: "test-user" }, function (er, user) { - read({prompt: "Password: ", default: "test-pass", silent: true }, function (er, pass) { - read({prompt: "Password again: ", default: "test-pass", silent: true }, function (er, pass2) { - console.error({user: user, - pass: pass, - verify: pass2, - passMatch: (pass === pass2)}) - console.error("the program should exit now") - }) - }) -}) diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json index b424aa3c0cc..b8357c6315d 100644 --- a/deps/npm/node_modules/read/package.json +++ b/deps/npm/node_modules/read/package.json @@ -1,12 +1,12 @@ { "name": "read", - "version": "1.0.6", + "version": "1.0.7", "main": "lib/read.js", "dependencies": { "mute-stream": "~0.0.4" }, "devDependencies": { - "tap": "*" + "tap": "^1.2.0" }, "engines": { "node": ">=0.8" @@ -25,23 +25,26 @@ "scripts": { "test": "tap test/*.js" }, - "gitHead": "2f5101c8e41332a033e5aa4e27e33fd6e09598e2", + "files": [ + "lib/read.js" + ], + "gitHead": "b14516b9236c40140fd0666567f5d0c588a09a62", "bugs": { "url": "https://github.com/isaacs/read/issues" }, "homepage": "https://github.com/isaacs/read#readme", - "_id": "read@1.0.6", - "_shasum": "09873c14ecc114d063fad43b8ca5a33d304721c8", - "_from": "read@1.0.6", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", + "_id": "read@1.0.7", + "_shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "_from": "read@1.0.7", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", "_npmUser": { "name": "isaacs", "email": "isaacs@npmjs.com" }, "dist": { - "shasum": "09873c14ecc114d063fad43b8ca5a33d304721c8", - "tarball": "http://registry.npmjs.org/read/-/read-1.0.6.tgz" + "shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "tarball": "http://registry.npmjs.org/read/-/read-1.0.7.tgz" }, "maintainers": [ { @@ -50,5 +53,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/read/-/read-1.0.6.tgz" + "_resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz" } diff --git a/deps/npm/node_modules/read/rs.js b/deps/npm/node_modules/read/rs.js deleted file mode 100644 index d9f7f48dd61..00000000000 --- a/deps/npm/node_modules/read/rs.js +++ /dev/null @@ -1,4 +0,0 @@ -var read = require('read'); -read({ silent: true, prompt: 'stars: ' }, function(er, data) { - console.log(er, data) -}) diff --git a/deps/npm/node_modules/read/test/basic.js b/deps/npm/node_modules/read/test/basic.js deleted file mode 100644 index f0926f3f2ec..00000000000 --- a/deps/npm/node_modules/read/test/basic.js +++ /dev/null @@ -1,60 +0,0 @@ -var tap = require('tap') -var read = require('../lib/read.js') - -if (process.argv[2] === 'child') { - return child() -} - -var CLOSE = 'close' -if (process.version.match(/^v0\.6/)) { - CLOSE = 'exit' -} - -var spawn = require('child_process').spawn - -tap.test('basic', function (t) { - var child = spawn(process.execPath, [__filename, 'child']) - var output = '' - var write = child.stdin.write.bind(child.stdin) - child.stdout.on('data', function (c) { - console.error('data %s', c) - output += c - if (output.match(/Username: \(test-user\) $/)) { - process.nextTick(write.bind(null, 'a user\n')) - } else if (output.match(/Password: \(