From df6ffc018ef0d166486d1323412472b981ecb648 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 3 Jun 2013 10:50:02 -0700 Subject: [PATCH 01/14] stream: unshift('') is a noop In some cases, the http CONNECT/Upgrade API is unshifting an empty bodyHead buffer onto the socket. Normally, stream.unshift(chunk) does not set state.reading=false. However, this check was not being done for the case when the chunk was empty (either `''` or `Buffer(0)`), and as a result, it was causing the socket to think that a read had completed, and to stop providing data. This bug is not limited to http or web sockets, but rather would affect any parser that unshifts data back onto the source stream without being very careful to never unshift an empty chunk. Since the intent of unshift is to *not* change the state.reading property, this is a bug. Fixes #5557 Fixes LearnBoost/socket.io#1242 --- lib/_stream_readable.js | 2 +- .../simple/test-stream-unshift-empty-chunk.js | 81 +++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 test/simple/test-stream-unshift-empty-chunk.js diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 02c41510b4a..2259d2e7783 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -166,7 +166,7 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) { maybeReadMore(stream, state); } - } else { + } else if (!addToFront) { state.reading = false; } diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js new file mode 100644 index 00000000000..0c9647650f2 --- /dev/null +++ b/test/simple/test-stream-unshift-empty-chunk.js @@ -0,0 +1,81 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); + +// This test verifies that stream.unshift(Buffer(0)) or +// stream.unshift('') does not set state.reading=false. +var Readable = require('stream').Readable; + +var r = new Readable(); +var nChunks = 10; +var chunk = new Buffer(10); +chunk.fill('x'); + +r._read = function(n) { + setTimeout(function() { + r.push(--nChunks === 0 ? null : chunk); + }); +}; + +var readAll = false; +var seen = []; +r.on('readable', function() { + var chunk; + while (chunk = r.read()) { + seen.push(chunk.toString()); + // simulate only reading a certain amount of the data, + // and then putting the rest of the chunk back into the + // stream, like a parser might do. We just fill it with + // 'y' so that it's easy to see which bits were touched, + // and which were not. + var putBack = new Buffer(readAll ? 0 : 5); + putBack.fill('y'); + readAll = !readAll; + r.unshift(putBack); + } +}); + +var expect = + [ 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy', + 'xxxxxxxxxx', + 'yyyyy' ]; + +r.on('end', function() { + assert.deepEqual(seen, expect); + console.log('ok'); +}); From 5dc51d4e215b658a0fefe9d5eebc22f80747cd0b Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 3 Jun 2013 13:39:57 -0700 Subject: [PATCH 02/14] url: Properly parse certain oddly formed urls In cases where there are multiple @-chars in a url, Node currently parses the hostname and auth sections differently than web browsers. This part of the bug is serious, and should be landed in v0.10, and also ported to v0.8, and releases made as soon as possible. The less serious issue is that there are many other sorts of malformed urls which Node either accepts when it should reject, or interprets differently than web browsers. For example, `http://a.com*foo` is interpreted by Node like `http://a.com/*foo` when web browsers treat this as `http://a.com%3Bfoo/`. In general, *only* the `hostEndingChars` should be the characters that delimit the host portion of the URL. Most of the current `nonHostChars` that appear in the hostname should be escaped, but some of them (such as `;` and `%` when it does not introduce a hex pair) should raise an error. We need to have a broader discussion about whether it's best to throw in these cases, and potentially break extant programs, or return an object that has every field set to `null` so that any attempt to read the hostname/auth/etc. will appear to be empty. --- lib/url.js | 80 ++++++++++++++++++++++++----------------- test/simple/test-url.js | 39 ++++++++++++++++++++ 2 files changed, 86 insertions(+), 33 deletions(-) diff --git a/lib/url.js b/lib/url.js index b8ba3fb1dd7..db7723895b6 100644 --- a/lib/url.js +++ b/lib/url.js @@ -64,7 +64,7 @@ var protocolPattern = /^([a-z0-9.+-]+:)/i, // them. nonHostChars = ['%', '/', '?', ';', '#'] .concat(unwise).concat(autoEscape), - nonAuthChars = ['/', '@', '?', '#'].concat(delims), + hostEndingChars = ['/', '?', '#'], hostnameMaxLen = 255, hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/, hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/, @@ -146,50 +146,64 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) { + // there's a hostname. // the first instance of /, ?, ;, or # ends the host. - // don't enforce full RFC correctness, just be unstupid about it. - + // // If there is an @ in the hostname, then non-host chars *are* allowed - // to the left of the first @ sign, unless some non-auth character + // to the left of the last @ sign, unless some host-ending character // comes *before* the @-sign. // URLs are obnoxious. - var atSign = rest.indexOf('@'); - if (atSign !== -1) { - var auth = rest.slice(0, atSign); + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c - // there *may be* an auth - var hasAuth = true; - for (var i = 0, l = nonAuthChars.length; i < l; i++) { - if (auth.indexOf(nonAuthChars[i]) !== -1) { - // not a valid auth. Something like http://foo.com/bar@baz/ - hasAuth = false; - break; - } - } + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. - if (hasAuth) { - // pluck off the auth portion. - this.auth = decodeURIComponent(auth); - rest = rest.substr(atSign + 1); - } + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; } - var firstNonHost = -1; - for (var i = 0, l = nonHostChars.length; i < l; i++) { - var index = rest.indexOf(nonHostChars[i]); - if (index !== -1 && - (firstNonHost < 0 || index < firstNonHost)) firstNonHost = index; - } - - if (firstNonHost !== -1) { - this.host = rest.substr(0, firstNonHost); - rest = rest.substr(firstNonHost); + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); } else { - this.host = rest; - rest = ''; + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); } + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + // pull out port. this.parseHost(); diff --git a/test/simple/test-url.js b/test/simple/test-url.js index 6630da1025e..d27abbab8a3 100644 --- a/test/simple/test-url.js +++ b/test/simple/test-url.js @@ -741,6 +741,45 @@ var parseTests = { 'path': '/test', }, + 'http://a@b@c/': { + protocol: 'http:', + slashes: true, + auth: 'a@b', + host: 'c', + hostname: 'c', + href: 'http://a%40b@c/', + path: '/', + pathname: '/' + }, + + 'http://a@b?@c': { + protocol: 'http:', + slashes: true, + auth: 'a', + host: 'b', + hostname: 'b', + href: 'http://a@b/?@c', + path: '/?@c', + pathname: '/', + search: '?@c', + query: '@c' + }, + + 'http://a\r" \t\n<\'b:b@c\r\nd/e?f':{ + protocol: 'http:', + slashes: true, + auth: 'a\r" \t\n<\'b:b', + host: 'c', + port: null, + hostname: 'c', + hash: null, + search: '?f', + query: 'f', + pathname: '%0D%0Ad/e', + path: '%0D%0Ad/e?f', + href: 'http://a%0D%22%20%09%0A%3C\'b:b@c/%0D%0Ad/e?f' + } + }; for (var u in parseTests) { From 5dd91b014711f0c305eb6b8963c6a59a14970b03 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 3 Jun 2013 16:02:51 -0700 Subject: [PATCH 03/14] url: Set href to null by default --- lib/url.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/url.js b/lib/url.js index db7723895b6..fc8f77d1bdd 100644 --- a/lib/url.js +++ b/lib/url.js @@ -40,6 +40,7 @@ function Url() { this.query = null; this.pathname = null; this.path = null; + this.href = null; } // Reference: RFC 3986, RFC 1808, RFC 2396 From 99fe35c67a1acbf7ec8ce239ebf9b76fdc992c4b Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 4 Jun 2013 11:12:44 -0700 Subject: [PATCH 04/14] blog: Release v0.10.9 --- doc/blog/release/v0.10.9.md | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 doc/blog/release/v0.10.9.md diff --git a/doc/blog/release/v0.10.9.md b/doc/blog/release/v0.10.9.md new file mode 100644 index 00000000000..ee8d3985157 --- /dev/null +++ b/doc/blog/release/v0.10.9.md @@ -0,0 +1,67 @@ +date: Thu May 30 11:12:12 PDT 2013 +version: 0.10.9 +category: release +title: Node v0.10.9 (Stable) +slug: node-v0-10-9-stable + +2013.05.30, Version 0.10.9 (Stable) + +* npm: Upgrade to 1.2.24 + +* uv: Upgrade to v0.10.9 + +* repl: fix JSON.parse error check (Brian White) + +* tls: proper .destroySoon (Fedor Indutny) + +* tls: invoke write cb only after opposite read end (Fedor Indutny) + +* tls: ignore .shutdown() syscall error (Fedor Indutny) + + +Source Code: http://nodejs.org/dist/v0.10.9/node-v0.10.9.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.10.9/node-v0.10.9.pkg + +Windows Installer: http://nodejs.org/dist/v0.10.9/node-v0.10.9-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.10.9/x64/node-v0.10.9-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.10.9/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.10.9/node-v0.10.9-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.10.9/node-v0.10.9-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.10.9/node-v0.10.9-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.10.9/node-v0.10.9-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.10.9/ + +Website: http://nodejs.org/docs/v0.10.9/ + +Documentation: http://nodejs.org/docs/v0.10.9/api/ + +Shasums: + +``` +b527f5cf879fd834cb70cec630fce34eb30b5a02 node-v0.10.9-darwin-x64.tar.gz +b2c9b14aa4a2aa17dd63f2ebe5a4f27171eb64f7 node-v0.10.9-darwin-x86.tar.gz +4626105fbf907c76314bf487460662e5c97e14ea node-v0.10.9-linux-x64.tar.gz +29a4aa89ca61b5a4f3c520f0f798b8b19ce2d3d3 node-v0.10.9-linux-x86.tar.gz +6d755df136dec6dc085cc6b214154245402a5372 node-v0.10.9-sunos-x64.tar.gz +2dadf9feca00bb3e681ea31ebd4086ab926a1c39 node-v0.10.9-sunos-x86.tar.gz +5ff6c7ed7174af8502f54f4476bf8de616180625 node-v0.10.9-x86.msi +7d945ed2102fcfab28e26dca5f4698b6cf0b921a node-v0.10.9.pkg +e4b2bb8c42da2ec90e6fd81da1e6b382ba499608 node-v0.10.9.tar.gz +889e9c4cb614c79fb728816790a622d13ce9ca88 node.exe +3b9b15f8ab5fc5378e05301f465114d93ade237a node.exp +3c8034b9e4eef1f46d186a266a60690edd17b1f4 node.lib +b9f1d9452f2815b43df98b40ab1b6cf2c358ad8a node.pdb +4b767d596c8a395fe22215d065f9d31b3a5b9423 x64/node-v0.10.9-x64.msi +e763bc24888254ddd992a4b7302d1ad4538ad920 x64/node.exe +eec159254e209f172bca37dc547f0bfcfa1bd87c x64/node.exp +6ae5f3a36ffba256cb8077c47a218749449f798c x64/node.lib +5c2283b50c74a8b43708fdc29cb5c314fbe2d018 x64/node.pdb +``` From 0a763e35da1f9e17620b293e5049cc6984e302a5 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 4 Jun 2013 11:12:54 -0700 Subject: [PATCH 05/14] blog: Release v0.8.24 --- doc/blog/release/v0.8.24.md | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 doc/blog/release/v0.8.24.md diff --git a/doc/blog/release/v0.8.24.md b/doc/blog/release/v0.8.24.md new file mode 100644 index 00000000000..1845ad433f8 --- /dev/null +++ b/doc/blog/release/v0.8.24.md @@ -0,0 +1,63 @@ +date: Tue Jun 4 11:09:55 PDT 2013 +version: 0.8.24 +category: release +title: Node v0.8.24 (Stable) +slug: node-v0-8-24-stable + +2013.06.04, Version 0.8.24 (maintenance) + +* npm: Upgrade to v1.2.24 + +* url: Properly parse certain oddly formed urls (isaacs) + +* http: Don't try to destroy nonexistent sockets (isaacs) + +* handle_wrap: fix NULL pointer dereference (Ben Noordhuis) + + +Source Code: http://nodejs.org/dist/v0.8.24/node-v0.8.24.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.8.24/node-v0.8.24.pkg + +Windows Installer: http://nodejs.org/dist/v0.8.24/node-v0.8.24-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.8.24/x64/node-v0.8.24-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.8.24/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.8.24/node-v0.8.24-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.8.24/node-v0.8.24-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.8.24/node-v0.8.24-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.8.24/node-v0.8.24-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.8.24/ + +Website: http://nodejs.org/docs/v0.8.24/ + +Documentation: http://nodejs.org/docs/v0.8.24/api/ + +Shasums: + +``` +bd2f2c1dda9812d773a3d403ca69700d59471746 node-v0.8.24-darwin-x64.tar.gz +041553ba728039c7876bd109285263e654e95d80 node-v0.8.24-darwin-x86.tar.gz +4fb7ce5d80d1b9ac5cbe1d7ee1e7697e35536a35 node-v0.8.24-linux-x64.tar.gz +0cbdb661fde7414b75b5e0d7735405b1e7974b91 node-v0.8.24-linux-x86.tar.gz +0f48da822862122bc9690bdba063f6cf954c7f5a node-v0.8.24-sunos-x64.tar.gz +095fd055c9299906a11f30159443b5be784f9e20 node-v0.8.24-sunos-x86.tar.gz +cf96df4d163bdb588044245cb5e082e136ed71d7 node-v0.8.24-x86.msi +82f3c12752b1891bb208677fe7f280f8cbec36ab node-v0.8.24.pkg +4035c547a98a9e9b9e7a036abe84f19c78220b8f node-v0.8.24.tar.gz +b65113c23b0a653a3befec55e42f7a4a3db691e2 node.exe +abd8a7ab174c6f3a8508cc0fa725a35aa8258738 node.exp +1601a02e694f60d6e37adefe29fae75ec4bedf52 node.lib +b420062ebfe1fc3e9a14a65c76e50d7433ed7120 node.pdb +93d6cde7e7a72aac47a4053c5e8ceefd23e24344 x64/node-v0.8.24-x64.msi +fa63de49e8839f581aece864249c61810f9af13f x64/node.exe +b3737b22816b6324a44afab9ad6722c604ed317c x64/node.exp +f08cdeb9f0414afb23ab4079f584edecc43e32ab x64/node.lib +4bdd92ba52fc3d9ff6184df00d9f9f53ef644cde x64/node.pdb +``` From e116ee7ba13d9dcabf554cf9e92657146601bef6 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 4 Jun 2013 11:19:10 -0700 Subject: [PATCH 06/14] blog: 0.8 is maintenace, not stable --- doc/blog/release/v0.8.24.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/blog/release/v0.8.24.md b/doc/blog/release/v0.8.24.md index 1845ad433f8..1875c2d4f94 100644 --- a/doc/blog/release/v0.8.24.md +++ b/doc/blog/release/v0.8.24.md @@ -1,8 +1,8 @@ date: Tue Jun 4 11:09:55 PDT 2013 version: 0.8.24 category: release -title: Node v0.8.24 (Stable) -slug: node-v0-8-24-stable +title: Node v0.8.24 (Maintenance) +slug: node-v0-8-24-maintenance 2013.06.04, Version 0.8.24 (maintenance) From 51226b84cf5e2cac7a1fa4b4b5379727fa3415fc Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 4 Jun 2013 11:22:14 -0700 Subject: [PATCH 07/14] doc: ChangeLog update for v0.8.24 --- ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5eb6a5e2bbd..cf2ee32e8e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -707,6 +707,17 @@ * Fix #3521 Make process.env more like a regular Object (isaacs) +2013.06.04, Version 0.8.24 (maintenance), c1a1ab067721ea17ef7b05ec5c68b01321017f05 + +* npm: Upgrade to v1.2.24 + +* url: Properly parse certain oddly formed urls (isaacs) + +* http: Don't try to destroy nonexistent sockets (isaacs) + +* handle_wrap: fix NULL pointer dereference (Ben Noordhuis) + + 2013.04.09, Version 0.8.23 (maintenance), c67f8d0500fe15637a623eb759d2ad7eb9fb3b0b * npm: Upgrade to v1.2.18 From f28f67cf759258492537495c016b2b01d2b0f9de Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 4 Jun 2013 11:42:32 -0700 Subject: [PATCH 08/14] npm: Upgrade to 1.2.25 --- deps/npm/doc/cli/install.md | 6 ++ deps/npm/html/api/bin.html | 2 +- deps/npm/html/api/bugs.html | 2 +- deps/npm/html/api/commands.html | 2 +- deps/npm/html/api/config.html | 2 +- deps/npm/html/api/deprecate.html | 2 +- deps/npm/html/api/docs.html | 2 +- deps/npm/html/api/edit.html | 2 +- deps/npm/html/api/explore.html | 2 +- deps/npm/html/api/help-search.html | 2 +- deps/npm/html/api/init.html | 2 +- deps/npm/html/api/install.html | 2 +- deps/npm/html/api/link.html | 2 +- deps/npm/html/api/load.html | 2 +- deps/npm/html/api/ls.html | 2 +- deps/npm/html/api/npm.html | 4 +- deps/npm/html/api/outdated.html | 2 +- deps/npm/html/api/owner.html | 2 +- deps/npm/html/api/pack.html | 2 +- deps/npm/html/api/prefix.html | 2 +- deps/npm/html/api/prune.html | 2 +- deps/npm/html/api/publish.html | 2 +- deps/npm/html/api/rebuild.html | 2 +- deps/npm/html/api/restart.html | 2 +- deps/npm/html/api/root.html | 2 +- deps/npm/html/api/run-script.html | 2 +- deps/npm/html/api/search.html | 2 +- deps/npm/html/api/shrinkwrap.html | 2 +- deps/npm/html/api/start.html | 2 +- deps/npm/html/api/stop.html | 2 +- deps/npm/html/api/submodule.html | 2 +- deps/npm/html/api/tag.html | 2 +- deps/npm/html/api/test.html | 2 +- deps/npm/html/api/uninstall.html | 2 +- deps/npm/html/api/unpublish.html | 2 +- deps/npm/html/api/update.html | 2 +- deps/npm/html/api/version.html | 2 +- deps/npm/html/api/view.html | 2 +- deps/npm/html/api/whoami.html | 2 +- deps/npm/html/doc/README.html | 2 +- deps/npm/html/doc/adduser.html | 2 +- deps/npm/html/doc/bin.html | 2 +- deps/npm/html/doc/bugs.html | 2 +- deps/npm/html/doc/build.html | 2 +- deps/npm/html/doc/bundle.html | 2 +- deps/npm/html/doc/cache.html | 2 +- deps/npm/html/doc/changelog.html | 2 +- deps/npm/html/doc/coding-style.html | 2 +- deps/npm/html/doc/completion.html | 2 +- deps/npm/html/doc/config.html | 2 +- deps/npm/html/doc/dedupe.html | 2 +- deps/npm/html/doc/deprecate.html | 2 +- deps/npm/html/doc/developers.html | 2 +- deps/npm/html/doc/disputes.html | 2 +- deps/npm/html/doc/docs.html | 2 +- deps/npm/html/doc/edit.html | 2 +- deps/npm/html/doc/explore.html | 2 +- deps/npm/html/doc/faq.html | 2 +- deps/npm/html/doc/folders.html | 2 +- deps/npm/html/doc/global.html | 2 +- deps/npm/html/doc/help-search.html | 2 +- deps/npm/html/doc/help.html | 2 +- deps/npm/html/doc/index.html | 2 +- deps/npm/html/doc/init.html | 2 +- deps/npm/html/doc/install.html | 8 +- deps/npm/html/doc/json.html | 2 +- deps/npm/html/doc/link.html | 2 +- deps/npm/html/doc/ls.html | 4 +- deps/npm/html/doc/npm.html | 4 +- deps/npm/html/doc/outdated.html | 2 +- deps/npm/html/doc/owner.html | 2 +- deps/npm/html/doc/pack.html | 2 +- deps/npm/html/doc/prefix.html | 2 +- deps/npm/html/doc/prune.html | 2 +- deps/npm/html/doc/publish.html | 2 +- deps/npm/html/doc/rebuild.html | 2 +- deps/npm/html/doc/registry.html | 2 +- deps/npm/html/doc/removing-npm.html | 2 +- deps/npm/html/doc/restart.html | 2 +- deps/npm/html/doc/rm.html | 2 +- deps/npm/html/doc/root.html | 2 +- deps/npm/html/doc/run-script.html | 2 +- deps/npm/html/doc/scripts.html | 2 +- deps/npm/html/doc/search.html | 2 +- deps/npm/html/doc/semver.html | 2 +- deps/npm/html/doc/shrinkwrap.html | 2 +- deps/npm/html/doc/star.html | 2 +- deps/npm/html/doc/stars.html | 2 +- deps/npm/html/doc/start.html | 2 +- deps/npm/html/doc/stop.html | 2 +- deps/npm/html/doc/submodule.html | 2 +- deps/npm/html/doc/tag.html | 2 +- deps/npm/html/doc/test.html | 2 +- deps/npm/html/doc/uninstall.html | 2 +- deps/npm/html/doc/unpublish.html | 2 +- deps/npm/html/doc/update.html | 2 +- deps/npm/html/doc/version.html | 2 +- deps/npm/html/doc/view.html | 2 +- deps/npm/html/doc/whoami.html | 2 +- deps/npm/lib/config.js | 4 +- deps/npm/lib/utils/error-handler.js | 4 +- deps/npm/man/man1/README.1 | 2 +- deps/npm/man/man1/adduser.1 | 2 +- deps/npm/man/man1/bin.1 | 2 +- deps/npm/man/man1/bugs.1 | 2 +- deps/npm/man/man1/build.1 | 2 +- deps/npm/man/man1/bundle.1 | 2 +- deps/npm/man/man1/cache.1 | 2 +- deps/npm/man/man1/changelog.1 | 2 +- deps/npm/man/man1/coding-style.1 | 2 +- deps/npm/man/man1/completion.1 | 2 +- deps/npm/man/man1/config.1 | 2 +- deps/npm/man/man1/dedupe.1 | 2 +- deps/npm/man/man1/deprecate.1 | 2 +- deps/npm/man/man1/developers.1 | 2 +- deps/npm/man/man1/disputes.1 | 2 +- deps/npm/man/man1/docs.1 | 2 +- deps/npm/man/man1/edit.1 | 2 +- deps/npm/man/man1/explore.1 | 2 +- deps/npm/man/man1/faq.1 | 2 +- deps/npm/man/man1/folders.1 | 2 +- deps/npm/man/man1/global.1 | 2 +- deps/npm/man/man1/help-search.1 | 2 +- deps/npm/man/man1/help.1 | 2 +- deps/npm/man/man1/index.1 | 2 +- deps/npm/man/man1/init.1 | 2 +- deps/npm/man/man1/install.1 | 10 ++- deps/npm/man/man1/json.1 | 2 +- deps/npm/man/man1/link.1 | 2 +- deps/npm/man/man1/ls.1 | 4 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/outdated.1 | 2 +- deps/npm/man/man1/owner.1 | 2 +- deps/npm/man/man1/pack.1 | 2 +- deps/npm/man/man1/prefix.1 | 2 +- deps/npm/man/man1/prune.1 | 2 +- deps/npm/man/man1/publish.1 | 2 +- deps/npm/man/man1/rebuild.1 | 2 +- deps/npm/man/man1/registry.1 | 2 +- deps/npm/man/man1/removing-npm.1 | 2 +- deps/npm/man/man1/restart.1 | 2 +- deps/npm/man/man1/rm.1 | 2 +- deps/npm/man/man1/root.1 | 2 +- deps/npm/man/man1/run-script.1 | 2 +- deps/npm/man/man1/scripts.1 | 2 +- deps/npm/man/man1/search.1 | 2 +- deps/npm/man/man1/semver.1 | 2 +- deps/npm/man/man1/shrinkwrap.1 | 2 +- deps/npm/man/man1/star.1 | 2 +- deps/npm/man/man1/stars.1 | 2 +- deps/npm/man/man1/start.1 | 2 +- deps/npm/man/man1/stop.1 | 2 +- deps/npm/man/man1/submodule.1 | 2 +- deps/npm/man/man1/tag.1 | 2 +- deps/npm/man/man1/test.1 | 2 +- deps/npm/man/man1/uninstall.1 | 2 +- deps/npm/man/man1/unpublish.1 | 2 +- deps/npm/man/man1/update.1 | 2 +- deps/npm/man/man1/version.1 | 2 +- deps/npm/man/man1/view.1 | 2 +- deps/npm/man/man1/whoami.1 | 2 +- deps/npm/man/man3/bin.3 | 2 +- deps/npm/man/man3/bugs.3 | 2 +- deps/npm/man/man3/commands.3 | 2 +- deps/npm/man/man3/config.3 | 2 +- deps/npm/man/man3/deprecate.3 | 2 +- deps/npm/man/man3/docs.3 | 2 +- deps/npm/man/man3/edit.3 | 2 +- deps/npm/man/man3/explore.3 | 2 +- deps/npm/man/man3/help-search.3 | 2 +- deps/npm/man/man3/init.3 | 2 +- deps/npm/man/man3/install.3 | 2 +- deps/npm/man/man3/link.3 | 2 +- deps/npm/man/man3/load.3 | 2 +- deps/npm/man/man3/ls.3 | 2 +- deps/npm/man/man3/npm.3 | 4 +- deps/npm/man/man3/outdated.3 | 2 +- deps/npm/man/man3/owner.3 | 2 +- deps/npm/man/man3/pack.3 | 2 +- deps/npm/man/man3/prefix.3 | 2 +- deps/npm/man/man3/prune.3 | 2 +- deps/npm/man/man3/publish.3 | 2 +- deps/npm/man/man3/rebuild.3 | 2 +- deps/npm/man/man3/restart.3 | 2 +- deps/npm/man/man3/root.3 | 2 +- deps/npm/man/man3/run-script.3 | 2 +- deps/npm/man/man3/search.3 | 2 +- deps/npm/man/man3/shrinkwrap.3 | 2 +- deps/npm/man/man3/start.3 | 2 +- deps/npm/man/man3/stop.3 | 2 +- deps/npm/man/man3/submodule.3 | 2 +- deps/npm/man/man3/tag.3 | 2 +- deps/npm/man/man3/test.3 | 2 +- deps/npm/man/man3/uninstall.3 | 2 +- deps/npm/man/man3/unpublish.3 | 2 +- deps/npm/man/man3/update.3 | 2 +- deps/npm/man/man3/version.3 | 2 +- deps/npm/man/man3/view.3 | 2 +- deps/npm/man/man3/whoami.3 | 2 +- deps/npm/package.json | 2 +- deps/npm/test/tap/ignore-shrinkwrap.js | 80 +++++++++++++++++++ .../tap/ignore-shrinkwrap/npm-shrinkwrap.json | 17 ++++ .../test/tap/ignore-shrinkwrap/package.json | 8 ++ 203 files changed, 332 insertions(+), 207 deletions(-) create mode 100644 deps/npm/test/tap/ignore-shrinkwrap.js create mode 100644 deps/npm/test/tap/ignore-shrinkwrap/npm-shrinkwrap.json create mode 100644 deps/npm/test/tap/ignore-shrinkwrap/package.json diff --git a/deps/npm/doc/cli/install.md b/deps/npm/doc/cli/install.md index 2f325514a6c..44885f31802 100644 --- a/deps/npm/doc/cli/install.md +++ b/deps/npm/doc/cli/install.md @@ -168,6 +168,12 @@ 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-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(1)`. Many of the configuration params have some effect on installation, since that's most of what npm does. diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 55fc4c66bae..1c13946b102 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@
This function should not be used programmatically. Instead, just refer
to the npm.bin
member.