From 44527e602372839f0f9de1dd5168827e779dd2ef Mon Sep 17 00:00:00 2001
From: Ben Noordhuis
Date: Sat, 17 Mar 2012 15:50:43 +0100
Subject: [PATCH 01/44] deps: upgrade http_parser to joyent/http-parser@b47c44d
---
deps/http_parser/http_parser.c | 15 ++++++++--
deps/http_parser/http_parser.h | 2 +-
deps/http_parser/test.c | 50 ++++++++++++++++++++++++++++++----
3 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/deps/http_parser/http_parser.c b/deps/http_parser/http_parser.c
index bbeceb0a51..5e135f7b20 100644
--- a/deps/http_parser/http_parser.c
+++ b/deps/http_parser/http_parser.c
@@ -1733,9 +1733,20 @@ http_should_keep_alive (http_parser *parser)
/* HTTP/1.1 */
if (parser->flags & F_CONNECTION_CLOSE) {
return 0;
- } else {
- return 1;
}
+ if (parser->type == HTTP_RESPONSE) {
+ /* See RFC 2616 section 4.4 */
+ if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
+ parser->status_code == 204 || /* No Content */
+ parser->status_code == 304 || /* Not Modified */
+ parser->flags & F_SKIPBODY) { /* response to a HEAD request */
+ return 1;
+ }
+ if (!(parser->flags & F_CHUNKED) && parser->content_length == -1) {
+ return 0;
+ }
+ }
+ return 1;
} else {
/* HTTP/1.0 or earlier */
if (parser->flags & F_CONNECTION_KEEP_ALIVE) {
diff --git a/deps/http_parser/http_parser.h b/deps/http_parser/http_parser.h
index 76a61f26b7..69f66d6d22 100644
--- a/deps/http_parser/http_parser.h
+++ b/deps/http_parser/http_parser.h
@@ -28,7 +28,7 @@ extern "C" {
#define HTTP_PARSER_VERSION_MINOR 0
#include
-#if defined(_WIN32) && !defined(__MINGW32__) && !defined(_MSC_VER)
+#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
diff --git a/deps/http_parser/test.c b/deps/http_parser/test.c
index 6af0e787e9..be633eb3b8 100644
--- a/deps/http_parser/test.c
+++ b/deps/http_parser/test.c
@@ -780,8 +780,8 @@ const struct message responses[] =
, {.name= "404 no headers no body"
,.type= HTTP_RESPONSE
,.raw= "HTTP/1.1 404 Not Found\r\n\r\n"
- ,.should_keep_alive= TRUE
- ,.message_complete_on_eof= FALSE
+ ,.should_keep_alive= FALSE
+ ,.message_complete_on_eof= TRUE
,.http_major= 1
,.http_minor= 1
,.status_code= 404
@@ -795,8 +795,8 @@ const struct message responses[] =
, {.name= "301 no response phrase"
,.type= HTTP_RESPONSE
,.raw= "HTTP/1.1 301\r\n\r\n"
- ,.should_keep_alive = TRUE
- ,.message_complete_on_eof= FALSE
+ ,.should_keep_alive = FALSE
+ ,.message_complete_on_eof= TRUE
,.http_major= 1
,.http_minor= 1
,.status_code= 301
@@ -1057,8 +1057,46 @@ const struct message responses[] =
{}
,.body= ""
}
-, {.name= NULL } /* sentinel */
+#define NO_CONTENT_LENGTH_NO_TRANSFER_ENCODING_RESPONSE 13
+/* The client should wait for the server's EOF. That is, when neither
+ * content-length nor transfer-encoding is specified, the end of body
+ * is specified by the EOF.
+ */
+, {.name= "neither content-length nor transfer-encoding response"
+ ,.type= HTTP_RESPONSE
+ ,.raw= "HTTP/1.1 200 OK\r\n"
+ "Content-Type: text/plain\r\n"
+ "\r\n"
+ "hello world"
+ ,.should_keep_alive= FALSE
+ ,.message_complete_on_eof= TRUE
+ ,.http_major= 1
+ ,.http_minor= 1
+ ,.status_code= 200
+ ,.num_headers= 1
+ ,.headers=
+ { { "Content-Type", "text/plain" }
+ }
+ ,.body= "hello world"
+ }
+
+#define NO_HEADERS_NO_BODY_204 14
+, {.name= "204 no headers no body"
+ ,.type= HTTP_RESPONSE
+ ,.raw= "HTTP/1.1 204 No Content\r\n\r\n"
+ ,.should_keep_alive= TRUE
+ ,.message_complete_on_eof= FALSE
+ ,.http_major= 1
+ ,.http_minor= 1
+ ,.status_code= 204
+ ,.num_headers= 0
+ ,.headers= {}
+ ,.body_size= 0
+ ,.body= ""
+ }
+
+, {.name= NULL } /* sentinel */
};
int
@@ -1888,7 +1926,7 @@ main (void)
printf("response scan 1/2 ");
test_scan( &responses[TRAILING_SPACE_ON_CHUNKED_BODY]
- , &responses[NO_HEADERS_NO_BODY_404]
+ , &responses[NO_HEADERS_NO_BODY_204]
, &responses[NO_REASON_PHRASE]
);
From 03077db45de5590a1f5651ec86abc70e4fd8a1d4 Mon Sep 17 00:00:00 2001
From: koichik
Date: Sun, 18 Mar 2012 00:50:47 +0900
Subject: [PATCH 02/44] test: HTTP responses with no content-length
Refs: #2952.
---
test/simple/test-http-no-content-length.js | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 test/simple/test-http-no-content-length.js
diff --git a/test/simple/test-http-no-content-length.js b/test/simple/test-http-no-content-length.js
new file mode 100644
index 0000000000..8c565aedc7
--- /dev/null
+++ b/test/simple/test-http-no-content-length.js
@@ -0,0 +1,46 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var common = require('../common');
+var assert = require('assert');
+var net = require('net');
+var http = require('http');
+
+var body = '';
+
+var server = net.createServer(function(socket) {
+ // Neither Content-Length nor Connection
+ socket.end('HTTP/1.1 200 ok\r\n\r\nHello');
+}).listen(common.PORT, function() {
+ var req = http.get({port: common.PORT}, function(res) {
+ res.setEncoding('utf8');
+ res.on('data', function(chunk) {
+ body += chunk;
+ });
+ res.on('end', function() {
+ server.close();
+ });
+ });
+});
+
+process.on('exit', function() {
+ assert.equal(body, 'Hello');
+});
From d980620010a2bc2dc1972ada80afdca53ea1037b Mon Sep 17 00:00:00 2001
From: isaacs
Date: Sat, 17 Mar 2012 11:00:05 -0700
Subject: [PATCH 03/44] Ignore 'making a build' artifacts
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index 6eb3b0a398..3b2ad3f45a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,6 @@ ipch/
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
+email.md
+blog.html
+deps/v8-*
From 851b3970e721805644377a2b6c6038cdd6b33f8a Mon Sep 17 00:00:00 2001
From: isaacs
Date: Sat, 17 Mar 2012 11:07:28 -0700
Subject: [PATCH 04/44] Fix include logic was replacing https include with http
---
tools/doc/generate.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/doc/generate.js b/tools/doc/generate.js
index af81372532..43e94311ff 100755
--- a/tools/doc/generate.js
+++ b/tools/doc/generate.js
@@ -86,7 +86,7 @@ function processIncludes(input, cb) {
if (er) return cb(errState = er);
incCount--;
includeData[fname] = inc;
- input = input.split(include).join(includeData[fname]);
+ input = input.split(include+'\n').join(includeData[fname]+'\n');
if (incCount === 0) {
return cb(null, input);
}
From ea44d3031d101b42b427e2b33355e27ec616e731 Mon Sep 17 00:00:00 2001
From: Ben Noordhuis
Date: Thu, 22 Mar 2012 15:52:12 +0100
Subject: [PATCH 05/44] crypto: fix compile-time error with openssl <= 0.9.7e
---
src/node_crypto.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index cf43cc6504..bf95d79701 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -993,7 +993,10 @@ Handle Connection::New(const Arguments& args) {
}
-void Connection::SSLInfoCallback(const SSL *ssl, int where, int ret) {
+void Connection::SSLInfoCallback(const SSL *ssl_, int where, int ret) {
+ // Be compatible with older versions of OpenSSL. SSL_get_app_data() wants
+ // a non-const SSL* in OpenSSL <= 0.9.7e.
+ SSL* ssl = const_cast(ssl_);
if (where & SSL_CB_HANDSHAKE_START) {
HandleScope scope;
Connection* c = static_cast(SSL_get_app_data(ssl));
From d1255914df46ac367d289614464cc249c3a4bb6c Mon Sep 17 00:00:00 2001
From: Bryan Cantrill
Date: Thu, 22 Mar 2012 23:06:35 +0000
Subject: [PATCH 06/44] sunos: fix EMFILE on process.memoryUsage()
---
src/platform_sunos.cc | 21 ++++++--------
test/simple/test-memory-usage-emfile.js | 37 +++++++++++++++++++++++++
2 files changed, 45 insertions(+), 13 deletions(-)
create mode 100644 test/simple/test-memory-usage-emfile.js
diff --git a/src/platform_sunos.cc b/src/platform_sunos.cc
index 949e4e13f9..f71154f08d 100644
--- a/src/platform_sunos.cc
+++ b/src/platform_sunos.cc
@@ -36,6 +36,7 @@
#include
#include
#include
+#include
#ifdef SUNOS_HAVE_IFADDRS
# include
@@ -80,25 +81,19 @@ const char* Platform::GetProcessTitle(int *len) {
int Platform::GetMemory(size_t *rss) {
- pid_t pid = getpid();
-
- char pidpath[1024];
- sprintf(pidpath, "/proc/%d/psinfo", pid);
-
psinfo_t psinfo;
- FILE *f = fopen(pidpath, "r");
- if (!f) return -1;
+ int fd;
- if (fread(&psinfo, sizeof(psinfo_t), 1, f) != 1) {
- fclose (f);
+ if ((fd = open("/proc/self/psinfo", O_RDONLY)) < 0)
return -1;
- }
- /* XXX correct? */
+ if (read(fd, &psinfo, sizeof (psinfo_t)) != sizeof (psinfo_t)) {
+ (void) close(fd);
+ return -1;
+ }
*rss = (size_t) psinfo.pr_rssize * 1024;
-
- fclose (f);
+ (void) close(fd);
return 0;
}
diff --git a/test/simple/test-memory-usage-emfile.js b/test/simple/test-memory-usage-emfile.js
new file mode 100644
index 0000000000..aaed899530
--- /dev/null
+++ b/test/simple/test-memory-usage-emfile.js
@@ -0,0 +1,37 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+
+var common = require('../common');
+var assert = require('assert');
+
+var fs = require('fs');
+
+var files = [];
+
+while (files.length < 256)
+ files.push(fs.openSync(__filename, 'r'));
+
+var r = process.memoryUsage();
+console.log(common.inspect(r));
+assert.equal(true, r['rss'] > 0);
From 67f1778065b4f1d96a59f5290c57061c1808feb8 Mon Sep 17 00:00:00 2001
From: isaacs
Date: Thu, 22 Mar 2012 16:38:58 -0700
Subject: [PATCH 07/44] Upgrade npm to 1.1.12
---
deps/npm/.npmignore | 4 +
deps/npm/html/api/bin.html | 2 +-
deps/npm/html/api/bugs.html | 2 +-
deps/npm/html/api/commands.html | 2 +-
deps/npm/html/api/config.html | 2 +-
deps/npm/html/api/deprecate.html | 2 +-
deps/npm/html/api/docs.html | 2 +-
deps/npm/html/api/edit.html | 2 +-
deps/npm/html/api/explore.html | 2 +-
deps/npm/html/api/help-search.html | 2 +-
deps/npm/html/api/init.html | 2 +-
deps/npm/html/api/install.html | 2 +-
deps/npm/html/api/link.html | 2 +-
deps/npm/html/api/load.html | 2 +-
deps/npm/html/api/ls.html | 2 +-
deps/npm/html/api/npm.html | 4 +-
deps/npm/html/api/outdated.html | 2 +-
deps/npm/html/api/owner.html | 2 +-
deps/npm/html/api/pack.html | 2 +-
deps/npm/html/api/prefix.html | 2 +-
deps/npm/html/api/prune.html | 2 +-
deps/npm/html/api/publish.html | 2 +-
deps/npm/html/api/rebuild.html | 2 +-
deps/npm/html/api/restart.html | 2 +-
deps/npm/html/api/root.html | 2 +-
deps/npm/html/api/run-script.html | 2 +-
deps/npm/html/api/search.html | 2 +-
deps/npm/html/api/shrinkwrap.html | 2 +-
deps/npm/html/api/start.html | 2 +-
deps/npm/html/api/stop.html | 2 +-
deps/npm/html/api/submodule.html | 2 +-
deps/npm/html/api/tag.html | 2 +-
deps/npm/html/api/test.html | 2 +-
deps/npm/html/api/uninstall.html | 2 +-
deps/npm/html/api/unpublish.html | 2 +-
deps/npm/html/api/update.html | 2 +-
deps/npm/html/api/version.html | 2 +-
deps/npm/html/api/view.html | 2 +-
deps/npm/html/api/whoami.html | 2 +-
deps/npm/html/doc/README.html | 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/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/help-search.html | 2 +-
deps/npm/html/doc/help.html | 2 +-
deps/npm/html/doc/index.html | 2 +-
deps/npm/html/doc/init.html | 2 +-
deps/npm/html/doc/install.html | 2 +-
deps/npm/html/doc/json.html | 2 +-
deps/npm/html/doc/link.html | 2 +-
deps/npm/html/doc/list.html | 2 +-
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/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/start.html | 2 +-
deps/npm/html/doc/stop.html | 2 +-
deps/npm/html/doc/submodule.html | 2 +-
deps/npm/html/doc/tag.html | 2 +-
deps/npm/html/doc/test.html | 2 +-
deps/npm/html/doc/uninstall.html | 2 +-
deps/npm/html/doc/unpublish.html | 2 +-
deps/npm/html/doc/update.html | 2 +-
deps/npm/html/doc/version.html | 2 +-
deps/npm/html/doc/view.html | 2 +-
deps/npm/html/doc/whoami.html | 2 +-
deps/npm/lib/cache.js | 24 ++--
deps/npm/lib/install.js | 21 +++-
deps/npm/lib/uninstall.js | 7 +-
deps/npm/lib/utils/excludes.js | 6 +-
deps/npm/lib/utils/read-json.js | 7 +-
deps/npm/lib/utils/tar.js | 38 +++---
deps/npm/man/man1/npm.1 | 2 +-
deps/npm/man/man3/npm.3 | 2 +-
deps/npm/node_modules/fstream/.npmignore | 4 +-
deps/npm/node_modules/fstream/LICENCE | 25 ++++
.../node_modules/fstream/lib/dir-writer.js | 3 +
.../node_modules/fstream/lib/proxy-reader.js | 3 +
deps/npm/node_modules/fstream/lib/writer.js | 9 ++
deps/npm/node_modules/fstream/package.json | 15 +--
.../node_modules/graceful-fs/graceful-fs.js | 23 +++-
.../npm/node_modules/graceful-fs/package.json | 23 +++-
deps/npm/node_modules/inherits/LICENSE | 30 ++---
deps/npm/node_modules/inherits/package.json | 52 ++++++--
deps/npm/node_modules/node-gyp/lib/build.js | 11 +-
.../node_modules/node-gyp/lib/configure.js | 11 +-
deps/npm/node_modules/node-gyp/lib/install.js | 111 ++++++++----------
.../node-gyp/node_modules/ansi/package.json | 5 +-
.../node-gyp/node_modules/glob/LICENCE | 25 ++++
.../node-gyp/node_modules/glob/glob.js | 75 ++++++++++--
.../glob/node_modules/minimatch/README.md | 14 ++-
.../glob/node_modules/minimatch/minimatch.js | 12 +-
.../glob/node_modules/minimatch/package.json | 8 +-
.../node-gyp/node_modules/glob/package.json | 7 +-
deps/npm/node_modules/node-gyp/package.json | 10 +-
deps/npm/package.json | 3 +-
.../test/packages/npm-test-files/package.json | 3 +-
126 files changed, 506 insertions(+), 279 deletions(-)
create mode 100644 deps/npm/node_modules/fstream/LICENCE
create mode 100644 deps/npm/node_modules/node-gyp/node_modules/glob/LICENCE
diff --git a/deps/npm/.npmignore b/deps/npm/.npmignore
index 6ab186883a..5ddef35600 100644
--- a/deps/npm/.npmignore
+++ b/deps/npm/.npmignore
@@ -11,3 +11,7 @@ npm-debug.log
./npmrc
.gitignore
release/
+
+# don't ignore .npmignore files
+# these are used in some tests.
+!.npmignore
diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html
index 4e32ea1f01..b8937d7c73 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.
-
+
From d497bf845b9d0a029ae51686bfe0dc2b3fa2070a Mon Sep 17 00:00:00 2001
From: isaacs
Date: Fri, 16 Mar 2012 08:19:18 -0700
Subject: [PATCH 12/44] doc: Remove extraneous index.html's from hyperlinks
---
doc/about/index.html | 4 ++--
doc/community/index.html | 4 ++--
doc/index.html | 8 ++++----
doc/logos/index.html | 4 ++--
doc/template.html | 4 ++--
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/doc/about/index.html b/doc/about/index.html
index 2f629072f8..cecebef013 100644
--- a/doc/about/index.html
+++ b/doc/about/index.html
@@ -31,7 +31,7 @@
Download
About
npm Registry
- Docs
+ Docs
Blog
Logos
@@ -122,7 +122,7 @@ console.log('Server running at http://127.0.0.1:1337/');
Download
About
npm Registry
- Docs
+ Docs
Blog
Community
Logos
diff --git a/doc/community/index.html b/doc/community/index.html
index c4449e0d6e..7087f795f8 100644
--- a/doc/community/index.html
+++ b/doc/community/index.html
@@ -33,7 +33,7 @@
Download
About
npm Registry
- Docs
+ Docs
Blog
Logos
@@ -172,7 +172,7 @@
Download
About
npm Registry
- Docs
+ Docs
Blog
Community
Logos
diff --git a/doc/index.html b/doc/index.html
index f3cca4ecf4..98187f7c70 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -30,7 +30,7 @@
applications that run across distributed devices.
Download
- Docs
+ Docs
__VERSION__
@@ -84,7 +84,7 @@
- Change Log
- - Documentation
+ - Documentation
- Other release files
- License
- Git Repository
@@ -188,7 +188,7 @@ server.listen(1337, '127.0.0.1');
- About
Technical overview
- npm Registry
Modules, resources and more
- - Documentation
API Specifications
+ - Documentation
API Specifications
- Node.js Blog
Insight, perspective and events
- Community
Mailing lists, blogs, and more
- Logos
Logo and desktop background
@@ -203,7 +203,7 @@ server.listen(1337, '127.0.0.1');
- Download
- About
- npm Registry
- - Docs
+ - Docs
- Blog
- Community
- Logos
diff --git a/doc/logos/index.html b/doc/logos/index.html
index 0ad1863112..02b933052d 100644
--- a/doc/logos/index.html
+++ b/doc/logos/index.html
@@ -31,7 +31,7 @@
- Download
- About
- npm Registry
- - Docs
+ - Docs
- Blog
- Logos
@@ -74,7 +74,7 @@
- Download
- About
- npm Registry
- - Docs
+ - Docs
- Blog
- Community
- Logos
diff --git a/doc/template.html b/doc/template.html
index 630d6b71b2..93edf4934c 100644
--- a/doc/template.html
+++ b/doc/template.html
@@ -20,7 +20,7 @@
- Download
- About
- npm Registry
- - Docs
+ - Docs
- Blog
- Logos
@@ -58,7 +58,7 @@
- Download
- About
- npm Registry
- - Docs
+ - Docs
- Blog
- Community
- Logos
From e513ffef7549a56a5af728e1f0c2c0c8f290518a Mon Sep 17 00:00:00 2001
From: isaacs
Date: Thu, 22 Mar 2012 17:32:11 -0700
Subject: [PATCH 13/44] 2012.03.22 Version 0.6.14 (stable)
* net: don't crash when queued write fails (Igor Zinkovsky)
* sunos: fix EMFILE on process.memoryUsage() (Bryan Cantrill)
* crypto: fix compile-time error with openssl 0.9.7e (Ben Noordhuis)
* unix: ignore ECONNABORTED errors from accept() (Ben Noordhuis)
* Add UV_ENOSPC and mappings to it (Bert Belder)
* http-parser: Fix response body is not read (koichik)
* Upgrade npm to 1.1.12
- upgrade node-gyp to 0.3.7
- work around AV-locked directories on Windows
- Fix isaacs/npm#2293 Don't try to 'uninstall' /
- Exclude symbolic links from packages.
- Fix isaacs/npm#2275 Spurious 'unresolvable cycle' error.
- Exclude/include dot files as if they were normal files
---
AUTHORS | 5 +++++
ChangeLog | 25 ++++++++++++++++++++++++-
src/node_version.h | 2 +-
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 93ea8a9362..eecc2add1e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -267,3 +267,8 @@ Philip Tellis
Christopher Jeffrey
Seth Fitzsimmons
Einar Otto Stangvik
+Paul Vorbach
+tedsuo
+Joshua Holbrook
+Rod Vagg
+Bryan Cantrill
diff --git a/ChangeLog b/ChangeLog
index e831c3fc6d..ef7d3fccbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,27 @@
-2012.03.15 Version 0.6.13 (stable)
+2012.03.22 Version 0.6.14 (stable)
+
+* net: don't crash when queued write fails (Igor Zinkovsky)
+
+* sunos: fix EMFILE on process.memoryUsage() (Bryan Cantrill)
+
+* crypto: fix compile-time error with openssl 0.9.7e (Ben Noordhuis)
+
+* unix: ignore ECONNABORTED errors from accept() (Ben Noordhuis)
+
+* Add UV_ENOSPC and mappings to it (Bert Belder)
+
+* http-parser: Fix response body is not read (koichik)
+
+* Upgrade npm to 1.1.12
+ - upgrade node-gyp to 0.3.7
+ - work around AV-locked directories on Windows
+ - Fix isaacs/npm#2293 Don't try to 'uninstall' /
+ - Exclude symbolic links from packages.
+ - Fix isaacs/npm#2275 Spurious 'unresolvable cycle' error.
+ - Exclude/include dot files as if they were normal files
+
+
+2012.03.15 Version 0.6.13 (stable), 9f7f86b534f8556290eb8cad915984ff4ca54996
* Windows: Many libuv test fixes (Bert Belder)
diff --git a/src/node_version.h b/src/node_version.h
index 3445e34de4..d1d45361a1 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -29,7 +29,7 @@
#define NODE_MAJOR_VERSION 0
#define NODE_MINOR_VERSION 6
#define NODE_PATCH_VERSION 14
-#define NODE_VERSION_IS_RELEASE 0
+#define NODE_VERSION_IS_RELEASE 1
#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
From a7dce4785434ebb6eb259374174d9e5985c0baaa Mon Sep 17 00:00:00 2001
From: isaacs
Date: Fri, 23 Mar 2012 11:17:08 -0700
Subject: [PATCH 14/44] Now working on v0.6.15
---
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 d1d45361a1..de8050f331 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -28,8 +28,8 @@
#define NODE_MAJOR_VERSION 0
#define NODE_MINOR_VERSION 6
-#define NODE_PATCH_VERSION 14
-#define NODE_VERSION_IS_RELEASE 1
+#define NODE_PATCH_VERSION 15
+#define NODE_VERSION_IS_RELEASE 0
#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
From 066789a6e33eccde3dcde420d58cb497f8f8b55d Mon Sep 17 00:00:00 2001
From: isaacs
Date: Sat, 24 Mar 2012 01:39:39 -0700
Subject: [PATCH 15/44] Fix #3001 website update 'latest' links on publish
---
Makefile | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Makefile b/Makefile
index 77f4ce2ac5..737f49ae5a 100644
--- a/Makefile
+++ b/Makefile
@@ -126,6 +126,13 @@ out/doc/%:
website-upload: doc
rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
+ ssh node@nodejs.org '\
+ rm -f ~/web/nodejs.org/dist/latest &&\
+ ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\
+ rm -f ~/web/nodejs.org/docs/latest &&\
+ ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\
+ rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
+ ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz'
docopen: out/doc/api/all.html
-google-chrome out/doc/api/all.html
From 1e577f347b0b14f8c258c86bbcea674ded205cbe Mon Sep 17 00:00:00 2001
From: isaacs
Date: Fri, 30 Mar 2012 18:21:50 -0700
Subject: [PATCH 16/44] website: Consistency in the industry logos
---
doc/images/linkedin-logo.png | Bin 2346 -> 1458 bytes
doc/images/microsoft-logo.png | Bin 2570 -> 1670 bytes
doc/images/yahoo-logo.png | Bin 2581 -> 1679 bytes
doc/pipe.css | 11 +----------
4 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/doc/images/linkedin-logo.png b/doc/images/linkedin-logo.png
index 2ad9fb2c0c3ed54ac54f504383702e3bdcccbf2d..1c79cf4acd7b19224eadc3c55d3b23588137f9c5 100644
GIT binary patch
delta 1417
zcmV;41$O$X60!@B7YZT>0{{R3asTHjks&940f10UR7Ep1Ez;P!$IP%kKsV9XxyQ}1
zxW1!NQ%KI#x3#*UM@c_JMLW8`rNqgtIXW^yLOG+SkTo_hQdCK3Yg}4gP+40~WM^5%
z%&)7jmpVK&G&L@3ZeOXcmNqvqN=!jqUQuFXR>{t?r>vB(w3}C1O_rL3%+j^W(6e@b
zd1;fEg1o_|sI8T1ZC;0pcVA*uo}!F6IWcK$U6h!EJUunDxSw5MQ@_Qjo1ck$er>U~
zosW}#K0h`$I55V`uYG}Uba!WLZ(z{XxRREFd3mc)r7^u(h1B
zx1LQ-M7F!3k(Gc>P({ttwyUt1nVpAtduoV_c(}czt+AQ1x1EEBbfc(|nVpD#ba-cl
ziFT5ffj7kNlmGw&$Vo&&RCwC#mT6ZSOAv;;m;nhO6BsfgGQc34gdnm92q23F5L^>?
zjr*3Eec%52t!7X!vUtute7eW_LQm6OPj}T@-A%~7-P^tWFD-K#)u}qo|1mg7%K9_t
zZm;zNq!_(DC@QAQXp7~)QHB(M)FsGI&NU2R@A
zaO8F$$|Qi-E>q6&lYiBN@(@7RT7RSf5RSBYnNkBh??Z6|%si4Q{$pZ)bFz0+h~7AR
zOL>77B_n3$F(RT?qZw`e6+1=i$)vCxIiR
zO?``UFbv?yS&C9~eU(jrk%-w3v^jmkUQ?``-tq;)hIytMFrc&ZN;^e$MTr7@pUO!nBzQ-E>(7zH@9
zb$UMRm(@_oB>~h~vTp@=mmwmiVt4c>t|7IqDW2R=9%I6uzyx)Fl&{8U6&&6{`N)vV
z3xKmrhZqEdRDHZ{fonTiR$SA`57rFT(42UU@Z}U!%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BZ44JK)fD4cd^{VO|u61`t|WROp)%Fw!`ndEO`rhOw1Sdpx6lq
zJq@$%F_x)ycC(U_d+`!xOV8O`ax;BX
zC&S%BBDQZ6i>WWXywVf~^WN9`hgStSx1S#+r`uu=yhT+z`;&H@C__WccbzyAH
zZX3(kf#s%MBvy0tIIvF_wr=>1&6UO0Xp=r*rKV^=ta`up0O=cBu$a5Ie$BXof$AZ##xr8pKr4u~|+PZVjyo9pKg>x5G=ia-ek9Kplx?2;gd@s8{
zYK2n_yD@B%aOju1=jy7dyGaaD!|-BIZoFa7cc)I~jI8VHkvR7biVt!sX>X=Dl>ItfMj9#ktBkml1
zYj6?QuBqi44^=YHnx-u;n3P?9Hm_s6V#Qa`X{!a^=C0>ZgR+db>sQsDJ%xhgu@fqT
zf+0G#u+w{a!Od4@7K8UJg~3}*TNCC!w2#}rq+z!e_qyj1k%im%>|o)XN@ZE+qnhR4+}7UEX9kzKMr|(?
z^dI^8w!dv4Yh#vw=!5iohbn!-_Gi6b_Bby`Uh&((7%i`CEUzQueQU^`pwRa3+u``h
z1atFhj~;3L>LeguSp&D+WnW@px7j$Bf7Lz}(>@tD`h*ufmLLP-UK^$yTY59HUzG-|
zFsYoUmkzHY`$_J<7L*s+ha|899n97}ek=UF3)nM0_=;#V_$V~Z%DK~cq
zp`qYP?cAX|z(uvk=6_`Sk4~Dhw@&`hb;&H!_ItmSdS?334ZZf8ui@;AY}^Z}bzbT@
z#on7r6;5mV{l-=w+KygXq~BsQ>LCraO6`{VM9mR6B|j1orP8oHfr8PP=AM?RV=Fp4
zR2GVg9}GR&M#GXp@c7z$@`{0XPf)h=??6VgQ1+H?E4W|##Z3Rb@VM@rYSxapzW@R5
B(boU~
diff --git a/doc/images/microsoft-logo.png b/doc/images/microsoft-logo.png
index 6dac0f39b6710c75342e373097bc927efd6177ad..1a58d1076277c0af2ffac36324b6761b5d9d891c 100644
GIT binary patch
delta 1631
zcmV-l2B7(h6ow6u7YZT>0{{R3VkoEGks&940f10UR7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62E8X7B{0^X9HFy0TW1-`(;75E*
z*5i{qQugUqR4-kudDnX~S636A*zm`5+bus2_4J&?RBd?Tnv<}6Q`4`Sm446Fuct=d
z&(z*=@lE%K8zO>lVK0eY>oeLKwutrEBi;8eS*Kw?!jlXK))!p4wE4Q`PVR&Fs;l|Q
zkA6;=_*Xm{&ep31_9m`tGAG>W3h?{5YHhDV<*3)}$y|ZmI({oAkS&IkW
z*SLGshBY^&?R%>))=%)BKVE2LQd3VWH)-#_v4`|DN%X>+b6Y{ChvFS{=Pw!_thZgz
znscuwSfz8aBXwNSg=m%`ck(Wc)CGYT43tw^>ri-;MbB5;sKJDdLb;0Dt_JV5X
zg=EU;O1GEg;!QJ@&DJ*J^QsmT%hx;}UuQn>J27@av+-(CS1n^Ow7=ohhE=0%x|6|b
zRk`n{^@c)Q>W$Xbamm9SJq|Jyr^`LMU$qhIlh@I8t94s!XRL8j>M=i5a7$H4#u!^&
zk{;)wA+=yVd!uo1t*@)*8oVwp!spRJ+nHU{rDyK{lsjrPnYKn;Ymzd?8F=n#JTlpt
z6jYe-dRv=^i{r6nsgZztUTB-iuF8AP6H$YQmPqFN;EXYx
zw+YiDx=xx_PH#g!HoR_nqGvsR@@`nzg8V@(-TYLnv9(H``cKuxD%kPICtMO`6!uEz
zV&=PRc&(Y(ur?jfwAwAP`wHLvHd*&N1*hlsY3gZVyH2MuW4h#Qii6W}r#*?=t!DgA
z_dR^Na5xZI7oKCLlTpiKESZA0b?E_
Date: Tue, 13 Mar 2012 18:31:04 -0700
Subject: [PATCH 17/44] js2c: fix to support files other than ones ending with
2 char extensions
Previously this was basically hard-coded for *.js files, but now we
need to include the 'config.gypi' file in there as well.
---
tools/js2c.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/js2c.py b/tools/js2c.py
index fd8b25b1a4..69ec8a83c4 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -288,7 +288,7 @@ def JS2C(source, target):
lines = ExpandMacros(lines, macros)
lines = CompressScript(lines, do_jsmin)
data = ToCArray(s, lines)
- id = (os.path.split(str(s))[1])[:-3]
+ id = os.path.basename(str(s)).split('.')[0]
if delay: id = id[:-6]
if delay:
delay_ids.append((id, len(lines)))
From ffee8739417a5db1d4e32f98fd28fea4c9bc8f42 Mon Sep 17 00:00:00 2001
From: Ben Noordhuis
Date: Mon, 2 Apr 2012 23:44:36 +0200
Subject: [PATCH 18/44] build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.
Fixes #2061.
---
deps/uv/config-unix.mk | 2 +-
wscript | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/deps/uv/config-unix.mk b/deps/uv/config-unix.mk
index 8fe7254cfd..ca1b1453e3 100644
--- a/deps/uv/config-unix.mk
+++ b/deps/uv/config-unix.mk
@@ -50,7 +50,7 @@ endif
ifeq (Darwin,$(uname_S))
EV_CONFIG=config_darwin.h
EIO_CONFIG=config_darwin.h
-CPPFLAGS += -Isrc/ares/config_darwin
+CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 -Isrc/ares/config_darwin
LINKFLAGS+=-framework CoreServices
OBJS += src/unix/darwin.o
OBJS += src/unix/kqueue.o
diff --git a/wscript b/wscript
index 2b04358559..a63db7d3ae 100644
--- a/wscript
+++ b/wscript
@@ -469,6 +469,9 @@ def configure(conf):
conf.env.append_value('CPPFLAGS', '-D_LARGEFILE_SOURCE')
conf.env.append_value('CPPFLAGS', '-D_FILE_OFFSET_BITS=64')
+ if sys.platform.startswith('darwin'):
+ conf.env.append_value('CPPFLAGS', '-D_DARWIN_USE_64_BIT_INODE=1')
+
# Makes select on windows support more than 64 FDs
if sys.platform.startswith("win32"):
conf.env.append_value('CPPFLAGS', '-DFD_SETSIZE=1024');
From 052aaa4c4dbb52c9430b609cdfe81fc942a7df64 Mon Sep 17 00:00:00 2001
From: Igor Zinkovsky
Date: Thu, 5 Apr 2012 16:03:11 -0700
Subject: [PATCH 19/44] windows: use 64bit offsets for uv_fs apis
---
src/node.h | 8 ++++
src/node_file.cc | 98 ++++++++++++++++++++++++++++++------------------
2 files changed, 70 insertions(+), 36 deletions(-)
diff --git a/src/node.h b/src/node.h
index 05e3f7535f..3692060263 100644
--- a/src/node.h
+++ b/src/node.h
@@ -91,6 +91,14 @@
#define NODE_STRINGIFY_HELPER(n) #n
#endif
+#ifndef STATIC_ASSERT
+#if defined(_MSC_VER)
+# define STATIC_ASSERT(expr) static_assert(expr, "")
+# else
+# define STATIC_ASSERT(expr) static_cast((sizeof(char[-1 + !!(expr)])))
+# endif
+#endif
+
namespace node {
int Start(int argc, char *argv[]);
diff --git a/src/node_file.cc b/src/node_file.cc
index 645f44532b..0c0555e7e2 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -40,7 +40,6 @@
# include
#endif
-
namespace node {
using namespace v8;
@@ -68,10 +67,41 @@ static Persistent buf_symbol;
static Persistent oncomplete_sym;
-#ifdef _LARGEFILE_SOURCE
-static inline int IsInt64(double x) {
- return x == static_cast(static_cast(x));
-}
+#ifndef _LARGEFILE_SOURCE
+ typedef off_t node_off_t;
+# define ASSERT_OFFSET(a) \
+ STATIC_ASSERT(sizeof(node_off_t) * CHAR_BIT >= 32); \
+ if (!(a)->IsUndefined() && !(a)->IsNull() && !(a)->IsInt32()) { \
+ return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
+ }
+# define ASSERT_TRUNCATE_LENGTH(a) \
+ if (!(a)->IsUndefined() && !(a)->IsNull() && !(a)->IsUint32()) { \
+ return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
+ }
+# define GET_OFFSET(a) ((a)->IsNumber() ? (a)->Int32Value() : -1)
+# define GET_TRUNCATE_LENGTH(a) ((a)->Uint32Value())
+#else
+# ifdef _WIN32
+# define NODE_USE_64BIT_UV_FS_API
+ typedef int64_t node_off_t;
+# else
+ typedef off_t node_off_t;
+# endif
+# define ASSERT_OFFSET(a) \
+ STATIC_ASSERT(sizeof(node_off_t) * CHAR_BIT >= 64); \
+ if (!(a)->IsUndefined() && !(a)->IsNull() && !IsInt64((a)->NumberValue())) { \
+ return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
+ }
+# define ASSERT_TRUNCATE_LENGTH(a) \
+ if (!(a)->IsUndefined() && !(a)->IsNull() && !IsInt64((a)->NumberValue())) { \
+ return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
+ }
+# define GET_OFFSET(a) ((a)->IsNumber() ? (a)->IntegerValue() : -1)
+# define GET_TRUNCATE_LENGTH(a) ((a)->IntegerValue())
+
+ static inline int IsInt64(double x) {
+ return x == static_cast(static_cast(x));
+ }
#endif
@@ -470,20 +500,6 @@ static Handle Rename(const Arguments& args) {
}
}
-#ifndef _LARGEFILE_SOURCE
-#define ASSERT_TRUNCATE_LENGTH(a) \
- if (!(a)->IsUndefined() && !(a)->IsNull() && !(a)->IsUint32()) { \
- return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
- }
-#define GET_TRUNCATE_LENGTH(a) ((a)->Uint32Value())
-#else
-#define ASSERT_TRUNCATE_LENGTH(a) \
- if (!(a)->IsUndefined() && !(a)->IsNull() && !IsInt64((a)->NumberValue())) { \
- return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
- }
-#define GET_TRUNCATE_LENGTH(a) ((a)->IntegerValue())
-#endif
-
static Handle Truncate(const Arguments& args) {
HandleScope scope;
@@ -494,12 +510,20 @@ static Handle Truncate(const Arguments& args) {
int fd = args[0]->Int32Value();
ASSERT_TRUNCATE_LENGTH(args[1]);
- off_t len = GET_TRUNCATE_LENGTH(args[1]);
+ node_off_t len = GET_TRUNCATE_LENGTH(args[1]);
if (args[2]->IsFunction()) {
+#ifdef NODE_USE_64BIT_UV_FS_API
+ ASYNC_CALL(ftruncate64, args[2], fd, len)
+#else
ASYNC_CALL(ftruncate, args[2], fd, len)
+#endif
} else {
+#ifdef NODE_USE_64BIT_UV_FS_API
+ SYNC_CALL(ftruncate64, 0, fd, len)
+#else
SYNC_CALL(ftruncate, 0, fd, len)
+#endif
return Undefined();
}
}
@@ -671,20 +695,6 @@ static Handle Open(const Arguments& args) {
}
}
-#ifndef _LARGEFILE_SOURCE
-#define ASSERT_OFFSET(a) \
- if (!(a)->IsUndefined() && !(a)->IsNull() && !(a)->IsInt32()) { \
- return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
- }
-#define GET_OFFSET(a) ((a)->IsNumber() ? (a)->Int32Value() : -1)
-#else
-#define ASSERT_OFFSET(a) \
- if (!(a)->IsUndefined() && !(a)->IsNull() && !IsInt64((a)->NumberValue())) { \
- return ThrowException(Exception::TypeError(String::New("Not an integer"))); \
- }
-#define GET_OFFSET(a) ((a)->IsNumber() ? (a)->IntegerValue() : -1)
-#endif
-
// bytesWritten = write(fd, data, position, enc, callback)
// Wrapper for write(2).
//
@@ -725,15 +735,23 @@ static Handle Write(const Arguments& args) {
}
ASSERT_OFFSET(args[4]);
- off_t pos = GET_OFFSET(args[4]);
+ node_off_t pos = GET_OFFSET(args[4]);
char * buf = (char*)buffer_data + off;
Local cb = args[5];
if (cb->IsFunction()) {
+#ifdef NODE_USE_64BIT_UV_FS_API
+ ASYNC_CALL(write64, cb, fd, buf, len, pos)
+#else
ASYNC_CALL(write, cb, fd, buf, len, pos)
+#endif
} else {
+#ifdef NODE_USE_64BIT_UV_FS_API
+ SYNC_CALL(write64, 0, fd, buf, len, pos)
+#else
SYNC_CALL(write, 0, fd, buf, len, pos)
+#endif
return scope.Close(Integer::New(SYNC_RESULT));
}
}
@@ -762,7 +780,7 @@ static Handle Read(const Arguments& args) {
Local cb;
size_t len;
- off_t pos;
+ node_off_t pos;
char * buf = NULL;
@@ -794,9 +812,17 @@ static Handle Read(const Arguments& args) {
cb = args[5];
if (cb->IsFunction()) {
+#ifdef NODE_USE_64BIT_UV_FS_API
+ ASYNC_CALL(read64, cb, fd, buf, len, pos);
+#else
ASYNC_CALL(read, cb, fd, buf, len, pos);
+#endif
} else {
+#ifdef NODE_USE_64BIT_UV_FS_API
+ SYNC_CALL(read64, 0, fd, buf, len, pos)
+#else
SYNC_CALL(read, 0, fd, buf, len, pos)
+#endif
Local bytesRead = Integer::New(SYNC_RESULT);
return scope.Close(bytesRead);
}
From f178f2ae3fc6cd24221e8b9548902e18c63ab8e4 Mon Sep 17 00:00:00 2001
From: Igor Zinkovsky
Date: Thu, 5 Apr 2012 17:10:39 -0700
Subject: [PATCH 20/44] upgrade libuv to
d68b3d960b6d95bfc16027cecca2f3fa48bcc36f
---
deps/uv/include/uv.h | 9 +++
deps/uv/src/unix/fs.c | 31 ++++++++
deps/uv/src/win/error.c | 1 +
deps/uv/src/win/fs-event.c | 13 ++-
deps/uv/src/win/fs.c | 88 ++++++++++++++++----
deps/uv/src/win/pipe.c | 5 ++
deps/uv/src/win/tcp.c | 3 +-
deps/uv/src/win/udp.c | 7 +-
deps/uv/test/test-fs-event.c | 106 +++++++++++++++++++++++--
deps/uv/test/test-fs.c | 35 ++++++--
deps/uv/test/test-list.h | 6 ++
deps/uv/test/test-pipe-connect-error.c | 28 +++++++
deps/uv/uv.gyp | 1 +
13 files changed, 292 insertions(+), 41 deletions(-)
diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index 49ce47a952..ed6100aebf 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -1155,12 +1155,18 @@ UV_EXTERN int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path,
UV_EXTERN int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file,
void* buf, size_t length, off_t offset, uv_fs_cb cb);
+int uv_fs_read64(uv_loop_t* loop, uv_fs_t* req, uv_file file,
+ void* buf, size_t length, int64_t offset, uv_fs_cb cb);
+
UV_EXTERN int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path,
uv_fs_cb cb);
UV_EXTERN int uv_fs_write(uv_loop_t* loop, uv_fs_t* req, uv_file file,
void* buf, size_t length, off_t offset, uv_fs_cb cb);
+int uv_fs_write64(uv_loop_t* loop, uv_fs_t* req, uv_file file,
+ void* buf, size_t length, int64_t offset, uv_fs_cb cb);
+
UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path,
int mode, uv_fs_cb cb);
@@ -1188,6 +1194,9 @@ UV_EXTERN int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file,
UV_EXTERN int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file file,
off_t offset, uv_fs_cb cb);
+int uv_fs_ftruncate64(uv_loop_t* loop, uv_fs_t* req, uv_file file,
+ int64_t offset, uv_fs_cb cb);
+
UV_EXTERN int uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file out_fd,
uv_file in_fd, off_t in_offset, size_t length, uv_fs_cb cb);
diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c
index 436e54c680..ddcb8b5d78 100644
--- a/deps/uv/src/unix/fs.c
+++ b/deps/uv/src/unix/fs.c
@@ -701,3 +701,34 @@ int uv_queue_work(uv_loop_t* loop, uv_work_t* req, uv_work_cb work_cb,
return 0;
}
+
+
+int uv_fs_read64(uv_loop_t* loop,
+ uv_fs_t* req,
+ uv_file file,
+ void* buf,
+ size_t length,
+ int64_t offset,
+ uv_fs_cb cb) {
+ return uv_fs_read(loop, req, file, buf, length, offset, cb);
+}
+
+
+int uv_fs_write64(uv_loop_t* loop,
+ uv_fs_t* req,
+ uv_file file,
+ void* buf,
+ size_t length,
+ int64_t offset,
+ uv_fs_cb cb) {
+ return uv_fs_write(loop, req, file, buf, length, offset, cb);
+}
+
+
+int uv_fs_ftruncate64(uv_loop_t* loop,
+ uv_fs_t* req,
+ uv_file file,
+ int64_t offset,
+ uv_fs_cb cb) {
+ return uv_fs_ftruncate(loop, req, file, offset, cb);
+}
diff --git a/deps/uv/src/win/error.c b/deps/uv/src/win/error.c
index dccd2e7189..7bdc3cda39 100644
--- a/deps/uv/src/win/error.c
+++ b/deps/uv/src/win/error.c
@@ -125,6 +125,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case ERROR_SEM_TIMEOUT: return UV_ETIMEDOUT;
case WSAETIMEDOUT: return UV_ETIMEDOUT;
case WSAHOST_NOT_FOUND: return UV_ENOENT;
+ case WSAENOTSOCK: return UV_ENOTSOCK;
default: return UV_UNKNOWN;
}
}
diff --git a/deps/uv/src/win/fs-event.c b/deps/uv/src/win/fs-event.c
index 5a25e9d647..3b37c75218 100644
--- a/deps/uv/src/win/fs-event.c
+++ b/deps/uv/src/win/fs-event.c
@@ -301,6 +301,13 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
assert(handle->req_pending);
handle->req_pending = 0;
+ /* If we're closing, don't report any callbacks, and just push the handle */
+ /* onto the endgame queue. */
+ if (handle->flags & UV_HANDLE_CLOSING) {
+ uv_want_endgame(loop, (uv_handle_t*) handle);
+ return;
+ };
+
file_info = (FILE_NOTIFY_INFORMATION*)(handle->buffer + offset);
if (REQ_SUCCESS(req)) {
@@ -438,11 +445,9 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
}
offset = file_info->NextEntryOffset;
- } while(offset);
+ } while (offset && !(handle->flags & UV_HANDLE_CLOSING));
} else {
- if (!(handle->flags & UV_HANDLE_CLOSING)) {
- handle->cb(handle, NULL, UV_CHANGE, 0);
- }
+ handle->cb(handle, NULL, UV_CHANGE, 0);
}
} else {
uv__set_sys_error(loop, GET_REQ_ERROR(req));
diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c
index 507336eed4..daa23ed19d 100644
--- a/deps/uv/src/win/fs.c
+++ b/deps/uv/src/win/fs.c
@@ -33,12 +33,11 @@
#include "uv.h"
#include "internal.h"
-#define UV_FS_ASYNC_QUEUED 0x0001
-#define UV_FS_FREE_ARG0 0x0002
-#define UV_FS_FREE_ARG1 0x0004
-#define UV_FS_FREE_PTR 0x0008
-#define UV_FS_CLEANEDUP 0x0010
-
+#define UV_FS_ASYNC_QUEUED 0x0001
+#define UV_FS_FREE_ARG0 0x0002
+#define UV_FS_FREE_ARG1 0x0004
+#define UV_FS_FREE_PTR 0x0008
+#define UV_FS_CLEANEDUP 0x0010
#define UTF8_TO_UTF16(s, t) \
size = uv_utf8_to_utf16(s, NULL, 0) * sizeof(wchar_t); \
@@ -289,7 +288,7 @@ void fs__close(uv_fs_t* req, uv_file file) {
void fs__read(uv_fs_t* req, uv_file file, void *buf, size_t length,
- off_t offset) {
+ int64_t offset) {
HANDLE handle;
OVERLAPPED overlapped, *overlapped_ptr;
LARGE_INTEGER offset_;
@@ -335,7 +334,7 @@ void fs__read(uv_fs_t* req, uv_file file, void *buf, size_t length,
void fs__write(uv_fs_t* req, uv_file file, void *buf, size_t length,
- off_t offset) {
+ int64_t offset) {
HANDLE handle;
OVERLAPPED overlapped, *overlapped_ptr;
LARGE_INTEGER offset_;
@@ -597,12 +596,12 @@ void fs__fsync(uv_fs_t* req, uv_file file) {
}
-void fs__ftruncate(uv_fs_t* req, uv_file file, off_t offset) {
+void fs__ftruncate(uv_fs_t* req, uv_file file, int64_t offset) {
int result;
VERIFY_UV_FILE(file, req);
- result = _chsize(file, offset);
+ result = _chsize_s(file, offset);
SET_REQ_RESULT(req, result);
}
@@ -878,14 +877,14 @@ static DWORD WINAPI uv_fs_thread_proc(void* parameter) {
(uv_file) req->arg0,
req->arg1,
(size_t) req->arg2,
- (off_t) req->arg3);
+ req->stat.st_atime);
break;
case UV_FS_WRITE:
fs__write(req,
(uv_file)req->arg0,
req->arg1,
(size_t) req->arg2,
- (off_t) req->arg3);
+ req->stat.st_atime);
break;
case UV_FS_UNLINK:
fs__unlink(req, req->pathw);
@@ -914,7 +913,7 @@ static DWORD WINAPI uv_fs_thread_proc(void* parameter) {
fs__fsync(req, (uv_file)req->arg0);
break;
case UV_FS_FTRUNCATE:
- fs__ftruncate(req, (uv_file)req->arg0, (off_t)req->arg1);
+ fs__ftruncate(req, (uv_file)req->arg0, (off_t)req->stat.st_atime);
break;
case UV_FS_SENDFILE:
fs__sendfile(req,
@@ -1002,7 +1001,26 @@ int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, uv_file file, void* buf,
size_t length, off_t offset, uv_fs_cb cb) {
if (cb) {
uv_fs_req_init_async(loop, req, UV_FS_READ, NULL, NULL, cb);
- WRAP_REQ_ARGS4(req, file, buf, length, offset);
+ WRAP_REQ_ARGS3(req, file, buf, length);
+ req->stat.st_atime = offset;
+ QUEUE_FS_TP_JOB(loop, req);
+ } else {
+ uv_fs_req_init_sync(loop, req, UV_FS_READ);
+ fs__read(req, file, buf, length, offset);
+ SET_UV_LAST_ERROR_FROM_REQ(req);
+ return req->result;
+ }
+
+ return 0;
+}
+
+
+int uv_fs_read64(uv_loop_t* loop, uv_fs_t* req, uv_file file, void* buf,
+ size_t length, int64_t offset, uv_fs_cb cb) {
+ if (cb) {
+ uv_fs_req_init_async(loop, req, UV_FS_READ, NULL, NULL, cb);
+ WRAP_REQ_ARGS3(req, file, buf, length);
+ req->stat.st_atime = offset;
QUEUE_FS_TP_JOB(loop, req);
} else {
uv_fs_req_init_sync(loop, req, UV_FS_READ);
@@ -1019,7 +1037,26 @@ int uv_fs_write(uv_loop_t* loop, uv_fs_t* req, uv_file file, void* buf,
size_t length, off_t offset, uv_fs_cb cb) {
if (cb) {
uv_fs_req_init_async(loop, req, UV_FS_WRITE, NULL, NULL, cb);
- WRAP_REQ_ARGS4(req, file, buf, length, offset);
+ WRAP_REQ_ARGS3(req, file, buf, length);
+ req->stat.st_atime = offset;
+ QUEUE_FS_TP_JOB(loop, req);
+ } else {
+ uv_fs_req_init_sync(loop, req, UV_FS_WRITE);
+ fs__write(req, file, buf, length, offset);
+ SET_UV_LAST_ERROR_FROM_REQ(req);
+ return req->result;
+ }
+
+ return 0;
+}
+
+
+int uv_fs_write64(uv_loop_t* loop, uv_fs_t* req, uv_file file, void* buf,
+ size_t length, int64_t offset, uv_fs_cb cb) {
+ if (cb) {
+ uv_fs_req_init_async(loop, req, UV_FS_WRITE, NULL, NULL, cb);
+ WRAP_REQ_ARGS3(req, file, buf, length);
+ req->stat.st_atime = offset;
QUEUE_FS_TP_JOB(loop, req);
} else {
uv_fs_req_init_sync(loop, req, UV_FS_WRITE);
@@ -1412,7 +1449,26 @@ int uv_fs_ftruncate(uv_loop_t* loop, uv_fs_t* req, uv_file file,
off_t offset, uv_fs_cb cb) {
if (cb) {
uv_fs_req_init_async(loop, req, UV_FS_FTRUNCATE, NULL, NULL, cb);
- WRAP_REQ_ARGS2(req, file, offset);
+ WRAP_REQ_ARGS1(req, file);
+ req->stat.st_atime = offset;
+ QUEUE_FS_TP_JOB(loop, req);
+ } else {
+ uv_fs_req_init_sync(loop, req, UV_FS_FTRUNCATE);
+ fs__ftruncate(req, file, offset);
+ SET_UV_LAST_ERROR_FROM_REQ(req);
+ return req->result;
+ }
+
+ return 0;
+}
+
+
+int uv_fs_ftruncate64(uv_loop_t* loop, uv_fs_t* req, uv_file file,
+ int64_t offset, uv_fs_cb cb) {
+ if (cb) {
+ uv_fs_req_init_async(loop, req, UV_FS_FTRUNCATE, NULL, NULL, cb);
+ WRAP_REQ_ARGS1(req, file);
+ req->stat.st_atime = offset;
QUEUE_FS_TP_JOB(loop, req);
} else {
uv_fs_req_init_sync(loop, req, UV_FS_FTRUNCATE);
diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c
index f99a32a9bc..83220a23b0 100644
--- a/deps/uv/src/win/pipe.c
+++ b/deps/uv/src/win/pipe.c
@@ -217,6 +217,11 @@ static int uv_set_pipe_handle(uv_loop_t* loop, uv_pipe_t* handle,
DWORD mode = PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT;
if (!SetNamedPipeHandleState(pipeHandle, &mode, NULL, NULL)) {
+ /* If this returns ERROR_INVALID_PARAMETER we probably opened something */
+ /* that is not a pipe. */
+ if (GetLastError() == ERROR_INVALID_PARAMETER) {
+ SetLastError(WSAENOTSOCK);
+ }
return -1;
}
diff --git a/deps/uv/src/win/tcp.c b/deps/uv/src/win/tcp.c
index 25ca26bdd2..71c5575f12 100644
--- a/deps/uv/src/win/tcp.c
+++ b/deps/uv/src/win/tcp.c
@@ -239,10 +239,9 @@ static int uv__bind(uv_tcp_t* handle,
int addrsize) {
DWORD err;
int r;
- SOCKET sock;
if (handle->socket == INVALID_SOCKET) {
- sock = socket(domain, SOCK_STREAM, 0);
+ SOCKET sock = socket(domain, SOCK_STREAM, 0);
if (sock == INVALID_SOCKET) {
uv__set_sys_error(handle->loop, WSAGetLastError());
return -1;
diff --git a/deps/uv/src/win/udp.c b/deps/uv/src/win/udp.c
index 18ae4a2c13..7c638e4540 100644
--- a/deps/uv/src/win/udp.c
+++ b/deps/uv/src/win/udp.c
@@ -167,7 +167,6 @@ static int uv__bind(uv_udp_t* handle,
int addrsize,
unsigned int flags) {
int r;
- SOCKET sock;
DWORD no = 0, yes = 1;
if ((flags & UV_UDP_IPV6ONLY) && domain != AF_INET6) {
@@ -177,7 +176,7 @@ static int uv__bind(uv_udp_t* handle,
}
if (handle->socket == INVALID_SOCKET) {
- sock = socket(domain, SOCK_DGRAM, 0);
+ SOCKET sock = socket(domain, SOCK_DGRAM, 0);
if (sock == INVALID_SOCKET) {
uv__set_sys_error(handle->loop, WSAGetLastError());
return -1;
@@ -196,14 +195,14 @@ static int uv__bind(uv_udp_t* handle,
/* TODO: how to handle errors? This may fail if there is no ipv4 stack */
/* available, or when run on XP/2003 which have no support for dualstack */
/* sockets. For now we're silently ignoring the error. */
- setsockopt(sock,
+ setsockopt(handle->socket,
IPPROTO_IPV6,
IPV6_V6ONLY,
(char*) &no,
sizeof no);
}
- r = setsockopt(sock,
+ r = setsockopt(handle->socket,
SOL_SOCKET,
SO_REUSEADDR,
(char*) &yes,
diff --git a/deps/uv/test/test-fs-event.c b/deps/uv/test/test-fs-event.c
index 7f02e68a77..f59a928f02 100644
--- a/deps/uv/test/test-fs-event.c
+++ b/deps/uv/test/test-fs-event.c
@@ -27,16 +27,16 @@
static uv_fs_event_t fs_event;
static uv_timer_t timer;
-static int timer_cb_called;
-static int close_cb_called;
-static int fs_event_cb_called;
-static int timer_cb_touch_called;
+static int timer_cb_called = 0;
+static int close_cb_called = 0;
+static int fs_event_cb_called = 0;
+static int timer_cb_touch_called = 0;
static void create_dir(uv_loop_t* loop, const char* name) {
int r;
uv_fs_t req;
r = uv_fs_mkdir(loop, &req, name, 0755, NULL);
- ASSERT(r == 0);
+ ASSERT(r == 0 || uv_last_error(loop).code == UV_EEXIST);
uv_fs_req_cleanup(&req);
}
@@ -117,7 +117,7 @@ static void timer_cb_dir(uv_timer_t* handle, int status) {
static void timer_cb_file(uv_timer_t* handle, int status) {
++timer_cb_called;
-
+
if (timer_cb_called == 1) {
touch_file(handle->loop, "watch_dir/file1");
} else {
@@ -271,7 +271,7 @@ TEST_IMPL(fs_event_no_callback_on_close) {
static void fs_event_fail(uv_fs_event_t* handle, const char* filename,
- int events, int status) {
+ int events, int status) {
ASSERT(0 && "should never be called");
}
@@ -308,3 +308,95 @@ TEST_IMPL(fs_event_immediate_close) {
return 0;
}
+
+
+TEST_IMPL(fs_event_close_with_pending_event) {
+ uv_loop_t* loop;
+ uv_fs_t fs_req;
+ int r;
+
+ loop = uv_default_loop();
+
+ create_dir(loop, "watch_dir");
+ create_file(loop, "watch_dir/file");
+
+ r = uv_fs_event_init(loop, &fs_event, "watch_dir", fs_event_fail, 0);
+ ASSERT(r == 0);
+
+ /* Generate an fs event. */
+ touch_file(loop, "watch_dir/file");
+
+ uv_close((uv_handle_t*)&fs_event, close_cb);
+
+ uv_run(loop);
+
+ ASSERT(close_cb_called == 1);
+
+ /* Clean up */
+ r = uv_fs_unlink(loop, &fs_req, "watch_dir/file", NULL);
+ ASSERT(r == 0);
+ r = uv_fs_rmdir(loop, &fs_req, "watch_dir", NULL);
+ ASSERT(r == 0);
+
+ return 0;
+}
+
+
+static void fs_event_cb_close(uv_fs_event_t* handle, const char* filename,
+ int events, int status) {
+ ASSERT(status == 0);
+
+ ASSERT(fs_event_cb_called < 3);
+ ++fs_event_cb_called;
+
+ if (fs_event_cb_called == 3) {
+ uv_close((uv_handle_t*) handle, close_cb);
+ }
+}
+
+
+TEST_IMPL(fs_event_close_in_callback) {
+ uv_loop_t* loop;
+ uv_fs_t fs_req;
+ int r;
+
+ 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");
+
+ r = uv_fs_event_init(loop, &fs_event, "watch_dir", fs_event_cb_close, 0);
+ 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");
+
+ uv_run(loop);
+
+ ASSERT(close_cb_called == 1);
+ ASSERT(fs_event_cb_called == 3);
+
+ /* Clean up */
+ r = uv_fs_unlink(loop, &fs_req, "watch_dir/file1", NULL);
+ ASSERT(r == 0);
+ r = uv_fs_unlink(loop, &fs_req, "watch_dir/file2", NULL);
+ ASSERT(r == 0);
+ r = uv_fs_unlink(loop, &fs_req, "watch_dir/file3", NULL);
+ ASSERT(r == 0);
+ r = uv_fs_unlink(loop, &fs_req, "watch_dir/file4", NULL);
+ ASSERT(r == 0);
+ r = uv_fs_unlink(loop, &fs_req, "watch_dir/file5", NULL);
+ ASSERT(r == 0);
+ r = uv_fs_rmdir(loop, &fs_req, "watch_dir", NULL);
+ ASSERT(r == 0);
+
+ return 0;
+}
diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c
index 8dc7147310..73d013822d 100644
--- a/deps/uv/test/test-fs.c
+++ b/deps/uv/test/test-fs.c
@@ -248,6 +248,11 @@ static void read_cb(uv_fs_t* req) {
read_cb_count++;
uv_fs_req_cleanup(req);
if (read_cb_count == 1) {
+ ASSERT(strcmp(buf, test_buf) == 0);
+ memset(buf, 0, sizeof(buf));
+ r = uv_fs_read64(loop, &read_req, open_req1.result, buf, sizeof(buf), 0,
+ read_cb);
+ } else if (read_cb_count == 2) {
ASSERT(strcmp(buf, test_buf) == 0);
r = uv_fs_ftruncate(loop, &ftruncate_req, open_req1.result, 7,
ftruncate_cb);
@@ -319,7 +324,13 @@ static void write_cb(uv_fs_t* req) {
ASSERT(req->result != -1);
write_cb_count++;
uv_fs_req_cleanup(req);
- r = uv_fs_fdatasync(loop, &fdatasync_req, open_req1.result, fdatasync_cb);
+
+ if (write_cb_count == 1) {
+ r = uv_fs_write64(loop, &write_req, open_req1.result, test_buf, sizeof(test_buf),
+ -1, write_cb);
+ } else {
+ r = uv_fs_fdatasync(loop, &fdatasync_req, open_req1.result, fdatasync_cb);
+ }
}
@@ -596,7 +607,7 @@ TEST_IMPL(fs_file_async) {
uv_run(loop);
ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
+ ASSERT(write_cb_count == 2);
ASSERT(fsync_cb_count == 1);
ASSERT(fdatasync_cb_count == 1);
ASSERT(close_cb_count == 1);
@@ -606,7 +617,7 @@ TEST_IMPL(fs_file_async) {
uv_run(loop);
ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
+ ASSERT(write_cb_count == 2);
ASSERT(close_cb_count == 1);
ASSERT(rename_cb_count == 1);
@@ -615,11 +626,11 @@ TEST_IMPL(fs_file_async) {
uv_run(loop);
ASSERT(open_cb_count == 1);
- ASSERT(read_cb_count == 1);
+ ASSERT(read_cb_count == 2);
ASSERT(close_cb_count == 2);
ASSERT(rename_cb_count == 1);
ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
+ ASSERT(write_cb_count == 2);
ASSERT(ftruncate_cb_count == 1);
r = uv_fs_open(loop, &open_req1, "test_file2", O_RDONLY, 0, open_cb);
@@ -627,12 +638,12 @@ TEST_IMPL(fs_file_async) {
uv_run(loop);
ASSERT(open_cb_count == 2);
- ASSERT(read_cb_count == 2);
+ ASSERT(read_cb_count == 3);
ASSERT(close_cb_count == 3);
ASSERT(rename_cb_count == 1);
ASSERT(unlink_cb_count == 1);
ASSERT(create_cb_count == 1);
- ASSERT(write_cb_count == 1);
+ ASSERT(write_cb_count == 2);
ASSERT(ftruncate_cb_count == 1);
/* Cleanup. */
@@ -681,6 +692,14 @@ TEST_IMPL(fs_file_sync) {
ASSERT(strcmp(buf, test_buf) == 0);
uv_fs_req_cleanup(&read_req);
+ memset(buf, 0, sizeof(buf));
+ r = uv_fs_read64(loop, &read_req, open_req1.result, buf, sizeof(buf), 0,
+ NULL);
+ ASSERT(r != -1);
+ ASSERT(read_req.result != -1);
+ ASSERT(strcmp(buf, test_buf) == 0);
+ uv_fs_req_cleanup(&read_req);
+
r = uv_fs_ftruncate(loop, &ftruncate_req, open_req1.result, 7, NULL);
ASSERT(r != -1);
ASSERT(ftruncate_req.result != -1);
@@ -899,7 +918,7 @@ TEST_IMPL(fs_fstat) {
file = req.result;
uv_fs_req_cleanup(&req);
- r = uv_fs_write(loop, &req, file, test_buf, sizeof(test_buf), -1, NULL);
+ r = uv_fs_write64(loop, &req, file, test_buf, sizeof(test_buf), -1, NULL);
ASSERT(r == sizeof(test_buf));
ASSERT(req.result == sizeof(test_buf));
uv_fs_req_cleanup(&req);
diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h
index 9e5309c170..5aad6331e4 100644
--- a/deps/uv/test/test-list.h
+++ b/deps/uv/test/test-list.h
@@ -57,6 +57,7 @@ TEST_DECLARE (pipe_bind_error_addrnotavail)
TEST_DECLARE (pipe_bind_error_inval)
TEST_DECLARE (pipe_listen_without_bind)
TEST_DECLARE (pipe_connect_bad_name)
+TEST_DECLARE (pipe_connect_to_file)
TEST_DECLARE (connection_fail)
TEST_DECLARE (connection_fail_doesnt_auto_close)
TEST_DECLARE (shutdown_close_tcp)
@@ -131,6 +132,8 @@ TEST_DECLARE (fs_event_watch_file)
TEST_DECLARE (fs_event_watch_file_current_dir)
TEST_DECLARE (fs_event_no_callback_on_close)
TEST_DECLARE (fs_event_immediate_close)
+TEST_DECLARE (fs_event_close_with_pending_event)
+TEST_DECLARE (fs_event_close_in_callback);
TEST_DECLARE (fs_readdir_empty_dir)
TEST_DECLARE (fs_readdir_file)
TEST_DECLARE (fs_open_dir)
@@ -153,6 +156,7 @@ HELPER_DECLARE (pipe_echo_server)
TASK_LIST_START
TEST_ENTRY (pipe_connect_bad_name)
+ TEST_ENTRY (pipe_connect_to_file)
TEST_ENTRY (tty)
TEST_ENTRY (stdio_over_pipes)
@@ -315,6 +319,8 @@ TASK_LIST_START
TEST_ENTRY (fs_event_watch_file_current_dir)
TEST_ENTRY (fs_event_no_callback_on_close)
TEST_ENTRY (fs_event_immediate_close)
+ TEST_ENTRY (fs_event_close_with_pending_event)
+ TEST_ENTRY (fs_event_close_in_callback)
TEST_ENTRY (fs_readdir_empty_dir)
TEST_ENTRY (fs_readdir_file)
TEST_ENTRY (fs_open_dir)
diff --git a/deps/uv/test/test-pipe-connect-error.c b/deps/uv/test/test-pipe-connect-error.c
index 2faa446148..4a6c5110fa 100644
--- a/deps/uv/test/test-pipe-connect-error.c
+++ b/deps/uv/test/test-pipe-connect-error.c
@@ -50,6 +50,15 @@ static void connect_cb(uv_connect_t* connect_req, int status) {
}
+static void connect_cb_file(uv_connect_t* connect_req, int status) {
+ ASSERT(status == -1);
+ ASSERT(uv_last_error(uv_default_loop()).code == UV_ENOTSOCK ||
+ uv_last_error(uv_default_loop()).code == UV_ECONNREFUSED);
+ uv_close((uv_handle_t*)connect_req->handle, close_cb);
+ connect_cb_called++;
+}
+
+
TEST_IMPL(pipe_connect_bad_name) {
uv_pipe_t client;
uv_connect_t req;
@@ -66,3 +75,22 @@ TEST_IMPL(pipe_connect_bad_name) {
return 0;
}
+
+
+TEST_IMPL(pipe_connect_to_file) {
+ const char* path = "test/fixtures/empty_file";
+ uv_pipe_t client;
+ uv_connect_t req;
+ int r;
+
+ r = uv_pipe_init(uv_default_loop(), &client, 0);
+ ASSERT(r == 0);
+ uv_pipe_connect(&req, &client, path, connect_cb_file);
+
+ uv_run(uv_default_loop());
+
+ ASSERT(close_cb_called == 1);
+ ASSERT(connect_cb_called == 1);
+
+ return 0;
+}
\ No newline at end of file
diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp
index 8151878fa5..0b33b114ed 100644
--- a/deps/uv/uv.gyp
+++ b/deps/uv/uv.gyp
@@ -208,6 +208,7 @@
],
},
'defines': [
+ '_DARWIN_USE_64_BIT_INODE=1',
'EV_CONFIG_H="config_darwin.h"',
'EIO_CONFIG_H="config_darwin.h"',
]
From 40b7302af84be97993c0b17432b331466e99f67c Mon Sep 17 00:00:00 2001
From: Bert Belder
Date: Fri, 6 Apr 2012 02:54:33 +0200
Subject: [PATCH 21/44] fs.readFile: don't make the callback before the fd is
closed
On Windows it is not possible to unlink() the read file in the callback.
This fixes #3051. A test is included.
---
lib/fs.js | 9 +++--
test/simple/test-fs-readfile-unlink.js | 48 ++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 2 deletions(-)
create mode 100644 test/simple/test-fs-readfile-unlink.js
diff --git a/lib/fs.js b/lib/fs.js
index 44370cdeed..c3d4b5f0dd 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -78,6 +78,7 @@ fs.readFile = function(path, encoding_) {
var readStream = fs.createReadStream(path);
var buffers = [];
var nread = 0;
+ var error;
readStream.on('data', function(chunk) {
buffers.push(chunk);
@@ -85,11 +86,15 @@ fs.readFile = function(path, encoding_) {
});
readStream.on('error', function(er) {
- callback(er);
+ error = er;
readStream.destroy();
});
- readStream.on('end', function() {
+ readStream.on('close', function() {
+ if (error) {
+ return callback(error);
+ }
+
// copy all the buffers into one
var buffer;
switch (buffers.length) {
diff --git a/test/simple/test-fs-readfile-unlink.js b/test/simple/test-fs-readfile-unlink.js
new file mode 100644
index 0000000000..0bb4a67f78
--- /dev/null
+++ b/test/simple/test-fs-readfile-unlink.js
@@ -0,0 +1,48 @@
+// 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 assert = require('assert'),
+ common = require('../common'),
+ fs = require('fs'),
+ path = require('path'),
+ dirName = path.resolve(common.fixturesDir, 'test-readfile-unlink'),
+ fileName = path.resolve(dirName, 'test.bin');
+
+var buf = new Buffer(512 * 1024);
+buf.fill(42);
+
+try {
+ fs.mkdirSync(dirName);
+} catch (e) {
+ // Ignore if the directory already exists.
+ if (e.code != 'EEXIST') throw e;
+}
+
+fs.writeFileSync(fileName, buf);
+
+fs.readFile(fileName, function(err, data) {
+ assert.ifError(err);
+ assert(data.length == buf.length);
+ assert.strictEqual(buf[0], 42);
+
+ fs.unlinkSync(fileName);
+ fs.rmdirSync(dirName);
+});
From 1042a8d887aef494435ad1e9da3c33b602f246be Mon Sep 17 00:00:00 2001
From: Bert Belder
Date: Fri, 6 Apr 2012 03:02:23 +0200
Subject: [PATCH 22/44] Please the compiler
---
src/v8_typed_array.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/v8_typed_array.cc b/src/v8_typed_array.cc
index 4b80da0c87..b9b55acf51 100644
--- a/src/v8_typed_array.cc
+++ b/src/v8_typed_array.cc
@@ -390,6 +390,8 @@ class TypedArray {
case v8::kExternalDoubleArray: return "Float64Array";
}
abort();
+ // Please the compiler
+ return "";
}
};
@@ -485,7 +487,7 @@ int valueToCType(v8::Handle value) {
template <>
float valueToCType(v8::Handle value) {
- return value->NumberValue();
+ return static_cast(value->NumberValue());
}
template <>
From 0b57fee3f8598e4d16af5ce89714e460dd042700 Mon Sep 17 00:00:00 2001
From: Igor Zinkovsky
Date: Thu, 5 Apr 2012 18:15:10 -0700
Subject: [PATCH 23/44] enable test-fs-largefile.js test
---
test/{disabled => simple}/test-fs-largefile.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename test/{disabled => simple}/test-fs-largefile.js (98%)
diff --git a/test/disabled/test-fs-largefile.js b/test/simple/test-fs-largefile.js
similarity index 98%
rename from test/disabled/test-fs-largefile.js
rename to test/simple/test-fs-largefile.js
index 98238b00b8..ffd6261d87 100644
--- a/test/disabled/test-fs-largefile.js
+++ b/test/simple/test-fs-largefile.js
@@ -53,6 +53,6 @@ assert.ok(exceptionRaised);
fs.close(fd);
process.on('exit', function() {
- fs.unlink(filepath);
+ fs.unlinkSync(filepath);
});
From 37ac5e52bfaa79be477b4ac123ed05980defe599 Mon Sep 17 00:00:00 2001
From: isaacs
Date: Fri, 6 Apr 2012 14:42:19 -0700
Subject: [PATCH 24/44] Update npm to 1.1.16
---
deps/npm/AUTHORS | 2 +
deps/npm/doc/cli/config.md | 7 +
deps/npm/doc/cli/json.md | 2 +-
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 | 8 +-
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/help-search.html | 2 +-
deps/npm/html/doc/help.html | 2 +-
deps/npm/html/doc/index.html | 2 +-
deps/npm/html/doc/init.html | 2 +-
deps/npm/html/doc/install.html | 2 +-
deps/npm/html/doc/json.html | 4 +-
deps/npm/html/doc/link.html | 2 +-
deps/npm/html/doc/list.html | 2 +-
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/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/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/bugs.js | 2 +-
deps/npm/lib/cache.js | 90 +-
deps/npm/lib/docs.js | 2 +-
deps/npm/lib/init.js | 5 +-
deps/npm/lib/install.js | 62 +-
deps/npm/lib/ls.js | 196 ++--
deps/npm/lib/npm.js | 32 +-
deps/npm/lib/utils/cmd-shim.js | 2 +-
.../lib/utils/completion/file-completion.js | 2 +-
deps/npm/lib/utils/config-defs.js | 3 +
deps/npm/lib/utils/excludes.js | 159 ---
deps/npm/lib/utils/fetch.js | 6 +-
deps/npm/lib/utils/link.js | 2 +-
deps/npm/lib/utils/mkdir-p.js | 191 ----
deps/npm/lib/utils/npm-registry-client/get.js | 7 +-
.../lib/utils/npm-registry-client/request.js | 2 +
deps/npm/lib/utils/read-json.js | 18 +-
deps/npm/lib/utils/tar.js | 476 +--------
deps/npm/lib/utils/uid-number.js | 55 -
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 | 15 +-
deps/npm/man/man1/deprecate.1 | 2 +-
deps/npm/man/man1/developers.1 | 2 +-
deps/npm/man/man1/disputes.1 | 2 +-
deps/npm/man/man1/docs.1 | 2 +-
deps/npm/man/man1/edit.1 | 2 +-
deps/npm/man/man1/explore.1 | 2 +-
deps/npm/man/man1/faq.1 | 2 +-
deps/npm/man/man1/folders.1 | 2 +-
deps/npm/man/man1/help-search.1 | 2 +-
deps/npm/man/man1/help.1 | 2 +-
deps/npm/man/man1/index.1 | 2 +-
deps/npm/man/man1/init.1 | 2 +-
deps/npm/man/man1/install.1 | 2 +-
deps/npm/man/man1/json.1 | 4 +-
deps/npm/man/man1/link.1 | 2 +-
deps/npm/man/man1/list.1 | 2 +-
deps/npm/man/man1/npm.1 | 4 +-
deps/npm/man/man1/outdated.1 | 2 +-
deps/npm/man/man1/owner.1 | 2 +-
deps/npm/man/man1/pack.1 | 2 +-
deps/npm/man/man1/prefix.1 | 2 +-
deps/npm/man/man1/prune.1 | 2 +-
deps/npm/man/man1/publish.1 | 2 +-
deps/npm/man/man1/rebuild.1 | 2 +-
deps/npm/man/man1/registry.1 | 2 +-
deps/npm/man/man1/removing-npm.1 | 2 +-
deps/npm/man/man1/restart.1 | 2 +-
deps/npm/man/man1/root.1 | 2 +-
deps/npm/man/man1/run-script.1 | 2 +-
deps/npm/man/man1/scripts.1 | 2 +-
deps/npm/man/man1/search.1 | 2 +-
deps/npm/man/man1/semver.1 | 2 +-
deps/npm/man/man1/shrinkwrap.1 | 2 +-
deps/npm/man/man1/star.1 | 2 +-
deps/npm/man/man1/start.1 | 2 +-
deps/npm/man/man1/stop.1 | 2 +-
deps/npm/man/man1/submodule.1 | 2 +-
deps/npm/man/man1/tag.1 | 2 +-
deps/npm/man/man1/test.1 | 2 +-
deps/npm/man/man1/uninstall.1 | 2 +-
deps/npm/man/man1/unpublish.1 | 2 +-
deps/npm/man/man1/update.1 | 2 +-
deps/npm/man/man1/version.1 | 2 +-
deps/npm/man/man1/view.1 | 2 +-
deps/npm/man/man1/whoami.1 | 2 +-
deps/npm/man/man3/bin.3 | 2 +-
deps/npm/man/man3/bugs.3 | 2 +-
deps/npm/man/man3/commands.3 | 2 +-
deps/npm/man/man3/config.3 | 2 +-
deps/npm/man/man3/deprecate.3 | 2 +-
deps/npm/man/man3/docs.3 | 2 +-
deps/npm/man/man3/edit.3 | 2 +-
deps/npm/man/man3/explore.3 | 2 +-
deps/npm/man/man3/help-search.3 | 2 +-
deps/npm/man/man3/init.3 | 2 +-
deps/npm/man/man3/install.3 | 2 +-
deps/npm/man/man3/link.3 | 2 +-
deps/npm/man/man3/load.3 | 2 +-
deps/npm/man/man3/ls.3 | 2 +-
deps/npm/man/man3/npm.3 | 4 +-
deps/npm/man/man3/outdated.3 | 2 +-
deps/npm/man/man3/owner.3 | 2 +-
deps/npm/man/man3/pack.3 | 2 +-
deps/npm/man/man3/prefix.3 | 2 +-
deps/npm/man/man3/prune.3 | 2 +-
deps/npm/man/man3/publish.3 | 2 +-
deps/npm/man/man3/rebuild.3 | 2 +-
deps/npm/man/man3/restart.3 | 2 +-
deps/npm/man/man3/root.3 | 2 +-
deps/npm/man/man3/run-script.3 | 2 +-
deps/npm/man/man3/search.3 | 2 +-
deps/npm/man/man3/shrinkwrap.3 | 2 +-
deps/npm/man/man3/start.3 | 2 +-
deps/npm/man/man3/stop.3 | 2 +-
deps/npm/man/man3/submodule.3 | 2 +-
deps/npm/man/man3/tag.3 | 2 +-
deps/npm/man/man3/test.3 | 2 +-
deps/npm/man/man3/uninstall.3 | 2 +-
deps/npm/man/man3/unpublish.3 | 2 +-
deps/npm/man/man3/update.3 | 2 +-
deps/npm/man/man3/version.3 | 2 +-
deps/npm/man/man3/view.3 | 2 +-
deps/npm/man/man3/whoami.3 | 2 +-
deps/npm/node_modules/archy/README.markdown | 92 ++
deps/npm/node_modules/archy/index.js | 35 +
deps/npm/node_modules/archy/package.json | 52 +
deps/npm/node_modules/chownr/README.md | 3 +
deps/npm/node_modules/chownr/chownr.js | 41 +
deps/npm/node_modules/chownr/package.json | 38 +
deps/npm/node_modules/fstream-npm/.npmignore | 2 +
deps/npm/node_modules/fstream-npm/README.md | 18 +
.../node_modules/fstream-npm/fstream-npm.js | 302 ++++++
.../node_modules/fstream-ignore/.npmignore | 1 +
.../node_modules/fstream-ignore/README.md | 22 +
.../node_modules/fstream-ignore/ignore.js | 275 +++++
.../node_modules/fstream-ignore/package.json | 42 +
.../npm/node_modules/fstream-npm/package.json | 34 +
deps/npm/node_modules/fstream/lib/abstract.js | 5 +
.../node_modules/fstream/lib/dir-reader.js | 111 +-
.../node_modules/fstream/lib/dir-writer.js | 4 +-
.../node_modules/fstream/lib/link-writer.js | 1 -
.../node_modules/fstream/lib/proxy-reader.js | 1 +
deps/npm/node_modules/fstream/lib/reader.js | 31 +-
deps/npm/node_modules/fstream/lib/writer.js | 211 ++--
deps/npm/node_modules/fstream/package.json | 8 +-
deps/npm/node_modules/minimatch/README.md | 14 +-
deps/npm/node_modules/minimatch/minimatch.js | 46 +-
deps/npm/node_modules/minimatch/package.json | 29 +-
deps/npm/node_modules/mkdirp/index.js | 46 +-
deps/npm/node_modules/mkdirp/package.json | 63 +-
deps/npm/node_modules/node-gyp/README.md | 6 +-
.../npm/node_modules/node-gyp/bin/node-gyp.js | 2 +-
deps/npm/node_modules/node-gyp/lib/install.js | 16 +-
deps/npm/node_modules/node-gyp/lib/remove.js | 2 +-
.../node-gyp/node_modules/ansi/package.json | 5 +-
.../glob/node_modules/minimatch/.travis.yml | 4 -
.../glob/node_modules/minimatch/LICENSE | 23 -
.../glob/node_modules/minimatch/README.md | 218 ----
.../glob/node_modules/minimatch/minimatch.js | 986 ------------------
.../glob/node_modules/minimatch/package.json | 44 -
.../node-gyp/node_modules/glob/package.json | 2 +-
deps/npm/node_modules/node-gyp/package.json | 12 +-
deps/npm/node_modules/read/LICENCE | 25 +
deps/npm/node_modules/read/lib/read.js | 16 +-
deps/npm/node_modules/read/package.json | 18 +-
deps/npm/node_modules/uid-number/README.md | 17 +
.../uid-number/get-uid-gid.js} | 8 +
deps/npm/node_modules/uid-number/package.json | 34 +
.../npm/node_modules/uid-number/uid-number.js | 54 +
deps/npm/package.json | 18 +-
deps/npm/scripts/index-build.js | 1 +
258 files changed, 2010 insertions(+), 2758 deletions(-)
delete mode 100644 deps/npm/lib/utils/excludes.js
delete mode 100644 deps/npm/lib/utils/mkdir-p.js
delete mode 100644 deps/npm/lib/utils/uid-number.js
create mode 100644 deps/npm/node_modules/archy/README.markdown
create mode 100644 deps/npm/node_modules/archy/index.js
create mode 100644 deps/npm/node_modules/archy/package.json
create mode 100644 deps/npm/node_modules/chownr/README.md
create mode 100644 deps/npm/node_modules/chownr/chownr.js
create mode 100644 deps/npm/node_modules/chownr/package.json
create mode 100644 deps/npm/node_modules/fstream-npm/.npmignore
create mode 100644 deps/npm/node_modules/fstream-npm/README.md
create mode 100644 deps/npm/node_modules/fstream-npm/fstream-npm.js
create mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
create mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md
create mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js
create mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
create mode 100644 deps/npm/node_modules/fstream-npm/package.json
delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/.travis.yml
delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/LICENSE
delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/README.md
delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/minimatch.js
delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/package.json
create mode 100644 deps/npm/node_modules/read/LICENCE
create mode 100644 deps/npm/node_modules/uid-number/README.md
rename deps/npm/{bin/npm-get-uid-gid.js => node_modules/uid-number/get-uid-gid.js} (65%)
create mode 100644 deps/npm/node_modules/uid-number/package.json
create mode 100644 deps/npm/node_modules/uid-number/uid-number.js
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 8f78dca48a..340c4bdbcb 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -61,3 +61,5 @@ Andrew Lunny
Henrik Hodne
Adam Blackburn
Kris Windham
+Jens Grunert
+Joost-Wim Boekesteijn
diff --git a/deps/npm/doc/cli/config.md b/deps/npm/doc/cli/config.md
index 049a51ea4d..8cd03a7692 100644
--- a/deps/npm/doc/cli/config.md
+++ b/deps/npm/doc/cli/config.md
@@ -358,6 +358,13 @@ user.
A proxy to use for outgoing https requests.
+### user-agent
+
+* Default: npm/{npm.version} node/{process.version}
+* Type: String
+
+Sets a User-Agent to the request header
+
### ignore
* Default: ""
diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md
index 16b2ad931c..ddd500e3b1 100644
--- a/deps/npm/doc/cli/json.md
+++ b/deps/npm/doc/cli/json.md
@@ -485,7 +485,7 @@ 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 speciic registry (for example, an internal registry),
+to a specific registry (for example, an internal registry),
then use the `publishConfig` hash described below
to override the `registry` config param at publish-time.
diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html
index b8937d7c73..c5d56c12ed 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.
-
+
+
+
+
+
+