From 246805d3865dc2d8f81037dc7c43069c537a7ed5 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 17 Nov 2011 16:30:37 +0100 Subject: [PATCH 01/26] test: add 'response body with no headers' http test HTTP/0.9 - fails with a parse error HTTP/1.0 - works HTTP/1.1 - fails with an empty response body See #1711. --- test/simple/test-http-response-no-headers.js | 75 ++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 test/simple/test-http-response-no-headers.js diff --git a/test/simple/test-http-response-no-headers.js b/test/simple/test-http-response-no-headers.js new file mode 100644 index 000000000..aa5c37b78 --- /dev/null +++ b/test/simple/test-http-response-no-headers.js @@ -0,0 +1,75 @@ +// 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 http = require('http'); +var net = require('net'); + +var expected = 'I AM THE WALRUS'; + +var gotExpected = false; + +function test(httpVersion, callback) { + process.on('exit', function() { + assert(gotExpected); + }); + + var server = net.createServer(function(conn) { + var reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' + expected; + + conn.write(reply, function() { + conn.destroy(); + }) + }); + + server.listen(common.PORT, '127.0.0.1', function() { + var options = { + host: '127.0.0.1', + port: common.PORT + }; + + var req = http.get(options, function(res) { + var body = ''; + + res.on('data', function(data) { + body += data; + }); + + res.on('end', function() { + assert.equal(body, expected); + gotExpected = true; + server.close(); + if (callback) process.nextTick(callback); + }); + }); + + req.on('error', function(err) { + throw err; + }); + }); +} + +test('0.9', function() { + test('1.0', function() { + test('1.1'); + }); +}); From 6e1e9e2fcb8dd79eada404581c2cc3eb2cd245f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisendo=CC=88rfer?= Date: Tue, 22 Nov 2011 21:54:17 +0100 Subject: [PATCH 02/26] Get test-http-response-no-headers.js to pass Main fix was in 3abebf which added HTTP/0.9 support to http parser. Changed test because HTTP 1.1 mandates keep-alive when no headers are given. Fixes #1711 --- test/simple/test-http-response-no-headers.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/simple/test-http-response-no-headers.js b/test/simple/test-http-response-no-headers.js index aa5c37b78..95bd01aed 100644 --- a/test/simple/test-http-response-no-headers.js +++ b/test/simple/test-http-response-no-headers.js @@ -24,7 +24,11 @@ var assert = require('assert'); var http = require('http'); var net = require('net'); -var expected = 'I AM THE WALRUS'; +var expected = { + '0.9': 'I AM THE WALRUS', + '1.0': 'I AM THE WALRUS', + '1.1': '', +} var gotExpected = false; @@ -34,7 +38,7 @@ function test(httpVersion, callback) { }); var server = net.createServer(function(conn) { - var reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' + expected; + var reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' + expected[httpVersion]; conn.write(reply, function() { conn.destroy(); @@ -55,7 +59,7 @@ function test(httpVersion, callback) { }); res.on('end', function() { - assert.equal(body, expected); + assert.equal(body, expected[httpVersion]); gotExpected = true; server.close(); if (callback) process.nextTick(callback); From 0ba78d5f36256dacf625e96dc40e4e34bacfdd35 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 22 Nov 2011 13:10:57 -0800 Subject: [PATCH 03/26] Close #2166 Close the fd in lchmod --- lib/fs.js | 25 ++++++++++++-- test/simple/test-fs-chmod.js | 64 +++++++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 3 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index b69a240ea..4ef239836 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -459,13 +459,34 @@ if (constants.hasOwnProperty('O_SYMLINK')) { callback(err); return; } - fs.fchmod(fd, mode, callback); + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function(err) { + fs.close(fd, function(err2) { + callback(err || err2); + }); + }); }); }; fs.lchmodSync = function(path, mode) { var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK); - return fs.fchmodSync(fd, mode); + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var err, err2; + try { + var ret = fs.fchmodSync(fd, mode); + } catch (er) { + err = er; + } + try { + fs.closeSync(fd); + } catch (er) { + err2 = er; + } + if (err || err2) throw (err || err2); + return ret; }; } diff --git a/test/simple/test-fs-chmod.js b/test/simple/test-fs-chmod.js index c83f5794d..436ab734f 100644 --- a/test/simple/test-fs-chmod.js +++ b/test/simple/test-fs-chmod.js @@ -29,6 +29,40 @@ var mode_async; var mode_sync; var is_windows = process.platform === 'win32'; +// Need to hijack fs.open/close to make sure that things +// get closed once they're opened. +fs._open = fs.open; +fs._openSync = fs.openSync; +fs.open = open; +fs.openSync = openSync; +fs._close = fs.close; +fs._closeSync = fs.closeSync; +fs.close = close; +fs.closeSync = closeSync; + +var openCount = 0; + +function open() { + openCount++; + return fs._open.apply(fs, arguments); +} + +function openSync() { + openCount++; + return fs._openSync.apply(fs, arguments); +} + +function close() { + openCount--; + return fs._close.apply(fs, arguments); +} + +function closeSync() { + openCount--; + return fs._closeSync.apply(fs, arguments); +} + + // On Windows chmod is only able to manipulate read-only bit if (is_windows) { mode_async = 0600; // read-write @@ -87,12 +121,40 @@ fs.open(file, 'a', function(err, fd) { assert.equal(mode_sync, fs.fstatSync(fd).mode & 0777); } success_count++; + fs.close(fd); } }); }); +// lchmod +if (!is_windows) { + var link = path.join(common.tmpDir, 'symbolic-link'); + + try { + fs.unlinkSync(link); + } catch (er) {} + fs.symlinkSync(file, link); + + fs.lchmod(link, mode_async, function(err) { + if (err) { + got_error = true; + } else { + console.log(fs.lstatSync(link).mode); + assert.equal(mode_async, fs.lstatSync(link).mode & 0777); + + fs.lchmodSync(link, mode_sync); + assert.equal(mode_sync, fs.lstatSync(link).mode & 0777); + success_count++; + } + }); +} else { + success_count++; +} + + process.on('exit', function() { - assert.equal(2, success_count); + assert.equal(3, success_count); + assert.equal(0, openCount); assert.equal(false, got_error); }); From 3ab15cde2516564a2bc4fe6246fe447f07752ed4 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 22 Nov 2011 16:56:59 -0800 Subject: [PATCH 04/26] Update npm to 1.1.0-alpha-2 --- deps/npm/.gitmodules | 3 + deps/npm/doc/cli/coding-style.md | 8 +- deps/npm/lib/completion.js | 2 +- deps/npm/lib/utils/tar.js | 12 +- deps/npm/node_modules/abbrev/LICENSE | 23 + deps/npm/node_modules/abbrev/package.json | 3 + .../block-stream/bench/block-stream.js | 68 - .../block-stream/bench/dropper-pause.js | 70 - .../block-stream/bench/dropper.js | 68 - .../node_modules/block-stream/test/basic.js | 27 - .../block-stream/test/nopad-thorough.js | 68 - .../node_modules/block-stream/test/nopad.js | 57 - .../block-stream/test/pause-resume.js | 73 - .../block-stream/test/thorough.js | 68 - deps/npm/node_modules/fast-list/README.md | 111 ++ deps/npm/node_modules/fast-list/bench.js | 55 + deps/npm/node_modules/fast-list/fast-list.js | 90 ++ deps/npm/node_modules/fast-list/package.json | 20 + .../npm/node_modules/fstream/examples/pipe.js | 113 -- .../node_modules/fstream/examples/reader.js | 29 - .../fstream/examples/symlink-write.js | 9 - deps/npm/node_modules/fstream/lib/writer.js | 12 +- deps/npm/node_modules/fstream/package.json | 6 +- .../node_modules/graceful-fs/graceful-fs.js | 216 ++- .../npm/node_modules/graceful-fs/package.json | 8 +- .../node_modules/ini/test/fixtures/foo.ini | 18 - deps/npm/node_modules/ini/test/foo.js | 40 - deps/npm/node_modules/minimatch/test/basic.js | 141 -- deps/npm/node_modules/mkdirp/examples/pow.js | 6 - deps/npm/node_modules/mkdirp/test/chmod.js | 39 - deps/npm/node_modules/mkdirp/test/clobber.js | 37 - deps/npm/node_modules/mkdirp/test/mkdirp.js | 28 - deps/npm/node_modules/mkdirp/test/race.js | 41 - deps/npm/node_modules/mkdirp/test/rel.js | 32 - deps/npm/node_modules/node-uuid/.gitignore | 2 + deps/npm/node_modules/node-uuid/README.md | 237 +++- .../node-uuid/benchmark/README.md | 53 + .../node-uuid/benchmark/bench.gnu | 175 +++ .../node_modules/node-uuid/benchmark/bench.sh | 34 + .../{test => benchmark}/benchmark-native.c | 0 .../node-uuid/benchmark/benchmark.js | 52 + deps/npm/node_modules/node-uuid/package.json | 8 +- .../node_modules/node-uuid/test/benchmark.js | 27 - .../npm/node_modules/node-uuid/test/test.html | 14 - deps/npm/node_modules/node-uuid/test/test.js | 83 -- deps/npm/node_modules/node-uuid/uuid.js | 287 +++- deps/npm/node_modules/nopt/README.md | 4 +- .../node_modules/nopt/examples/my-program.js | 30 - deps/npm/node_modules/request/README.md | 92 ++ deps/npm/node_modules/request/main.js | 122 +- deps/npm/node_modules/request/oauth.js | 23 + deps/npm/node_modules/request/package.json | 2 +- .../request/tests/googledoodle.png | Bin 38510 -> 0 bytes deps/npm/node_modules/request/tests/run.sh | 6 - deps/npm/node_modules/request/tests/server.js | 57 - .../node_modules/request/tests/test-body.js | 90 -- .../node_modules/request/tests/test-errors.js | 30 - .../node_modules/request/tests/test-pipes.js | 167 --- .../request/tests/test-timeout.js | 87 -- deps/npm/node_modules/request/uuid.js | 19 + .../request/vendor/cookie/index.js | 57 + .../node_modules/request/vendor/cookie/jar.js | 72 + deps/npm/node_modules/rimraf/test/run.sh | 10 - deps/npm/node_modules/rimraf/test/setup.sh | 47 - .../node_modules/rimraf/test/test-async.js | 5 - .../node_modules/rimraf/test/test-fiber.js | 15 - .../npm/node_modules/rimraf/test/test-sync.js | 3 - deps/npm/node_modules/semver/test.js | 397 ------ .../node_modules/tar/examples/extracter.js | 11 - deps/npm/node_modules/tar/examples/reader.js | 36 - deps/npm/node_modules/tar/lib/entry-writer.js | 3 + .../tar/lib/extended-header-writer.js | 20 +- deps/npm/node_modules/tar/old/README.md | 1 - deps/npm/node_modules/tar/old/doc/example.js | 24 - deps/npm/node_modules/tar/old/generator.js | 387 ------ deps/npm/node_modules/tar/old/parser.js | 344 ----- deps/npm/node_modules/tar/old/tar.js | 74 -- .../tar/old/test/test-generator.js | 13 - .../tar/old/test/test-generator.tar | Bin 3260 -> 0 bytes .../tar/old/test/test-generator.txt | Bin 3261 -> 0 bytes .../node_modules/tar/old/test/test-parser.js | 28 - .../node_modules/tar/old/test/test-tar.tar | Bin 3072 -> 0 bytes .../node_modules/tar/old/test/test-tar.txt | Bin 3073 -> 0 bytes deps/npm/node_modules/tar/package.json | 4 +- deps/npm/node_modules/tar/test/extract.js | 406 ------ .../node_modules/tar/test/fixtures/200.tar | Bin 3072 -> 0 bytes .../node_modules/tar/test/fixtures/200L.hex | 50 - ...cccccccccccccccccccccccccccccccccccccccccc | 1 - .../tar/test/fixtures/200longlink.tar | Bin 3584 -> 0 bytes .../tar/test/fixtures/200longname.tar | Bin 3072 -> 0 bytes deps/npm/node_modules/tar/test/fixtures/a.hex | 14 - deps/npm/node_modules/tar/test/fixtures/a.tar | Bin 2048 -> 0 bytes deps/npm/node_modules/tar/test/fixtures/a.txt | 1 - deps/npm/node_modules/tar/test/fixtures/b.hex | 14 - deps/npm/node_modules/tar/test/fixtures/b.tar | Bin 2048 -> 0 bytes deps/npm/node_modules/tar/test/fixtures/b.txt | 1 - deps/npm/node_modules/tar/test/fixtures/c.hex | 74 -- deps/npm/node_modules/tar/test/fixtures/c.tar | Bin 18432 -> 0 bytes deps/npm/node_modules/tar/test/fixtures/c.txt | 1 - .../npm/node_modules/tar/test/fixtures/cc.txt | 1 - .../node_modules/tar/test/fixtures/foo.hex | 14 - .../npm/node_modules/tar/test/fixtures/foo.js | 1 - .../node_modules/tar/test/fixtures/foo.tar | Bin 2048 -> 0 bytes .../node_modules/tar/test/fixtures/hardlink-1 | 1 - .../node_modules/tar/test/fixtures/hardlink-2 | 1 - .../node_modules/tar/test/fixtures/omega.hex | 22 - .../node_modules/tar/test/fixtures/omega.tar | Bin 3072 -> 0 bytes .../node_modules/tar/test/fixtures/omega.txt | 1 - .../tar/test/fixtures/omegapax.tar | Bin 5120 -> 0 bytes .../tar/test/fixtures/packtest/omega.txt | 1 - .../tar/test/fixtures/packtest/star.4.html | 1184 ----------------- .../tar/test/fixtures/packtest/Ω.txt | 1 - ...cccccccccccccccccccccccccccccccccccccccccc | 1 - .../node_modules/tar/test/fixtures/symlink | 1 - deps/npm/node_modules/tar/test/fixtures/Ω.txt | 1 - deps/npm/node_modules/tar/test/header.js | 183 --- deps/npm/node_modules/tar/test/pack.js | 953 ------------- deps/npm/node_modules/tar/test/parse.js | 359 ----- deps/npm/package.json | 12 +- deps/npm/test/common.js | 7 - .../test/disabled/bundlerecurs/package.json | 4 - deps/npm/test/disabled/failer/package.json | 5 - deps/npm/test/disabled/fast/package.json | 9 - .../test/disabled/package-config/package.json | 4 - deps/npm/test/disabled/package-config/test.js | 17 - deps/npm/test/disabled/slow/package.json | 9 - deps/npm/test/disabled/startstop/package.json | 3 - .../test/packages/npm-test-blerg/package.json | 4 - deps/npm/test/packages/npm-test-blerg/test.js | 5 - .../packages/npm-test-env-reader/package.json | 14 - .../test/packages/npm-test-env-reader/test.sh | 3 - .../npm-test-missing-bindir/package.json | 4 - .../packages/npm-test-missing-bindir/test.js | 5 - .../packages/npm-test-private/package.json | 4 - .../npm-test-test-package/package.json | 5 - .../packages/npm-test-url-dep/package.json | 4 - deps/npm/test/run | 138 -- deps/npm/test/update-test.sh | 59 - 138 files changed, 1633 insertions(+), 6822 deletions(-) create mode 100644 deps/npm/node_modules/abbrev/LICENSE delete mode 100644 deps/npm/node_modules/block-stream/bench/block-stream.js delete mode 100644 deps/npm/node_modules/block-stream/bench/dropper-pause.js delete mode 100644 deps/npm/node_modules/block-stream/bench/dropper.js delete mode 100644 deps/npm/node_modules/block-stream/test/basic.js delete mode 100644 deps/npm/node_modules/block-stream/test/nopad-thorough.js delete mode 100644 deps/npm/node_modules/block-stream/test/nopad.js delete mode 100644 deps/npm/node_modules/block-stream/test/pause-resume.js delete mode 100644 deps/npm/node_modules/block-stream/test/thorough.js create mode 100644 deps/npm/node_modules/fast-list/README.md create mode 100644 deps/npm/node_modules/fast-list/bench.js create mode 100644 deps/npm/node_modules/fast-list/fast-list.js create mode 100644 deps/npm/node_modules/fast-list/package.json delete mode 100644 deps/npm/node_modules/fstream/examples/pipe.js delete mode 100644 deps/npm/node_modules/fstream/examples/reader.js delete mode 100644 deps/npm/node_modules/fstream/examples/symlink-write.js delete mode 100644 deps/npm/node_modules/ini/test/fixtures/foo.ini delete mode 100644 deps/npm/node_modules/ini/test/foo.js delete mode 100644 deps/npm/node_modules/minimatch/test/basic.js delete mode 100644 deps/npm/node_modules/mkdirp/examples/pow.js delete mode 100644 deps/npm/node_modules/mkdirp/test/chmod.js delete mode 100644 deps/npm/node_modules/mkdirp/test/clobber.js delete mode 100644 deps/npm/node_modules/mkdirp/test/mkdirp.js delete mode 100644 deps/npm/node_modules/mkdirp/test/race.js delete mode 100644 deps/npm/node_modules/mkdirp/test/rel.js create mode 100644 deps/npm/node_modules/node-uuid/.gitignore create mode 100644 deps/npm/node_modules/node-uuid/benchmark/README.md create mode 100644 deps/npm/node_modules/node-uuid/benchmark/bench.gnu create mode 100755 deps/npm/node_modules/node-uuid/benchmark/bench.sh rename deps/npm/node_modules/node-uuid/{test => benchmark}/benchmark-native.c (100%) create mode 100644 deps/npm/node_modules/node-uuid/benchmark/benchmark.js delete mode 100644 deps/npm/node_modules/node-uuid/test/benchmark.js delete mode 100644 deps/npm/node_modules/node-uuid/test/test.html delete mode 100644 deps/npm/node_modules/node-uuid/test/test.js delete mode 100755 deps/npm/node_modules/nopt/examples/my-program.js create mode 100644 deps/npm/node_modules/request/oauth.js delete mode 100644 deps/npm/node_modules/request/tests/googledoodle.png delete mode 100755 deps/npm/node_modules/request/tests/run.sh delete mode 100644 deps/npm/node_modules/request/tests/server.js delete mode 100644 deps/npm/node_modules/request/tests/test-body.js delete mode 100644 deps/npm/node_modules/request/tests/test-errors.js delete mode 100644 deps/npm/node_modules/request/tests/test-pipes.js delete mode 100644 deps/npm/node_modules/request/tests/test-timeout.js create mode 100644 deps/npm/node_modules/request/uuid.js create mode 100644 deps/npm/node_modules/request/vendor/cookie/index.js create mode 100644 deps/npm/node_modules/request/vendor/cookie/jar.js delete mode 100644 deps/npm/node_modules/rimraf/test/run.sh delete mode 100644 deps/npm/node_modules/rimraf/test/setup.sh delete mode 100644 deps/npm/node_modules/rimraf/test/test-async.js delete mode 100644 deps/npm/node_modules/rimraf/test/test-fiber.js delete mode 100644 deps/npm/node_modules/rimraf/test/test-sync.js delete mode 100644 deps/npm/node_modules/semver/test.js delete mode 100644 deps/npm/node_modules/tar/examples/extracter.js delete mode 100644 deps/npm/node_modules/tar/examples/reader.js delete mode 100644 deps/npm/node_modules/tar/old/README.md delete mode 100644 deps/npm/node_modules/tar/old/doc/example.js delete mode 100644 deps/npm/node_modules/tar/old/generator.js delete mode 100644 deps/npm/node_modules/tar/old/parser.js delete mode 100644 deps/npm/node_modules/tar/old/tar.js delete mode 100644 deps/npm/node_modules/tar/old/test/test-generator.js delete mode 100644 deps/npm/node_modules/tar/old/test/test-generator.tar delete mode 100644 deps/npm/node_modules/tar/old/test/test-generator.txt delete mode 100644 deps/npm/node_modules/tar/old/test/test-parser.js delete mode 100644 deps/npm/node_modules/tar/old/test/test-tar.tar delete mode 100644 deps/npm/node_modules/tar/old/test/test-tar.txt delete mode 100644 deps/npm/node_modules/tar/test/extract.js delete mode 100644 deps/npm/node_modules/tar/test/fixtures/200.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/200L.hex delete mode 100644 deps/npm/node_modules/tar/test/fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc delete mode 100644 deps/npm/node_modules/tar/test/fixtures/200longlink.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/200longname.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/a.hex delete mode 100644 deps/npm/node_modules/tar/test/fixtures/a.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/a.txt delete mode 100644 deps/npm/node_modules/tar/test/fixtures/b.hex delete mode 100644 deps/npm/node_modules/tar/test/fixtures/b.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/b.txt delete mode 100644 deps/npm/node_modules/tar/test/fixtures/c.hex delete mode 100644 deps/npm/node_modules/tar/test/fixtures/c.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/c.txt delete mode 100644 deps/npm/node_modules/tar/test/fixtures/cc.txt delete mode 100644 deps/npm/node_modules/tar/test/fixtures/foo.hex delete mode 100644 deps/npm/node_modules/tar/test/fixtures/foo.js delete mode 100644 deps/npm/node_modules/tar/test/fixtures/foo.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/hardlink-1 delete mode 100644 deps/npm/node_modules/tar/test/fixtures/hardlink-2 delete mode 100644 deps/npm/node_modules/tar/test/fixtures/omega.hex delete mode 100644 deps/npm/node_modules/tar/test/fixtures/omega.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/omega.txt delete mode 100644 deps/npm/node_modules/tar/test/fixtures/omegapax.tar delete mode 100644 deps/npm/node_modules/tar/test/fixtures/packtest/omega.txt delete mode 100644 deps/npm/node_modules/tar/test/fixtures/packtest/star.4.html delete mode 100644 deps/npm/node_modules/tar/test/fixtures/packtest/Ω.txt delete mode 100644 deps/npm/node_modules/tar/test/fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc delete mode 120000 deps/npm/node_modules/tar/test/fixtures/symlink delete mode 100644 deps/npm/node_modules/tar/test/fixtures/Ω.txt delete mode 100644 deps/npm/node_modules/tar/test/header.js delete mode 100644 deps/npm/node_modules/tar/test/pack.js delete mode 100644 deps/npm/node_modules/tar/test/parse.js delete mode 100644 deps/npm/test/common.js delete mode 100644 deps/npm/test/disabled/bundlerecurs/package.json delete mode 100644 deps/npm/test/disabled/failer/package.json delete mode 100644 deps/npm/test/disabled/fast/package.json delete mode 100644 deps/npm/test/disabled/package-config/package.json delete mode 100755 deps/npm/test/disabled/package-config/test.js delete mode 100644 deps/npm/test/disabled/slow/package.json delete mode 100644 deps/npm/test/disabled/startstop/package.json delete mode 100644 deps/npm/test/packages/npm-test-blerg/package.json delete mode 100644 deps/npm/test/packages/npm-test-blerg/test.js delete mode 100644 deps/npm/test/packages/npm-test-env-reader/package.json delete mode 100755 deps/npm/test/packages/npm-test-env-reader/test.sh delete mode 100644 deps/npm/test/packages/npm-test-missing-bindir/package.json delete mode 100644 deps/npm/test/packages/npm-test-missing-bindir/test.js delete mode 100644 deps/npm/test/packages/npm-test-private/package.json delete mode 100644 deps/npm/test/packages/npm-test-test-package/package.json delete mode 100644 deps/npm/test/packages/npm-test-url-dep/package.json delete mode 100755 deps/npm/test/run delete mode 100755 deps/npm/test/update-test.sh diff --git a/deps/npm/.gitmodules b/deps/npm/.gitmodules index b629bd293..7faf2ae15 100644 --- a/deps/npm/.gitmodules +++ b/deps/npm/.gitmodules @@ -49,3 +49,6 @@ [submodule "node_modules/mkdirp"] path = node_modules/mkdirp url = git://github.com/isaacs/node-mkdirp.git +[submodule "node_modules/fast-list"] + path = node_modules/fast-list + url = git://github.com/isaacs/fast-list.git diff --git a/deps/npm/doc/cli/coding-style.md b/deps/npm/doc/cli/coding-style.md index f0640c85c..5315c575c 100644 --- a/deps/npm/doc/cli/coding-style.md +++ b/deps/npm/doc/cli/coding-style.md @@ -155,16 +155,16 @@ Use appropriate log levels. The default log() function logs at the ## Case, naming, etc. -Use lowerCamelCase for multiword identifiers when they refer to objects, +Use `lowerCamelCase` for multiword identifiers when they refer to objects, functions, methods, members, or anything not specified in this section. -Use UpperCamelCase for class names (things that you'd pass to "new"). +Use `UpperCamelCase` for class names (things that you'd pass to "new"). -Use all-lower-hyphen-css-case for multiword filenames and config keys. +Use `all-lower-hyphen-css-case` for multiword filenames and config keys. Use named functions. They make stack traces easier to follow. -Use CAPS_SNAKE_CASE for constants, things that should never change +Use `CAPS_SNAKE_CASE` for constants, things that should never change and are rarely used. Use a single uppercase letter for function names where the function diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js index bc97bf1af..ebee00387 100644 --- a/deps/npm/lib/completion.js +++ b/deps/npm/lib/completion.js @@ -20,7 +20,7 @@ var output = require("./utils/output.js") completion.completion = function (opts, cb) { if (opts.w > 3) return cb() - var fs = require("fs") + var fs = require("graceful-fs") , path = require("path") , bashExists = null , zshExists = null diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js index d6db6ea52..9d5f05210 100644 --- a/deps/npm/lib/utils/tar.js +++ b/deps/npm/lib/utils/tar.js @@ -76,16 +76,10 @@ function packFiles (targetTarball, parent, files, pkg, cb) { , path: parent , filter: function () { return -1 !== files.indexOf(this.path) - // || (this.type === "Directory" && - // this.basename !== ".git") - } }) .on("error", log.er(cb, "error reading "+parent)) - .on("entry", function E (entry) { - entry.on("entry", E) - }) - .pipe(tar.Pack({})) + .pipe(tar.Pack()) .on("error", log.er(cb, "tar creation error "+targetTarball)) .pipe(zlib.Gzip()) .on("error", log.er(cb, "gzip error "+targetTarball)) @@ -155,8 +149,9 @@ function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) { log.silly([dMode.toString(8), fMode.toString(8)], "gunzTarPerm modes") fs.createReadStream(tarball) + .on("error", log.er(cb, "error reading "+tarball)) .pipe(zlib.Unzip()) - .on("error", log.er(cb, "unzip error")) + .on("error", log.er(cb, "unzip error "+tarball)) .pipe(tar.Extract({ type: "Directory", path: tmp })) .on("error", log.er(cb, "Failed unpacking "+tarball)) .on("close", afterUntar) @@ -165,6 +160,7 @@ function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) { // XXX Do all this in an Extract filter. // function afterUntar (er) { + log.silly(er, "afterUntar") // if we're not doing ownership management, // then we're done now. if (er) return log.er(cb, "Failed unpacking "+tarball)(er) diff --git a/deps/npm/node_modules/abbrev/LICENSE b/deps/npm/node_modules/abbrev/LICENSE new file mode 100644 index 000000000..05a401094 --- /dev/null +++ b/deps/npm/node_modules/abbrev/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/abbrev/package.json b/deps/npm/node_modules/abbrev/package.json index ebd082f5d..045cbd4b2 100644 --- a/deps/npm/node_modules/abbrev/package.json +++ b/deps/npm/node_modules/abbrev/package.json @@ -5,4 +5,7 @@ , "main" : "./lib/abbrev.js" , "scripts" : { "test" : "node lib/abbrev.js" } , "repository" : "http://github.com/isaacs/abbrev-js" +, "license" : + { "type" : "MIT" + , "url" : "https://github.com/isaacs/abbrev-js/raw/master/LICENSE" } } diff --git a/deps/npm/node_modules/block-stream/bench/block-stream.js b/deps/npm/node_modules/block-stream/bench/block-stream.js deleted file mode 100644 index 1141f3a84..000000000 --- a/deps/npm/node_modules/block-stream/bench/block-stream.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/deps/npm/node_modules/block-stream/bench/dropper-pause.js b/deps/npm/node_modules/block-stream/bench/dropper-pause.js deleted file mode 100644 index 93e4068ee..000000000 --- a/deps/npm/node_modules/block-stream/bench/dropper-pause.js +++ /dev/null @@ -1,70 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - f.pause() - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - f.resume() - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/deps/npm/node_modules/block-stream/bench/dropper.js b/deps/npm/node_modules/block-stream/bench/dropper.js deleted file mode 100644 index 55fa13305..000000000 --- a/deps/npm/node_modules/block-stream/bench/dropper.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/deps/npm/node_modules/block-stream/test/basic.js b/deps/npm/node_modules/block-stream/test/basic.js deleted file mode 100644 index b4b930511..000000000 --- a/deps/npm/node_modules/block-stream/test/basic.js +++ /dev/null @@ -1,27 +0,0 @@ -var tap = require("tap") - , BlockStream = require("../block-stream.js") - -tap.test("basic test", function (t) { - var b = new BlockStream(16) - var fs = require("fs") - var fstr = fs.createReadStream(__filename, {encoding: "utf8"}) - fstr.pipe(b) - - var stat - t.doesNotThrow(function () { - stat = fs.statSync(__filename) - }, "stat should not throw") - - var totalBytes = 0 - b.on("data", function (c) { - t.equal(c.length, 16, "chunks should be 16 bytes long") - t.type(c, Buffer, "chunks should be buffer objects") - totalBytes += c.length - }) - b.on("end", function () { - var expectedBytes = stat.size + (16 - stat.size % 16) - t.equal(totalBytes, expectedBytes, "Should be multiple of 16") - t.end() - }) - -}) diff --git a/deps/npm/node_modules/block-stream/test/nopad-thorough.js b/deps/npm/node_modules/block-stream/test/nopad-thorough.js deleted file mode 100644 index 1141f3a84..000000000 --- a/deps/npm/node_modules/block-stream/test/nopad-thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/deps/npm/node_modules/block-stream/test/nopad.js b/deps/npm/node_modules/block-stream/test/nopad.js deleted file mode 100644 index 6d38429fb..000000000 --- a/deps/npm/node_modules/block-stream/test/nopad.js +++ /dev/null @@ -1,57 +0,0 @@ -var BlockStream = require("../") -var tap = require("tap") - - -tap.test("don't pad, small writes", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - f.on("data", function (c) { - t.equal(c.toString(), "abc", "should get 'abc'") - }) - - f.on("end", function () { t.end() }) - - f.write(new Buffer("a")) - f.write(new Buffer("b")) - f.write(new Buffer("c")) - f.end() -}) - -tap.test("don't pad, exact write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.fail("should only get one") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnop")) -}) - -tap.test("don't pad, big write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(2) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.equal(c.toString(), "q") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnopq")) -}) diff --git a/deps/npm/node_modules/block-stream/test/pause-resume.js b/deps/npm/node_modules/block-stream/test/pause-resume.js deleted file mode 100644 index 248cf9cbd..000000000 --- a/deps/npm/node_modules/block-stream/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16] - , writeSizes = [15, 16, 17] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - var paused = false - - f.on("data", function (c) { - timeouts ++ - t.notOk(paused, "should not be paused when emitting data") - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - paused = true - f.pause() - process.nextTick(function () { - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - paused = false - f.resume() - timeouts -- - }) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 200) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/deps/npm/node_modules/block-stream/test/thorough.js b/deps/npm/node_modules/block-stream/test/thorough.js deleted file mode 100644 index 4ab14ff20..000000000 --- a/deps/npm/node_modules/block-stream/test/thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/deps/npm/node_modules/fast-list/README.md b/deps/npm/node_modules/fast-list/README.md new file mode 100644 index 000000000..3340f4bdb --- /dev/null +++ b/deps/npm/node_modules/fast-list/README.md @@ -0,0 +1,111 @@ +# The Problem + +You've got some thing where you need to push a bunch of stuff into a +queue and then shift it out. Or, maybe it's a stack, and you're just +pushing and popping it. + +Arrays work for this, but are a bit costly performance-wise. + +# The Solution + +A linked-list implementation that takes advantage of what v8 is good at: +creating objects with a known shape. + +This is faster for this use case. How much faster? About 50%. + + $ node bench.js + benchmarking /Users/isaacs/dev-src/js/fast-list/bench.js + Please be patient. + { node: '0.6.2-pre', + v8: '3.6.6.8', + ares: '1.7.5-DEV', + uv: '0.1', + openssl: '0.9.8l' } + Scores: (bigger is better) + + new FastList() + Raw: + > 22556.39097744361 + > 23054.755043227666 + > 22770.398481973436 + > 23414.634146341465 + > 23099.133782483157 + Average (mean) 22979.062486293868 + + [] + Raw: + > 12195.121951219513 + > 12184.508268059182 + > 12173.91304347826 + > 12216.404886561955 + > 12184.508268059182 + Average (mean) 12190.891283475617 + + new Array() + Raw: + > 12131.715771230503 + > 12184.508268059182 + > 12216.404886561955 + > 12195.121951219513 + > 11940.298507462687 + Average (mean) 12133.609876906768 + + Winner: new FastList() + Compared with next highest ([]), it's: + 46.95% faster + 1.88 times as fast + 0.28 order(s) of magnitude faster + + Compared with the slowest (new Array()), it's: + 47.2% faster + 1.89 times as fast + 0.28 order(s) of magnitude faster + +This lacks a lot of features that arrays have: + +1. You can't specify the size at the outset. +2. It's not indexable. +3. There's no join, concat, etc. + +If any of this matters for your use case, you're probably better off +using an Array object. + +## Installing + +``` +npm install fast-list +``` + +## API + +```javascript +var FastList = require("fast-list") +var list = new FastList() +list.push("foo") +list.unshift("bar") +list.push("baz") +console.log(list.length) // 2 +console.log(list.pop()) // baz +console.log(list.shift()) // bar +console.log(list.shift()) // foo +``` + +### Methods + +* `push`: Just like Array.push, but only can take a single entry +* `pop`: Just like Array.pop +* `shift`: Just like Array.shift +* `unshift`: Just like Array.unshift, but only can take a single entry +* `drop`: Drop all entries +* `item(n)`: Retrieve the nth item in the list. This involves a walk + every time. It's very slow. If you find yourself using this, + consider using a normal Array instead. +* `slice(start, end)`: Retrieve an array of the items at this position. + This involves a walk every time. It's very slow. If you find + yourself using this, consider using a normal Array instead. + +### Members + +* `length`: The number of things in the list. Note that, unlike + Array.length, this is not a getter/setter, but rather a counter that + is internally managed. Setting it can only cause harm. diff --git a/deps/npm/node_modules/fast-list/bench.js b/deps/npm/node_modules/fast-list/bench.js new file mode 100644 index 000000000..f15450f22 --- /dev/null +++ b/deps/npm/node_modules/fast-list/bench.js @@ -0,0 +1,55 @@ +var bench = require("bench") + +var l = 1000 + , FastList = require("./fast-list.js") + +exports.countPerLap = l * 2 + +exports.compare = + { "[]": function () { + var list = [] + for (var j = 0; j < l; j ++) { + if (j % 2) list.push(j) + else list.unshift(j) + } + for (var j = 0; j < l; j ++) { + if (j % 2) list.shift(j) + else list.pop(j) + } + } + , "new Array()": function () { + var list = new Array() + for (var j = 0; j < l; j ++) { + if (j % 2) list.push(j) + else list.unshift(j) + } + for (var j = 0; j < l; j ++) { + if (j % 2) list.shift(j) + else list.pop(j) + } + } + // , "FastList()": function () { + // var list = FastList() + // for (var j = 0; j < l; j ++) { + // if (j % 2) list.push(j) + // else list.unshift(j) + // } + // for (var j = 0; j < l; j ++) { + // if (j % 2) list.shift(j) + // else list.pop(j) + // } + // } + , "new FastList()": function () { + var list = new FastList() + for (var j = 0; j < l; j ++) { + if (j % 2) list.push(j) + else list.unshift(j) + } + for (var j = 0; j < l; j ++) { + if (j % 2) list.shift(j) + else list.pop(j) + } + } + } + +bench.runMain() diff --git a/deps/npm/node_modules/fast-list/fast-list.js b/deps/npm/node_modules/fast-list/fast-list.js new file mode 100644 index 000000000..571687846 --- /dev/null +++ b/deps/npm/node_modules/fast-list/fast-list.js @@ -0,0 +1,90 @@ +;(function() { // closure for web browsers + +function Item (data, prev, next) { + this.next = next + if (next) next.prev = this + this.prev = prev + if (prev) prev.next = this + this.data = data +} + +function FastList () { + if (!(this instanceof FastList)) return new FastList + this._head = null + this._tail = null + this.length = 0 +} + +FastList.prototype = +{ push: function (data) { + this._tail = new Item(data, this._tail, null) + if (!this._head) this._head = this._tail + this.length ++ + } +, pop: function () { + if (this.length === 0) return undefined + var t = this._tail + this._tail = t.prev + if (t.prev) { + t.prev = this._tail.next = null + } + this.length -- + if (this.length === 1) this._head = this._tail + else if (this.length === 0) this._head = this._tail = null + return t.data + } +, unshift: function (data) { + this._head = new Item(data, null, this._head) + if (!this._tail) this._tail = this._head + this.length ++ + } +, shift: function () { + if (this.length === 0) return undefined + var h = this._head + this._head = h.next + if (h.next) { + h.next = this._head.prev = null + } + this.length -- + if (this.length === 1) this._tail = this._head + else if (this.length === 0) this._head = this._tail = null + return h.data + } +, item: function (n) { + if (n < 0) n = this.length + n + var h = this._head + while (n-- > 0 && h) h = h.next + return h ? h.data : undefined + } +, slice: function (n, m) { + if (!n) n = 0 + if (!m) m = this.length + if (m < 0) m = this.length + m + if (n < 0) n = this.length + n + + if (m <= n) { + throw new Error("invalid offset: "+n+","+m) + } + + var len = m - n + , ret = new Array(len) + , i = 0 + , h = this._head + while (n-- > 0 && h) h = h.next + while (i < len && h) { + ret[i++] = h.data + h = h.next + } + return ret + } +, drop: function () { + FastList.call(this) + } +} + +if ("undefined" !== typeof(exports)) module.exports = FastList +else if ("function" === typeof(define) && define.amd) { + define("FastList", function() { return FastList }) +} else (function () { return this })().FastList = FastList + +})() diff --git a/deps/npm/node_modules/fast-list/package.json b/deps/npm/node_modules/fast-list/package.json new file mode 100644 index 000000000..1a8fd650c --- /dev/null +++ b/deps/npm/node_modules/fast-list/package.json @@ -0,0 +1,20 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "fast-list", + "description": "A fast linked list (good for queues, stacks, etc.)", + "version": "1.0.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/fast-list.git" + }, + "main": "fast-list.js", + "dependencies": {}, + "devDependencies": { + "bench": "~0.3.2", + "tap": "~0.1.0" + }, + "scripts": { + "test": "node test.js", + "bench": "node bench.js" + } +} diff --git a/deps/npm/node_modules/fstream/examples/pipe.js b/deps/npm/node_modules/fstream/examples/pipe.js deleted file mode 100644 index b08d79481..000000000 --- a/deps/npm/node_modules/fstream/examples/pipe.js +++ /dev/null @@ -1,113 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) - !this.basename.match(/^deep-copy$/) - } - }) - -var w = fstream.Writer({ path: path.resolve(__dirname, "deep-copy") - , type: "Directory" - }) - -var indent = "" -var escape = {} - -r.on("entry", appears) -//r.on("ready", function () { -// appears(r) -//}) - -function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename) - if (foggy) { - console.error("FOGGY!") - var p = entry - do { - console.error(p.depth, p.path, p._paused) - } while (p = p.parent) - - throw new Error("\033[mshould not have entries while foggy") - } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) -} - -var foggy -function missile (entry) { - if (entry.type === "Directory") { - var ended = false - entry.once("end", function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") - entry.pause() - entry.once("resume", liftFog) - foggy = setTimeout(liftFog, 10) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", - entry.basename, - e ? "is struck" : "fires a chunk", - c.length) - } -} - -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - - -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) -function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) -} - -ended = false -r.on("end", function () { - if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") - ended = true -}) - -process.on("exit", function () { - console.error("ended? "+ended) -}) -r.pipe(w) - diff --git a/deps/npm/node_modules/fstream/examples/reader.js b/deps/npm/node_modules/fstream/examples/reader.js deleted file mode 100644 index 73075102f..000000000 --- a/deps/npm/node_modules/fstream/examples/reader.js +++ /dev/null @@ -1,29 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) - } - }) - -console.error(r instanceof fstream.Reader) -console.error(r instanceof require("stream").Stream) -console.error(r instanceof require("events").EventEmitter) -console.error(r.on) - -r.on("stat", function () { - console.error("a %s !!!\t", r.type, r.path) -}) - -r.on("entries", function (entries) { - console.error("\t" + entries.join("\n\t")) -}) - -r.on("entry", function (entry) { - console.error("a %s !!!\t", entry.type, entry.path) -}) - -r.on("end", function () { - console.error("IT'S OVER!!") -}) diff --git a/deps/npm/node_modules/fstream/examples/symlink-write.js b/deps/npm/node_modules/fstream/examples/symlink-write.js deleted file mode 100644 index 657375b98..000000000 --- a/deps/npm/node_modules/fstream/examples/symlink-write.js +++ /dev/null @@ -1,9 +0,0 @@ -var fstream = require("../fstream.js") - -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , isSymbolicLink: true - , mode: "0755" // octal strings supported - }) - .end() diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js index f280963aa..4097b5b78 100644 --- a/deps/npm/node_modules/fstream/lib/writer.js +++ b/deps/npm/node_modules/fstream/lib/writer.js @@ -246,17 +246,7 @@ Writer.prototype._finish = function () { ? "utimes" : "lutimes" if (utimes === "lutimes" && !fs[utimes]) { - if (!fs.futimes) fs.ltimes = function (a, b, c, cb) { return cb() } - else fs.lutimes = function (path, atime, mtime, cb) { - var c = require("constants") - fs.open(path, c.O_SYMLINK, function (er, fd) { - if (er) return cb(er) - fs.futimes(fd, atime, mtime, function (er) { - if (er) return cb(er) - fs.close(fd, cb) - }) - }) - } + utimes = "utimes" } var curA = current.atime diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json index 22d5821f6..db4b76741 100644 --- a/deps/npm/node_modules/fstream/package.json +++ b/deps/npm/node_modules/fstream/package.json @@ -2,19 +2,19 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me/)", "name": "fstream", "description": "Advanced file system stream things", - "version": "0.0.1", + "version": "0.1.1", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream.git" }, "main": "fstream.js", "engines": { - "node": "0.5 || 0.6" + "node": "0.5 || 0.6 || 0.7" }, "dependencies": { "rimraf": "~1.0.8", "mkdirp": "~0.1.0", - "graceful-fs": "~1.0.1", + "graceful-fs": "1.1", "inherits": "~1.0.0" }, "devDependencies": {} diff --git a/deps/npm/node_modules/graceful-fs/graceful-fs.js b/deps/npm/node_modules/graceful-fs/graceful-fs.js index 08e99b24b..9b8492ac1 100644 --- a/deps/npm/node_modules/graceful-fs/graceful-fs.js +++ b/deps/npm/node_modules/graceful-fs/graceful-fs.js @@ -1,39 +1,189 @@ -// wrapper around the non-sync fs functions to gracefully handle -// having too many file descriptors open. Note that this is -// *only* possible because async patterns let one interject timeouts -// and other cleverness anywhere in the process without disrupting -// anything else. +// this keeps a queue of opened file descriptors, and will make +// fs operations wait until some have closed before trying to open more. var fs = require("fs") - , timeout = 0 + , FastList = require("fast-list") + , queue = new FastList() + , curOpen = 0 + , constants = require("constants") -Object.keys(fs) - .forEach(function (i) { - exports[i] = (typeof fs[i] !== "function") ? fs[i] - : (i.match(/^[A-Z]|^create|Sync$/)) ? function () { - return fs[i].apply(fs, arguments) - } - : graceful(fs[i]) - }) +exports = module.exports = fs -if (process.platform === "win32" - && !process.binding("fs").lstat) { - exports.lstat = exports.stat - exports.lstatSync = exports.statSync +fs.MAX_OPEN = 256 + +fs._open = fs.open +fs._openSync = fs.openSync +fs._close = fs.close +fs._closeSync = fs.closeSync + + +// lstat on windows, missing from early 0.5 versions +if (process.platform === "win32" && !process.binding("fs").lstat) { + fs.lstat = fs.stat + fs.lstatSync = fs.statSync } -function graceful (fn) { return function GRACEFUL () { - var args = Array.prototype.slice.call(arguments) - , cb_ = args.pop() - args.push(cb) - function cb (er) { - if (er && er.message.match(/^EMFILE, Too many open files/)) { - setTimeout(function () { - GRACEFUL.apply(fs, args) - }, timeout ++) - return - } - timeout = 0 - cb_.apply(null, arguments) +// lutimes +var constants = require("constants") +if (!fs.lutimes) fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + cb = cb || noop + if (er) return cb(er) + fs.futimes(fd, at, mt, function (er) { + if (er) { + fs.close(fd, function () {}) + return cb(er) + } + fs.close(fd, cb) + }) + }) +} + +if (!fs.lutimesSync) fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + fs.futimesSync(fd, at, mt) + fs.closeSync(fd) +} + + +// prevent EMFILE errors +function OpenReq (path, flags, mode, cb) { + this.path = path + this.flags = flags + this.mode = mode + this.cb = cb +} + +function noop () {} + +fs.open = function (path, flags, mode, cb) { + if (typeof mode === "function") cb = mode, mode = null + if (typeof cb !== "function") cb = noop + + if (curOpen >= fs.MAX_OPEN) { + queue.push(new OpenReq(path, flags, mode, cb)) + setTimeout(flush) + return } - fn.apply(fs, args) -}} + open(path, flags, mode, cb) +} + +function open (path, flags, mode, cb) { + cb = cb || noop + curOpen ++ + fs._open(path, flags, mode, function (er, fd) { + if (er) { + onclose() + } + + cb(er, fd) + }) +} + +fs.openSync = function (path, flags, mode) { + curOpen ++ + return fs._openSync(path, flags, mode) +} + +function onclose () { + curOpen -- + flush() +} + +function flush () { + while (curOpen < fs.MAX_OPEN) { + var req = queue.shift() + if (!req) break + open(req.path, req.flags, req.mode, req.cb) + } + if (queue.length === 0) return +} + +fs.close = function (fd, cb) { + cb = cb || noop + fs._close(fd, function (er) { + onclose() + cb(er) + }) +} + +fs.closeSync = function (fd) { + onclose() + return fs._closeSync(fd) +} + +// lchmod, broken prior to 0.6.2 +// back-port the fix here. +if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + fs.lchmod = function(path, mode, callback) { + callback = callback || noop; + fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, function(err, fd) { + if (err) { + callback(err); + return; + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function(err) { + fs.close(fd, function(err2) { + callback(err || err2); + }); + }); + }); + }; + + fs.lchmodSync = function(path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK); + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var err, err2; + try { + var ret = fs.fchmodSync(fd, mode); + } catch (er) { + err = er; + } + try { + fs.closeSync(fd); + } catch (er) { + err2 = er; + } + if (err || err2) throw (err || err2); + return ret; + }; +} + +// lutimes, not yet implemented in node +if (constants.hasOwnProperty('O_SYMLINK') && !fs.lutimes) { + fs.lutimes = function (path, atime, mtime, cb) { + cb = cb || noop + fs.open(path, constants.O_SYMLINK | constants.O_WRONLY, function (er, fd) { + if (er) return cb(er) + fs.futimes(fd, atime, mtime, function (er) { + fs.close(fd, function (er2) { + cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function(path, atime, mtime) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var err, err2 + try { + var ret = fs.futimesSync(fd, atime, mtime) + } catch (er) { + err = er + } + try { + fs.closeSync(fd) + } catch (er) { + err2 = er + } + if (err || err2) throw (err || err2) + return ret + } +} diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json index 934829c5c..3c2f8a6ff 100644 --- a/deps/npm/node_modules/graceful-fs/package.json +++ b/deps/npm/node_modules/graceful-fs/package.json @@ -1,8 +1,8 @@ { "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "graceful-fs", - "description": "fs with incremental backoff on EMFILE", - "version": "1.0.1", + "description": "fs monkey-patching to avoid EMFILE and other problems", + "version": "1.1.0", "repository": { "type": "git", "url": "git://github.com/isaacs/node-graceful-fs.git" @@ -11,6 +11,8 @@ "engines": { "node": "0.4 || 0.5 || 0.6" }, - "dependencies": {}, + "dependencies": { + "fast-list": "1" + }, "devDependencies": {} } diff --git a/deps/npm/node_modules/ini/test/fixtures/foo.ini b/deps/npm/node_modules/ini/test/fixtures/foo.ini deleted file mode 100644 index aa4b177a0..000000000 --- a/deps/npm/node_modules/ini/test/fixtures/foo.ini +++ /dev/null @@ -1,18 +0,0 @@ -o = p - - a with spaces = b c - -; wrap in quotes to JSON-decode and preserve spaces -" xa n p " = "\"\r\nyoyoyo\r\r\n" - -; a section -[a] -av = a val -e = { o: p, a: { av: a val, b: { c: { e: "this value" } } } } -j = "{ o: "p", a: { av: "a val", b: { c: { e: "this value" } } } }" - -; nested child without middle parent -; should create otherwise-empty a.b -[a.b.c] -e = 1 -j = 2 diff --git a/deps/npm/node_modules/ini/test/foo.js b/deps/npm/node_modules/ini/test/foo.js deleted file mode 100644 index 31af10320..000000000 --- a/deps/npm/node_modules/ini/test/foo.js +++ /dev/null @@ -1,40 +0,0 @@ -var i = require("../") - , tap = require("tap") - , test = tap.test - , fs = require("fs") - , path = require("path") - , fixture = path.resolve(__dirname, "./fixtures/foo.ini") - , data = fs.readFileSync(fixture, "utf8") - , d - , expectE = 'o = p\n' - + 'a with spaces = b c\n' - + '" xa n p " = "\\"\\r\\nyoyoyo\\r\\r\\n"\n' - + '[a]\n' - + 'av = a val\n' - + 'e = { o: p, a: ' - + '{ av: a val, b: { c: { e: "this value" ' - + '} } } }\nj = "\\"{ o: \\"p\\", a: { av:' - + ' \\"a val\\", b: { c: { e: \\"this value' - + '\\" } } } }\\""\n[a.b.c]\ne = 1\nj = 2\n' - , expectD = - { o: 'p', - 'a with spaces': 'b c', - " xa n p ":'"\r\nyoyoyo\r\r\n', - a: - { av: 'a val', - e: '{ o: p, a: { av: a val, b: { c: { e: "this value" } } } }', - j: '"{ o: "p", a: { av: "a val", b: { c: { e: "this value" } } } }"', - b: { c: { e: '1', j: '2' } } } - } - -test("decode from file", function (t) { - d = i.decode(data) - t.deepEqual(d, expectD) - t.end() -}) - -test("encode from data", function (t) { - e = i.encode(expectD) - t.deepEqual(e, expectE) - t.end() -}) diff --git a/deps/npm/node_modules/minimatch/test/basic.js b/deps/npm/node_modules/minimatch/test/basic.js deleted file mode 100644 index e4c5437e1..000000000 --- a/deps/npm/node_modules/minimatch/test/basic.js +++ /dev/null @@ -1,141 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test - -var tap = require("tap") - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - -tap.test("basic tests", function (t) { - // [ pattern, [matches], MM opts, files, TAP opts] - ; [ "http://www.bashcookbook.com/bashinfo" + - "/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"]] - // allow null glob expansion - , ["X*", [], { null: true }] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"]] - , ["\\**", ["\\**"]] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - - , ["\\.\\./*/", ["\\.\\./*/"]] - , ["s/\\..*//", ["s/\\..*//"]] - - // legendary larry crashes bashes - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"]] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"]] - - // character classes - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and " + - "represent itself in a bracket expression if it occurs " + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["[/\\\\]*", ["/tmp"], null, ["/tmp"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - ].forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var r = mm.makeRe(pattern, options) - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - - var actual = mm.match(f, pattern, options) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , c[4] ) - }) - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/deps/npm/node_modules/mkdirp/examples/pow.js b/deps/npm/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index 774146221..000000000 --- a/deps/npm/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/deps/npm/node_modules/mkdirp/test/chmod.js b/deps/npm/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 0609694e3..000000000 --- a/deps/npm/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0755'); - t.end(); - }); - }); -}); diff --git a/deps/npm/node_modules/mkdirp/test/clobber.js b/deps/npm/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb709987..000000000 --- a/deps/npm/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/deps/npm/node_modules/mkdirp/test/mkdirp.js b/deps/npm/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c1..000000000 --- a/deps/npm/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/deps/npm/node_modules/mkdirp/test/race.js b/deps/npm/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a044763..000000000 --- a/deps/npm/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/deps/npm/node_modules/mkdirp/test/rel.js b/deps/npm/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243a..000000000 --- a/deps/npm/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/deps/npm/node_modules/node-uuid/.gitignore b/deps/npm/node_modules/node-uuid/.gitignore new file mode 100644 index 000000000..fd4f2b066 --- /dev/null +++ b/deps/npm/node_modules/node-uuid/.gitignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/deps/npm/node_modules/node-uuid/README.md b/deps/npm/node_modules/node-uuid/README.md index c00675066..98083f304 100644 --- a/deps/npm/node_modules/node-uuid/README.md +++ b/deps/npm/node_modules/node-uuid/README.md @@ -1,100 +1,195 @@ # node-uuid -Simple, fast generation of RFC4122[RFC4122(v4)](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. It runs in node.js and all major browsers. +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. -## Installation +Features: - npm install node-uuid +* Generate RFC4122 version 1 or version 4 UUIDs +* Runs in node.js and all browsers. +* Cryptographically strong random # generation on supporting platforms +* 1.1K minified and gzip'ed -### In browser +## Getting Started - +Install it in your browser: -### In node.js +```html + +``` - var uuid = require('node-uuid'); +Or in node.js: -## Usage +``` +npm install node-uuid +``` -### Generate a String UUID +```javascript +var uuid = require('node-uuid'); +``` - var id = uuid(); // -> '92329D39-6F5C-4520-ABFC-AAB64544E172' +Then create some ids ... -### Generate a Binary UUID +```javascript +// Generate a v1 (time-based) id +uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - // Simple form - allocates a Buffer/Array for you - var buf = uuid('binary'); - // node.js -> - // browser -> [8, 80, 5, 200, 156, 178, 76, 7, 172, 7, 209, 79, 185, 245, 4, 81] +// Generate a v4 (random) id +uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' +``` - // Provide your own Buffer or Array - var buf = new Array(16); - uuid('binary', buf); // -> [8, 80, 5, 200, 156, 178, 76, 7, 172, 7, 209, 79, 185, 245, 4, 81] - var buf = new Buffer(16); - uuid('binary', buf); // -> +## API - // Provide your own Buffer/Array, plus specify offset - // (e.g. here we fill an array with 3 uuids) - var buf = new Buffer(16 \* 3); - uuid('binary', id, 0); - uuid('binary', id, 16); - uuid('binary', id, 32); +### uuid.v1([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomnly generated ID. See note 2. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. See note 3. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Notes: + +1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) +1. Specifying the `msecs` option bypasses the internal logic for ensuring id uniqueness. In this case you may want to also provide `clockseq` and `nsecs` options as well. + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v1({ + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}); // -> "710b962e-041c-11e1-9234-0123456789ab" +``` + +Example: In-place generation of two binary IDs + +```javascript +// In browsers: 'new Array(32)' +var buffer = new Buffer(32).fill(0); // -> +uuid.v1(null, buffer, 0); // -> +uuid.v1(null, buffer, 16); // -> + +// Optionally use uuid.unparse() to get stringify the ids +uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' +uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' +``` + +### uuid.v4([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v4({ + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}); +// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" +``` + +Example: Generate two IDs in a single buffer + +```javascript +var buffer = new Array(32); // (or 'new Buffer' in node.js) +uuid.v4(null, buffer, 0); +uuid.v4(null, buffer, 16); +``` + +### uuid.parse(id[, buffer[, offset]]) +### uuid.unparse(buffer[, offset]) + +Parse and unparse UUIDs + + * `id` - (String) UUID(-like) string + * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used + * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 + +Example parsing and unparsing a UUID string + +```javascript +var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> +var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' +``` + +### uuid.noConflict() + +(Browsers only) Set `uuid` property back to it's previous value. + +Returns the node-uuid object. + +Example: + +```javascript +var myUuid = uuid.noConflict(); +myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' +``` + +## Deprecated APIs + +Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. + +### uuid([format [, buffer [, offset]]]) + +uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). + +### uuid.BufferClass + +The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. ## Testing -test/test.js generates performance data (similar to test/benchmark.js). It also verifies the syntax of 100K string UUIDs, and logs the distribution of hex digits found therein. For example: +In node.js - - - - Performance Data - - - - uuid(): 1052631 uuids/second - uuid('binary'): 680272 uuids/second - uuid('binary', buffer): 2702702 uuids/second +``` +> cd test +> node uuid.js +``` - - - - Distribution of Hex Digits (% deviation from ideal) - - - - 0 |================================| 187705 (0.11%) - 1 |================================| 187880 (0.2%) - 2 |================================| 186875 (-0.33%) - 3 |================================| 186847 (-0.35%) - 4 |==================================================| 287433 (-0.02%) - 5 |================================| 187910 (0.22%) - 6 |================================| 188172 (0.36%) - 7 |================================| 187350 (-0.08%) - 8 |====================================| 211994 (-0.24%) - 9 |====================================| 212664 (0.08%) - A |=====================================| 213185 (0.32%) - B |=====================================| 212877 (0.18%) - C |================================| 187445 (-0.03%) - D |================================| 186737 (-0.41%) - E |================================| 187155 (-0.18%) - F |================================| 187771 (0.14%) +In Browser -Note that the increased values for 4 and 8-B are expected as part of the RFC4122 syntax (and are accounted for in the deviation calculation). BTW, if someone wants to do the calculation to determine what a statistically significant deviation would be, I'll gladly add that to the test. +``` +open test/test.html +``` -### In browser +### Benchmarking - Open test/test.html +Requires node.js -### In node.js +``` +npm install uuid uuid-js +node test/benchmark.js +``` - > node test/test.js +For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) -node.js users can also run the node-uuid .vs. uuid.js benchmark: +For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - > node test/benchmark.js +### Release notes -## Performance +v1.3: Includes -### In node.js - -node-uuid is designed to be fast. That said, the target platform is node.js, where it is screaming fast. Here's what I get on my 2.66GHz Macbook Pro for the test/benchmark.js script: - - nodeuuid(): 1126126 uuids/second - nodeuuid('binary'): 782472 uuids/second - nodeuuid('binary', buffer): 2688172 uuids/second - uuidjs(): 620347 uuids/second - uuidjs('binary'): 1275510 uuids/second - -The uuidjs() entries are for Nikhil Marathe's [uuidjs module](https://bitbucket.org/nikhilm/uuidjs), and are provided for comparison. uuidjs is a wrapper around the native libuuid library. - -### In browser - -node-uuid performance varies dramatically across browsers. For comprehensive test results, please [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/deps/npm/node_modules/node-uuid/benchmark/README.md b/deps/npm/node_modules/node-uuid/benchmark/README.md new file mode 100644 index 000000000..aaeb2ea01 --- /dev/null +++ b/deps/npm/node_modules/node-uuid/benchmark/README.md @@ -0,0 +1,53 @@ +# node-uuid Benchmarks + +### Results + +To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark + +### Run them yourself + +node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. + +To prepare and run the benchmark issue; + +``` +npm install uuid uuid-js +node benchmark/benchmark.js +``` + +You'll see an output like this one: + +``` +# v4 +nodeuuid.v4(): 854700 uuids/second +nodeuuid.v4('binary'): 788643 uuids/second +nodeuuid.v4('binary', buffer): 1336898 uuids/second +uuid(): 479386 uuids/second +uuid('binary'): 582072 uuids/second +uuidjs.create(4): 312304 uuids/second + +# v1 +nodeuuid.v1(): 938086 uuids/second +nodeuuid.v1('binary'): 683060 uuids/second +nodeuuid.v1('binary', buffer): 1644736 uuids/second +uuidjs.create(1): 190621 uuids/second +``` + +* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. +* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. + +If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: + +``` +for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; +``` + +If you're interested in how performance varies between different node versions, you can issue the above command multiple times. + +You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: + +``` +(cd benchmark/ && ./bench.sh) +``` + +This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/deps/npm/node_modules/node-uuid/benchmark/bench.gnu b/deps/npm/node_modules/node-uuid/benchmark/bench.gnu new file mode 100644 index 000000000..6001deb98 --- /dev/null +++ b/deps/npm/node_modules/node-uuid/benchmark/bench.gnu @@ -0,0 +1,175 @@ +#!/opt/local/bin/gnuplot -persist +# +# +# G N U P L O T +# Version 4.4 patchlevel 3 +# last modified March 2011 +# System: Darwin 10.8.0 +# +# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 +# Thomas Williams, Colin Kelley and many others +# +# gnuplot home: http://www.gnuplot.info +# faq, bugs, etc: type "help seeking-assistance" +# immediate help: type "help" +# plot window: hit 'h' +set terminal postscript eps noenhanced defaultplex \ + leveldefault color colortext \ + solid linewidth 1.2 butt noclip \ + palfuncparam 2000,0.003 \ + "Helvetica" 14 +set output 'bench.eps' +unset clip points +set clip one +unset clip two +set bar 1.000000 front +set border 31 front linetype -1 linewidth 1.000 +set xdata +set ydata +set zdata +set x2data +set y2data +set timefmt x "%d/%m/%y,%H:%M" +set timefmt y "%d/%m/%y,%H:%M" +set timefmt z "%d/%m/%y,%H:%M" +set timefmt x2 "%d/%m/%y,%H:%M" +set timefmt y2 "%d/%m/%y,%H:%M" +set timefmt cb "%d/%m/%y,%H:%M" +set boxwidth +set style fill empty border +set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 +set style circle radius graph 0.02, first 0, 0 +set dummy x,y +set format x "% g" +set format y "% g" +set format x2 "% g" +set format y2 "% g" +set format z "% g" +set format cb "% g" +set angles radians +unset grid +set key title "" +set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox +set key noinvert samplen 4 spacing 1 width 0 height 0 +set key maxcolumns 2 maxrows 0 +unset label +unset arrow +set style increment default +unset style line +set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 +unset style arrow +set style histogram clustered gap 2 title offset character 0, 0, 0 +unset logscale +set offsets graph 0.05, 0.15, 0, 0 +set pointsize 1.5 +set pointintervalbox 1 +set encoding default +unset polar +unset parametric +unset decimalsign +set view 60, 30, 1, 1 +set samples 100, 100 +set isosamples 10, 10 +set surface +unset contour +set clabel '%8.3g' +set mapping cartesian +set datafile separator whitespace +unset hidden3d +set cntrparam order 4 +set cntrparam linear +set cntrparam levels auto 5 +set cntrparam points 5 +set size ratio 0 1,1 +set origin 0,0 +set style data points +set style function lines +set xzeroaxis linetype -2 linewidth 1.000 +set yzeroaxis linetype -2 linewidth 1.000 +set zzeroaxis linetype -2 linewidth 1.000 +set x2zeroaxis linetype -2 linewidth 1.000 +set y2zeroaxis linetype -2 linewidth 1.000 +set ticslevel 0.5 +set mxtics default +set mytics default +set mztics default +set mx2tics default +set my2tics default +set mcbtics default +set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set xtics norangelimit +set xtics () +set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set ytics autofreq norangelimit +set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 +set ztics autofreq norangelimit +set nox2tics +set noy2tics +set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set cbtics autofreq norangelimit +set title "" +set title offset character 0, 0, 0 font "" norotate +set timestamp bottom +set timestamp "" +set timestamp offset character 0, 0, 0 font "" norotate +set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale rfixmin +set autoscale rfixmax +set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set autoscale tfixmin +set autoscale tfixmax +set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale ufixmin +set autoscale ufixmax +set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale vfixmin +set autoscale vfixmax +set xlabel "" +set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set x2label "" +set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate +set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) +set autoscale xfixmin +set autoscale xfixmax +set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) +set autoscale x2fixmin +set autoscale x2fixmax +set ylabel "" +set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set y2label "" +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) +set autoscale yfixmin +set autoscale yfixmax +set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) +set autoscale y2fixmin +set autoscale y2fixmax +set zlabel "" +set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale zfixmin +set autoscale zfixmax +set cblabel "" +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale cbfixmin +set autoscale cbfixmax +set zero 1e-08 +set lmargin -1 +set bmargin -1 +set rmargin -1 +set tmargin -1 +set locale "de_DE.UTF-8" +set pm3d explicit at s +set pm3d scansautomatic +set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean +set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB +set palette rgbformulae 7, 5, 15 +set colorbox default +set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault +set loadpath +set fontpath +set fit noerrorvariables +GNUTERM = "aqua" +plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 +# EOF diff --git a/deps/npm/node_modules/node-uuid/benchmark/bench.sh b/deps/npm/node_modules/node-uuid/benchmark/bench.sh new file mode 100755 index 000000000..07cd14cdd --- /dev/null +++ b/deps/npm/node_modules/node-uuid/benchmark/bench.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# for a given node version run: +# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; + +PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)') +FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string) +INDICES=(2 3 2 3 2 2 2 2) +VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) +TMPJOIN="tmp_join" +OUTPUT="bench_results.txt" + +for I in ${!FILES[*]}; do + F=${FILES[$I]} + P=${PATTERNS[$I]} + INDEX=${INDICES[$I]} + echo "version $F" > $F + for V in $VERSIONS; do + (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F + done + if [ $I == 0 ]; then + cat $F > $TMPJOIN + else + join $TMPJOIN $F > $OUTPUT + cp $OUTPUT $TMPJOIN + fi + rm $F +done + +rm $TMPJOIN + +gnuplot bench.gnu +convert -density 200 -resize 800x560 -flatten bench.eps bench.png +rm bench.eps diff --git a/deps/npm/node_modules/node-uuid/test/benchmark-native.c b/deps/npm/node_modules/node-uuid/benchmark/benchmark-native.c similarity index 100% rename from deps/npm/node_modules/node-uuid/test/benchmark-native.c rename to deps/npm/node_modules/node-uuid/benchmark/benchmark-native.c diff --git a/deps/npm/node_modules/node-uuid/benchmark/benchmark.js b/deps/npm/node_modules/node-uuid/benchmark/benchmark.js new file mode 100644 index 000000000..3e63673a2 --- /dev/null +++ b/deps/npm/node_modules/node-uuid/benchmark/benchmark.js @@ -0,0 +1,52 @@ +var nodeuuid = require('../uuid'), + uuid = require('uuid').generate, + uuidjs = require('uuid-js'), + N = 5e5; + +function rate(msg, t) { + console.log(msg + ': ' + + (N / (Date.now() - t) * 1e3 | 0) + + ' uuids/second'); +} + +console.log('# v4'); + +// node-uuid - string form +for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); +rate('nodeuuid.v4()', t); + +for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); +rate('nodeuuid.v4(\'binary\')', t); + +var buffer = new nodeuuid.BufferClass(16); +for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); +rate('nodeuuid.v4(\'binary\', buffer)', t); + +// libuuid - string form +for (var i = 0, t = Date.now(); i < N; i++) uuid(); +rate('uuid()', t); + +for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); +rate('uuid(\'binary\')', t); + +// uuid-js - string form +for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); +rate('uuidjs.create(4)', t); + +console.log(''); +console.log('# v1'); + +// node-uuid - v1 string form +for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); +rate('nodeuuid.v1()', t); + +for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); +rate('nodeuuid.v1(\'binary\')', t); + +var buffer = new nodeuuid.BufferClass(16); +for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); +rate('nodeuuid.v1(\'binary\', buffer)', t); + +// uuid-js - v1 string form +for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); +rate('uuidjs.create(1)', t); diff --git a/deps/npm/node_modules/node-uuid/package.json b/deps/npm/node_modules/node-uuid/package.json index bf70062ab..a48f89045 100644 --- a/deps/npm/node_modules/node-uuid/package.json +++ b/deps/npm/node_modules/node-uuid/package.json @@ -1,12 +1,14 @@ { "name" : "node-uuid", - "description" : "Simple, fast generation of RFC4122(v4) UUIDs.", + "description" : "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", "url" : "http://github.com/broofa/node-uuid", "keywords" : ["uuid", "guid", "rfc4122"], "author" : "Robert Kieffer ", - "contributors" : [], + "contributors" : [ + {"name": "Christoph Tavan ", "github": "https://github.com/ctavan"} + ], "dependencies" : [], "lib" : ".", "main" : "./uuid.js", - "version" : "1.2.0" + "version" : "1.3.0" } diff --git a/deps/npm/node_modules/node-uuid/test/benchmark.js b/deps/npm/node_modules/node-uuid/test/benchmark.js deleted file mode 100644 index 2505dc4a2..000000000 --- a/deps/npm/node_modules/node-uuid/test/benchmark.js +++ /dev/null @@ -1,27 +0,0 @@ -var nodeuuid = require('../uuid'), - uuidjs = require('uuid').generate, - N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -// node-uuid - string form -for (var i = 0, t = Date.now(); i < N; i++) nodeuuid(); -rate('nodeuuid()', t); - -for (var i = 0, t = Date.now(); i < N; i++) nodeuuid('binary'); -rate('nodeuuid(\'binary\')', t); - -var buffer = new nodeuuid.BufferClass(16); -for (var i = 0, t = Date.now(); i < N; i++) nodeuuid('binary', buffer); -rate('nodeuuid(\'binary\', buffer)', t); - -// node-uuid - string form -for (var i = 0, t = Date.now(); i < N; i++) uuidjs(); -rate('uuidjs()', t); - -for (var i = 0, t = Date.now(); i < N; i++) uuidjs('binary'); -rate('uuidjs(\'binary\')', t); diff --git a/deps/npm/node_modules/node-uuid/test/test.html b/deps/npm/node_modules/node-uuid/test/test.html deleted file mode 100644 index 89e0f2c44..000000000 --- a/deps/npm/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - diff --git a/deps/npm/node_modules/node-uuid/test/test.js b/deps/npm/node_modules/node-uuid/test/test.js deleted file mode 100644 index 5037566ea..000000000 --- a/deps/npm/node_modules/node-uuid/test/test.js +++ /dev/null @@ -1,83 +0,0 @@ -if (typeof(uuid) == 'undefined') { - uuid = require('../uuid'); -} - -var UUID_FORMAT = /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89a-fAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}/; -var N = 1e5; - -function log(msg) { - if (typeof(document) != 'undefined') { - document.write('
' + msg + '
'); - } - if (typeof(console) != 'undefined') { - console.log(msg); - } -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids/second'); -} - -// Perf tests -log('- - - Performance Data - - -'); -for (var i = 0, t = Date.now(); i < N; i++) uuid(); -rate('uuid()', t); -for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); -rate('uuid(\'binary\')', t); -var buf = new uuid.BufferClass(16); -for (var i = 0, t = Date.now(); i < N; i++) uuid('binary', buf); -rate('uuid(\'binary\', buffer)', t); - -var counts = {}, max = 0; - -var b = new uuid.BufferClass(16); -for (var i = 0; i < N; i++) { - id = uuid(); - if (!UUID_FORMAT.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - throw Error(id + ' does not parse/unparse'); - } - - // Count digits for our randomness check - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } -} - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -log('
- - - Distribution of Hex Digits (% deviation from ideal) - - -'); - -// Check randomness -for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - log(c + ' |' + bar + '| ' + counts[c] + ' (' + d + '%)'); -} diff --git a/deps/npm/node_modules/node-uuid/uuid.js b/deps/npm/node_modules/node-uuid/uuid.js index fdf6c54fd..2ee2b1887 100644 --- a/deps/npm/node_modules/node-uuid/uuid.js +++ b/deps/npm/node_modules/node-uuid/uuid.js @@ -1,72 +1,243 @@ +/* + * Generate RFC4122 (v1 and v4) UUIDs + * + * Documentation at https://github.com/broofa/node-uuid + */ (function() { - /* - * Generate a RFC4122(v4) UUID - * - * Documentation at https://github.com/broofa/node-uuid - */ + var _global = this; - // Use node.js Buffer class if available, otherwise use the Array class - var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; + // Random number generator (feature-detected below) + var _rng; - // Buffer used for generating string uuids - var _buf = new BufferClass(16); + // node.js 'crypto' API + // http://nodejs.org/docs/v0.6.2/api/crypto.html#randomBytes + try { + _rng = require('crypto').randomBytes; + } catch (e) {} - // Cache number <-> hex string for octet values - var toString = []; - var toNumber = {}; - for (var i = 0; i < 256; i++) { - toString[i] = (i + 0x100).toString(16).substr(1); - toNumber[toString[i]] = i; + // WHATWG crypto api, available in Chrome + // http://wiki.whatwg.org/wiki/Crypto + if (!_rng && _global.crypto && crypto.getRandomValues) { + var _rnds = new Uint32Array(4), _rndBytes = new Array(16); + var _rng = function() { + // Get 32-bit rnds + crypto.getRandomValues(_rnds); + + // Unpack into byte array + for (var c = 0 ; c < 16; c++) { + _rndBytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff; + } + return _rndBytes; + }; } - function parse(s) { - var buf = new BufferClass(16); - var i = 0, ton = toNumber; - s.toLowerCase().replace(/[0-9a-f][0-9a-f]/g, function(octet) { - buf[i++] = toNumber[octet]; + // Math.random - least desirable option since it does not guarantee + // cryptographic quality. + if (!_rng) { + var _rndBytes = new Array(16); + _rng = function() { + var r, b = _rndBytes, i = 0; + + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) == 0) r = Math.random() * 0x100000000; + b[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return b; + }; + } + + // Buffer class to use + var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + /** See docs at https://github.com/broofa/node-uuid */ + function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(byte) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[byte]; + } }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii] = 0; + } + return buf; } - function unparse(buf) { - var tos = toString, b = buf; - return tos[b[0]] + tos[b[1]] + tos[b[2]] + tos[b[3]] + '-' + - tos[b[4]] + tos[b[5]] + '-' + - tos[b[6]] + tos[b[7]] + '-' + - tos[b[8]] + tos[b[9]] + '-' + - tos[b[10]] + tos[b[11]] + tos[b[12]] + - tos[b[13]] + tos[b[14]] + tos[b[15]]; + /** See docs at https://github.com/broofa/node-uuid */ + function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; } - var b32 = 0x100000000, ff = 0xff; - function uuid(fmt, buf, offset) { - var b = fmt != 'binary' ? _buf : (buf ? buf : new BufferClass(16)); + // Pre allocate array for constructing uuids + var _buffer = new BufferClass(16); + + // + // v1 UUID support + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + // + + // Per 4.1.4 - Offset (in msecs) from JS time to UUID (gregorian) time + var EPOCH_OFFSET = 12219292800000; + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(10); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockSeq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _last = 0; + + // Count of UUIDs created during current time tick + var _count = 0; + + /** See docs at https://github.com/broofa/node-uuid */ + function v1(options, buf, offset) { var i = buf && offset || 0; + var b = buf || _buffer; - var r = Math.random()*b32; - b[i++] = r & ff; - b[i++] = r>>>8 & ff; - b[i++] = r>>>16 & ff; - b[i++] = r>>>24 & ff; - r = Math.random()*b32; - b[i++] = r & ff; - b[i++] = r>>>8 & ff; - b[i++] = r>>>16 & 0x0f | 0x40; // See RFC4122 sect. 4.1.3 - b[i++] = r>>>24 & ff; - r = Math.random()*b32; - b[i++] = r & 0x3f | 0x80; // See RFC4122 sect. 4.4 - b[i++] = r>>>8 & ff; - b[i++] = r>>>16 & ff; - b[i++] = r>>>24 & ff; - r = Math.random()*b32; - b[i++] = r & ff; - b[i++] = r>>>8 & ff; - b[i++] = r>>>16 & ff; - b[i++] = r>>>24 & ff; + options = options || {}; - return fmt === undefined ? unparse(b) : b; - }; + // JS Numbers aren't capable of representing time in the RFC-specified + // 100-nanosecond units. To deal with this, we represent time as the usual + // JS milliseconds, plus an additional 100-nanosecond unit offset. + var msecs = 0; // JS time (msecs since Unix epoch) + var nsecs = 0; // additional 100-nanosecond units to add to msecs + if (options.msecs != null) { + // Explicit time specified. Not that this turns off the internal logic + // around uuid count and clock sequence used insure uniqueness + msecs = (+options.msecs) + EPOCH_OFFSET; + nsecs = options.nsecs || 0; + } else { + // No time options - Follow the RFC logic (4.2.1.2) for maintaining + // clock seq and uuid count to help insure UUID uniqueness. + + msecs = new Date().getTime() + EPOCH_OFFSET; + + if (msecs < _last) { + // Clock regression - Per 4.2.1.2, increment clock seq + _clockSeq++; + _count = 0; + } else { + // Per 4.2.1.2, use a count of uuid's generated during the current + // clock cycle to simulate higher resolution clock + _count = (msecs == _last) ? _count + 1 : 0; + } + _last = msecs; + + // Per 4.2.1.2 If generator creates more than one id per uuid 100-ns + // interval, throw an error + // (Requires generating > 10M uuids/sec. While unlikely, it's not + // entirely inconceivable given the benchmark results we're getting) + if (_count >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + nsecs = _count; + } + + // Per 4.1.4, timestamp composition + + // time_low + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // time_mid + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // time_high_and_version + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // Clock sequence + var cs = options.clockseq != null ? options.clockseq : _clockSeq; + + // clock_seq_hi_and_reserved (Per 4.2.2 - include variant) + b[i++] = cs >>> 8 | 0x80; + + // clock_seq_low + b[i++] = cs & 0xff; + + // node + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // + // v4 UUID support + // + + /** See docs at https://github.com/broofa/node-uuid */ + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + if (typeof(options) == 'string') { + buf = options == 'binary' ? new BufferClass(16) : null; + options = null; + } + + var rnds = options && options.random || _rng(16); + // Per 4.4, set bits for version and clock_seq_hi_and_reserved + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // + // Export API + // + + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; uuid.parse = parse; uuid.unparse = unparse; uuid.BufferClass = BufferClass; @@ -74,7 +245,11 @@ if (typeof(module) != 'undefined') { module.exports = uuid; } else { - // In browser? Set as top-level function - this.uuid = uuid; + var _previousRoot = _global.uuid; + uuid.noConflict = function() { + _global.uuid = _previousRoot; + return uuid; + } + _global.uuid = uuid; } -})(); +}()); diff --git a/deps/npm/node_modules/nopt/README.md b/deps/npm/node_modules/nopt/README.md index eeddfd4fe..f290da8f4 100644 --- a/deps/npm/node_modules/nopt/README.md +++ b/deps/npm/node_modules/nopt/README.md @@ -121,7 +121,9 @@ interpreted as a number. You can also mix types and values, or multiple types, in a list. For instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. To define a new type, add it to `nopt.typeDefs`. Each item in that hash is an object with a `type` member and a `validate` method. The diff --git a/deps/npm/node_modules/nopt/examples/my-program.js b/deps/npm/node_modules/nopt/examples/my-program.js deleted file mode 100755 index 142447e18..000000000 --- a/deps/npm/node_modules/nopt/examples/my-program.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -//process.env.DEBUG_NOPT = 1 - -// my-program.js -var nopt = require("../lib/nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag", "true"] - , "g" : ["--flag"] - , "s" : "--flag" - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - -console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md index 315bdbaf4..c29d08666 100644 --- a/deps/npm/node_modules/request/README.md +++ b/deps/npm/node_modules/request/README.md @@ -93,6 +93,54 @@ http.createServer(function (req, resp) { You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. +## OAuth Signing + +```javascript +// Twitter OAuth +var qs = require('querystring') + , oauth = + { callback: 'http://mysite.com/callback/' + , consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + } + , url = 'https://api.twitter.com/oauth/request_token' + ; +request.post({url:url, oauth:oauth}, function (e, r, body) { + // Assume by some stretch of magic you aquired the verifier + var access_token = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: access_token.oauth_token + , verifier: VERIFIER + , token_secret: access_token.oauth_token_secret + } + , url = 'https://api.twitter.com/oauth/access_token' + ; + request.post({url:url, oauth:oauth}, function (e, r, body) { + var perm_token = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: perm_token.oauth_token + , token_secret: perm_token.oauth_token_secret + } + , url = 'https://api.twitter.com/1/users/show.json?' + , params = + { screen_name: perm_token.screen_name + , user_id: perm_token.user_id + } + ; + url += qs.stringify(params) + request.get({url:url, oauth:oauth, json:true}, function (e, r, user) { + console.log(user) + }) + }) +}) +``` + + + ### request(options, callback) The first argument can be either a url or an options object. The only required option is uri, all others are optional. @@ -111,7 +159,9 @@ The first argument can be either a url or an options object. The only required o * `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool. * `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request * `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri. +* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above. * `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option. +* `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section) The callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body buffer. @@ -163,6 +213,20 @@ Alias to normal request method for uniformity. ```javascript request.get(url) ``` +### request.cookie + +Function that creates a new cookie. + +```javascript +request.cookie('cookie_string_here') +``` +### request.jar + +Function that creates a new cookie jar. + +```javascript +request.jar() +``` ## Examples: @@ -191,3 +255,31 @@ request.get(url) } ) ``` +Cookies are enabled by default (so they can be used in subsequent requests). To disable cookies set jar to false (either in defaults or in the options sent). + +```javascript +var request = request.defaults({jar: false}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` + +If you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option: + +```javascript +var j = request.jar() +var request = request.defaults({jar:j}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` +OR + +```javascript +var j = request.jar() +var cookie = request.cookie('your_cookie_here') +j.add(cookie) +request({url: 'http://www.google.com', jar: j}, function () { + request('http://images.google.com') +}) +``` diff --git a/deps/npm/node_modules/request/main.js b/deps/npm/node_modules/request/main.js index e328e9b8b..d9502c1fd 100644 --- a/deps/npm/node_modules/request/main.js +++ b/deps/npm/node_modules/request/main.js @@ -20,6 +20,11 @@ var http = require('http') , stream = require('stream') , qs = require('querystring') , mimetypes = require('./mimetypes') + , oauth = require('./oauth') + , uuid = require('./uuid') + , Cookie = require('./vendor/cookie') + , CookieJar = require('./vendor/cookie/jar') + , cookieJar = new CookieJar ; try { @@ -135,6 +140,19 @@ Request.prototype.request = function () { setHost = true } + if (self.jar === false) { + // disable cookies + var cookies = false; + self._disableCookies = true; + } else if (self.jar) { + // fetch cookie from the user defined cookie jar + var cookies = self.jar.get({ url: self.uri.href }) + } else { + // fetch cookie from the global cookie jar + var cookies = cookieJar.get({ url: self.uri.href }) + } + if (cookies) {self.headers.Cookie = cookies} + if (!self.uri.pathname) {self.uri.pathname = '/'} if (!self.uri.port) { if (self.uri.protocol == 'http:') {self.uri.port = 80} @@ -162,6 +180,52 @@ Request.prototype.request = function () { if (self.onResponse) self.on('error', function (e) {self.onResponse(e)}) if (self.callback) self.on('error', function (e) {self.callback(e)}) + if (self.form) { + self.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8' + self.body = qs.stringify(self.form).toString('utf8') + } + + if (self.oauth) { + var form + if (self.headers['content-type'] && + self.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) === + 'application/x-www-form-urlencoded' + ) { + form = qs.parse(self.body) + } + if (self.uri.query) { + form = qs.parse(self.uri.query) + } + if (!form) form = {} + var oa = {} + for (i in form) oa[i] = form[i] + for (i in self.oauth) oa['oauth_'+i] = self.oauth[i] + if (!oa.oauth_version) oa.oauth_version = '1.0' + if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( (new Date()).getTime() / 1000 ).toString() + if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '') + + oa.oauth_signature_method = 'HMAC-SHA1' + + var consumer_secret = oa.oauth_consumer_secret + delete oa.oauth_consumer_secret + var token_secret = oa.oauth_token_secret + delete oa.oauth_token_secret + + var baseurl = self.uri.protocol + '//' + self.uri.host + self.uri.pathname + var signature = oauth.hmacsign(self.method, baseurl, oa, consumer_secret, token_secret) + + // oa.oauth_signature = signature + for (i in form) { + if ( i.slice(0, 'oauth_') in self.oauth) { + // skip + } else { + delete oa['oauth_'+i] + } + } + self.headers.authorization = + 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+encodeURIComponent(oa[i])+'"'}).join(',') + self.headers.authorization += ',oauth_signature="'+encodeURIComponent(signature)+'"' + } if (self.uri.auth && !self.headers.authorization) { self.headers.authorization = "Basic " + toBase64(self.uri.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':')) @@ -189,7 +253,7 @@ Request.prototype.request = function () { } } else if (self.multipart) { - self.body = '' + self.body = []; self.headers['content-type'] = 'multipart/related;boundary="frontier"' if (!self.multipart.forEach) throw new Error('Argument error, options.multipart.') @@ -197,21 +261,34 @@ Request.prototype.request = function () { var body = part.body if(!body) throw Error('Body attribute missing in multipart.') delete part.body - self.body += '--frontier\r\n' + var preamble = '--frontier\r\n' Object.keys(part).forEach(function(key){ - self.body += key + ': ' + part[key] + '\r\n' + preamble += key + ': ' + part[key] + '\r\n' }) - self.body += '\r\n' + body + '\r\n' + preamble += '\r\n'; + self.body.push(new Buffer(preamble)); + self.body.push(new Buffer(body)); + self.body.push(new Buffer('\r\n')); }) - self.body += '--frontier--' + self.body.push(new Buffer('--frontier--')); } if (self.body) { + var length = 0; if (!Buffer.isBuffer(self.body)) { - self.body = new Buffer(self.body) + if (Array.isArray(self.body)) { + for (var i = 0; i < self.body.length; i++) { + length += self.body[i].length; + } + } else { + self.body = new Buffer(self.body) + length = self.body.length; + } + } else { + length = self.body.length; } - if (self.body.length) { - self.headers['content-length'] = self.body.length + if (length) { + self.headers['content-length'] = length; } else { throw new Error('Argument error, options.body.') } @@ -358,6 +435,18 @@ Request.prototype.request = function () { response.body = JSON.parse(response.body) } catch (e) {} } + if (response.statusCode == 200 && response.headers['set-cookie'] && (!self._disableCookies)) { + response.headers['set-cookie'].forEach(function(cookie) { + if (self.jar) { + // custom defined jar + self.jar.add(new Cookie(cookie)); + } else { + // add to the global cookie jar if user don't define his own + cookieJar.add(new Cookie(cookie)); + } + }); + } + self.callback(null, response, response.body) }) } @@ -402,7 +491,13 @@ Request.prototype.request = function () { process.nextTick(function () { if (self.body) { - self.write(self.body) + if (Array.isArray(self.body)) { + self.body.forEach(function(part) { + self.write(part); + }); + } else { + self.write(self.body) + } self.end() } else if (self.requestBodyStream) { console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") @@ -477,6 +572,8 @@ request.defaults = function (options) { de.put = def(request.put) de.head = def(request.head) de.del = def(request.del) + de.cookie = def(request.cookie) + de.jar = def(request.jar) return de } @@ -504,3 +601,10 @@ request.del = function (options, callback) { options.method = 'DELETE' return request(options, callback) } +request.jar = function () { + return new CookieJar +} +request.cookie = function (str) { + if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param") + return new Cookie(str) +} diff --git a/deps/npm/node_modules/request/oauth.js b/deps/npm/node_modules/request/oauth.js new file mode 100644 index 000000000..e49c16e74 --- /dev/null +++ b/deps/npm/node_modules/request/oauth.js @@ -0,0 +1,23 @@ +var crypto = require('crypto') + , qs = require('querystring') + ; + +function sha1 (key, body) { + return crypto.createHmac('sha1', key).update(body).digest('base64') +} + +function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret, body) { + // adapted from https://dev.twitter.com/docs/auth/oauth + var base = + httpMethod + "&" + + encodeURIComponent( base_uri ) + "&" + + Object.keys(params).sort().map(function (i) { + // big WTF here with the escape + encoding but it's what twitter wants + return encodeURIComponent(qs.escape(i)) + "%3D" + encodeURIComponent(qs.escape(params[i])) + }).join("%26") + var key = consumer_secret + '&' + if (token_secret) key += token_secret + return sha1(key, base) +} + +exports.hmacsign = hmacsign \ No newline at end of file diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json index 2d98aa251..a8bed6348 100644 --- a/deps/npm/node_modules/request/package.json +++ b/deps/npm/node_modules/request/package.json @@ -1,7 +1,7 @@ { "name" : "request" , "description" : "Simplified HTTP request client." , "tags" : ["http", "simple", "util", "utility"] -, "version" : "2.1.1" +, "version" : "2.2.0" , "author" : "Mikeal Rogers " , "repository" : { "type" : "git" diff --git a/deps/npm/node_modules/request/tests/googledoodle.png b/deps/npm/node_modules/request/tests/googledoodle.png deleted file mode 100644 index f80c9c52d3c507996535a19ee0bcfe3821de322d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38510 zcmbTdbx>Tv*DX4@1RI>-?lQRh;O>J3cXtmG2<{Nv-Gaj)!C~;=9^56kgvjIf-COs* z`_+3@uipNr&#CTO-Bo9w?%r#!{crW(20#V?_y67C|Fq9LQ8BOoHd!M}SOAc+G2 zAj7>)0*`=qJHYpaOC6sL}92G*SfIn&^bI(&p}TJYgwBS{5F}^fKY8 z#Su*dEpG_q|A9vN-}rCSz`_3q0Tlu5ty>NVc!P&WKte=DMMOe+8~2|TAtC{hsc}J4 zD0rIY?ljzCDX93;#Z3bQv~TF)sdIEZo+X5qyVo}|+NI5dpVI!V12Eo}1`k940we%G z_hnUqcD*yl3?kMW4bGdQ<%S+Nq>-S=Nrt}4WwkjGq>OTY%!B=CJ8w#IenptLVpc_V z1`f4~Xi@?&sD@*|R)6y)`SB0wheqC}eNj-v9bcmL2^X6*MoZm{esqIwe2z;JRYD?H zR`$jhNv|+C@Vp5MD0Bx=i}7t@UfDUk|38gA#%a#oGvFUC_!A^7VE7@Eu7 zDy*la? z46rH)2FlGnV3n*)<-E8exU`^3QBJh~j)^!{)iNuDXE4+=EIIn_*NRI0z|;&@DLxnl z+|_CRDWB5}X@042CH!UDJgH(rDj%2suACjAniipk{VR5Fexn+!oRl=fVu^c_Azb}S zY-3Y2cN{j_9osMJo&bB|j}L0aTK@pGdMANi7YzZUb3A&(6vt*lb5pCgKK}rqxhS|J zW74A%DRgbR8s)MaSXBY`$gbvx%2lLRaLE$BRFaVZVXwhVdE=WLTFYKD0v z6H}C{+FOqTAxB%WH&WLLnM1E(u6{)FtCn!}P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yt8%i_Qt5;7Su((Hdf)x_J?z5zy5;JHcC?khCPF@%bhEj zLLt-@-j}G-E@G7H*TYQ+*(DuvTYH@fZO?Ri2B5KYBBAwCiSF{r=aXw+lg*vPi{sB> zUf08ki?;$9NPPt*)?=F-TkU4qc&@~Hq=ZAwc!L8fJgOsQm9Jz=PSU@VI1EMh-TVa8VS_{$IUS8&F)atk`^n3!-`R*%ac z>LIL(qT*`{AX1?dhL1{sj;u0{lF6iR2%7KYD{Cj0CztmJS)>|mXJf}*S-1gLFJa=- z<n`K7Bm>;=~qxqH5ANGM_`Li*J{i_gQ?z+;6$!h;qu1E~UcnU%o!IDw-0i6koN( zj`A;Rt1{dTG!fJ6&O9?^`KY3f*%06Np0=E4pL}S_4!z!b_X2N`Z;q)RvO@73{aLO5 o*^l@KiLVu39we%YkU9jx8~%ww|L*+%f9}89cYmM6li!Q~0sWHz(EtDd diff --git a/deps/npm/node_modules/request/tests/run.sh b/deps/npm/node_modules/request/tests/run.sh deleted file mode 100755 index 57d0f6496..000000000 --- a/deps/npm/node_modules/request/tests/run.sh +++ /dev/null @@ -1,6 +0,0 @@ -FAILS=0 -for i in tests/test-*.js; do - echo $i - node $i || let FAILS++ -done -exit $FAILS diff --git a/deps/npm/node_modules/request/tests/server.js b/deps/npm/node_modules/request/tests/server.js deleted file mode 100644 index bad1e5030..000000000 --- a/deps/npm/node_modules/request/tests/server.js +++ /dev/null @@ -1,57 +0,0 @@ -var http = require('http') - , events = require('events') - , stream = require('stream') - , assert = require('assert') - ; - -exports.createServer = function (port) { - port = port || 6767 - var s = http.createServer(function (req, resp) { - s.emit(req.url, req, resp); - }) - s.port = port - s.url = 'http://localhost:'+port - return s; -} - -exports.createPostStream = function (text) { - var postStream = new stream.Stream(); - postStream.writeable = true; - postStream.readable = true; - setTimeout(function () {postStream.emit('data', new Buffer(text)); postStream.emit('end')}, 0); - return postStream; -} -exports.createPostValidator = function (text) { - var l = function (req, resp) { - var r = ''; - req.on('data', function (chunk) {r += chunk}) - req.on('end', function () { - if (r !== text) console.log(r, text); - assert.equal(r, text) - resp.writeHead(200, {'content-type':'text/plain'}) - resp.write('OK') - resp.end() - }) - } - return l; -} -exports.createGetResponse = function (text, contentType) { - var l = function (req, resp) { - contentType = contentType || 'text/plain' - resp.writeHead(200, {'content-type':contentType}) - resp.write(text) - resp.end() - } - return l; -} -exports.createChunkResponse = function (chunks, contentType) { - var l = function (req, resp) { - contentType = contentType || 'text/plain' - resp.writeHead(200, {'content-type':contentType}) - chunks.forEach(function (chunk) { - resp.write(chunk) - }) - resp.end() - } - return l; -} diff --git a/deps/npm/node_modules/request/tests/test-body.js b/deps/npm/node_modules/request/tests/test-body.js deleted file mode 100644 index 18ad5b9c6..000000000 --- a/deps/npm/node_modules/request/tests/test-body.js +++ /dev/null @@ -1,90 +0,0 @@ -var server = require('./server') - , events = require('events') - , stream = require('stream') - , assert = require('assert') - , request = require('../main.js') - ; - -var s = server.createServer(); - -var tests = - { testGet : - { resp : server.createGetResponse("TESTING!") - , expectBody: "TESTING!" - } - , testGetChunkBreak : - { resp : server.createChunkResponse( - [ new Buffer([239]) - , new Buffer([163]) - , new Buffer([191]) - , new Buffer([206]) - , new Buffer([169]) - , new Buffer([226]) - , new Buffer([152]) - , new Buffer([131]) - ]) - , expectBody: "Ω☃" - } - , testGetJSON : - { resp : server.createGetResponse('{"test":true}', 'application/json') - , json : true - , expectBody: {"test":true} - } - , testPutString : - { resp : server.createPostValidator("PUTTINGDATA") - , method : "PUT" - , body : "PUTTINGDATA" - } - , testPutBuffer : - { resp : server.createPostValidator("PUTTINGDATA") - , method : "PUT" - , body : new Buffer("PUTTINGDATA") - } - , testPutJSON : - { resp : server.createPostValidator(JSON.stringify({foo: 'bar'})) - , method: "PUT" - , json: {foo: 'bar'} - } - , testPutMultipart : - { resp: server.createPostValidator( - '--frontier\r\n' + - 'content-type: text/html\r\n' + - '\r\n' + - 'Oh hi.' + - '\r\n--frontier\r\n\r\n' + - 'Oh hi.' + - '\r\n--frontier--' - ) - , method: "PUT" - , multipart: - [ {'content-type': 'text/html', 'body': 'Oh hi.'} - , {'body': 'Oh hi.'} - ] - } - } - -s.listen(s.port, function () { - - var counter = 0 - - for (i in tests) { - (function () { - var test = tests[i] - s.on('/'+i, test.resp) - test.uri = s.url + '/' + i - request(test, function (err, resp, body) { - if (err) throw err - if (test.expectBody) { - assert.deepEqual(test.expectBody, body) - } - counter = counter - 1; - if (counter === 0) { - console.log(Object.keys(tests).length+" tests passed.") - s.close() - } - }) - counter++ - })() - } -}) - diff --git a/deps/npm/node_modules/request/tests/test-errors.js b/deps/npm/node_modules/request/tests/test-errors.js deleted file mode 100644 index e5df87b56..000000000 --- a/deps/npm/node_modules/request/tests/test-errors.js +++ /dev/null @@ -1,30 +0,0 @@ -var server = require('./server') - , events = require('events') - , assert = require('assert') - , request = require('../main.js') - ; - -var local = 'http://localhost:8888/asdf' - -try { - request({uri:local, body:{}}) - assert.fail("Should have throw") -} catch(e) { - assert.equal(e.message, 'Argument error, options.body.') -} - -try { - request({uri:local, multipart: 'foo'}) - assert.fail("Should have throw") -} catch(e) { - assert.equal(e.message, 'Argument error, options.multipart.') -} - -try { - request({uri:local, multipart: [{}]}) - assert.fail("Should have throw") -} catch(e) { - assert.equal(e.message, 'Body attribute missing in multipart.') -} - -console.log("All tests passed.") \ No newline at end of file diff --git a/deps/npm/node_modules/request/tests/test-pipes.js b/deps/npm/node_modules/request/tests/test-pipes.js deleted file mode 100644 index 0774647a1..000000000 --- a/deps/npm/node_modules/request/tests/test-pipes.js +++ /dev/null @@ -1,167 +0,0 @@ -var server = require('./server') - , events = require('events') - , stream = require('stream') - , assert = require('assert') - , fs = require('fs') - , request = require('../main.js') - , path = require('path') - , util = require('util') - ; - -var s = server.createServer(3453); - -function ValidationStream(str) { - this.str = str - this.buf = '' - this.on('data', function (data) { - this.buf += data - }) - this.on('end', function () { - assert.equal(this.str, this.buf) - }) - this.writable = true -} -util.inherits(ValidationStream, stream.Stream) -ValidationStream.prototype.write = function (chunk) { - this.emit('data', chunk) -} -ValidationStream.prototype.end = function (chunk) { - if (chunk) emit('data', chunk) - this.emit('end') -} - -s.listen(s.port, function () { - counter = 0; - - var check = function () { - counter = counter - 1 - if (counter === 0) { - console.log('All tests passed.') - setTimeout(function () { - process.exit(); - }, 500) - } - } - - // Test pipeing to a request object - s.once('/push', server.createPostValidator("mydata")); - - var mydata = new stream.Stream(); - mydata.readable = true - - counter++ - var r1 = request.put({url:'http://localhost:3453/push'}, function () { - check(); - }) - mydata.pipe(r1) - - mydata.emit('data', 'mydata'); - mydata.emit('end'); - - - // Test pipeing from a request object. - s.once('/pull', server.createGetResponse("mypulldata")); - - var mypulldata = new stream.Stream(); - mypulldata.writable = true - - counter++ - request({url:'http://localhost:3453/pull'}).pipe(mypulldata) - - var d = ''; - - mypulldata.write = function (chunk) { - d += chunk; - } - mypulldata.end = function () { - assert.equal(d, 'mypulldata'); - check(); - }; - - - s.on('/cat', function (req, resp) { - if (req.method === "GET") { - resp.writeHead(200, {'content-type':'text/plain-test', 'content-length':4}); - resp.end('asdf') - } else if (req.method === "PUT") { - assert.equal(req.headers['content-type'], 'text/plain-test'); - assert.equal(req.headers['content-length'], 4) - var validate = ''; - - req.on('data', function (chunk) {validate += chunk}) - req.on('end', function () { - resp.writeHead(201); - resp.end(); - assert.equal(validate, 'asdf'); - check(); - }) - } - }) - s.on('/pushjs', function (req, resp) { - if (req.method === "PUT") { - assert.equal(req.headers['content-type'], 'text/javascript'); - check(); - } - }) - s.on('/catresp', function (req, resp) { - request.get('http://localhost:3453/cat').pipe(resp) - }) - s.on('/doodle', function (req, resp) { - if (req.headers['x-oneline-proxy']) { - resp.setHeader('x-oneline-proxy', 'yup') - } - resp.writeHead('200', {'content-type':'image/png'}) - fs.createReadStream(path.join(__dirname, 'googledoodle.png')).pipe(resp) - }) - s.on('/onelineproxy', function (req, resp) { - var x = request('http://localhost:3453/doodle') - req.pipe(x) - x.pipe(resp) - }) - - counter++ - fs.createReadStream(__filename).pipe(request.put('http://localhost:3453/pushjs')) - - counter++ - request.get('http://localhost:3453/cat').pipe(request.put('http://localhost:3453/cat')) - - counter++ - request.get('http://localhost:3453/catresp', function (e, resp, body) { - assert.equal(resp.headers['content-type'], 'text/plain-test'); - assert.equal(resp.headers['content-length'], 4) - check(); - }) - - var doodleWrite = fs.createWriteStream(path.join(__dirname, 'test.png')) - - counter++ - request.get('http://localhost:3453/doodle').pipe(doodleWrite) - - doodleWrite.on('close', function () { - assert.deepEqual(fs.readFileSync(path.join(__dirname, 'googledoodle.png')), fs.readFileSync(path.join(__dirname, 'test.png'))) - check() - }) - - process.on('exit', function () { - fs.unlinkSync(path.join(__dirname, 'test.png')) - }) - - counter++ - request.get({uri:'http://localhost:3453/onelineproxy', headers:{'x-oneline-proxy':'nope'}}, function (err, resp, body) { - assert.equal(resp.headers['x-oneline-proxy'], 'yup') - check() - }) - - s.on('/afterresponse', function (req, resp) { - resp.write('d') - resp.end() - }) - - counter++ - var afterresp = request.post('http://localhost:3453/afterresponse').on('response', function () { - var v = new ValidationStream('d') - afterresp.pipe(v) - v.on('end', check) - }) - -}) diff --git a/deps/npm/node_modules/request/tests/test-timeout.js b/deps/npm/node_modules/request/tests/test-timeout.js deleted file mode 100644 index 673f8ad86..000000000 --- a/deps/npm/node_modules/request/tests/test-timeout.js +++ /dev/null @@ -1,87 +0,0 @@ -var server = require('./server') - , events = require('events') - , stream = require('stream') - , assert = require('assert') - , request = require('../main.js') - ; - -var s = server.createServer(); -var expectedBody = "waited"; -var remainingTests = 5; - -s.listen(s.port, function () { - // Request that waits for 200ms - s.on('/timeout', function (req, resp) { - setTimeout(function(){ - resp.writeHead(200, {'content-type':'text/plain'}) - resp.write(expectedBody) - resp.end() - }, 200); - }); - - // Scenario that should timeout - var shouldTimeout = { - url: s.url + "/timeout", - timeout:100 - } - - - request(shouldTimeout, function (err, resp, body) { - assert.equal(err.code, "ETIMEDOUT"); - checkDone(); - }) - - - // Scenario that shouldn't timeout - var shouldntTimeout = { - url: s.url + "/timeout", - timeout:300 - } - - request(shouldntTimeout, function (err, resp, body) { - assert.equal(err, null); - assert.equal(expectedBody, body) - checkDone(); - }) - - // Scenario with no timeout set, so shouldn't timeout - var noTimeout = { - url: s.url + "/timeout" - } - - request(noTimeout, function (err, resp, body) { - assert.equal(err); - assert.equal(expectedBody, body) - checkDone(); - }) - - // Scenario with a negative timeout value, should be treated a zero or the minimum delay - var negativeTimeout = { - url: s.url + "/timeout", - timeout:-1000 - } - - request(negativeTimeout, function (err, resp, body) { - assert.equal(err.code, "ETIMEDOUT"); - checkDone(); - }) - - // Scenario with a float timeout value, should be rounded by setTimeout anyway - var floatTimeout = { - url: s.url + "/timeout", - timeout: 100.76 - } - - request(floatTimeout, function (err, resp, body) { - assert.equal(err.code, "ETIMEDOUT"); - checkDone(); - }) - - function checkDone() { - if(--remainingTests == 0) { - s.close(); - console.log("All tests passed."); - } - } -}) - diff --git a/deps/npm/node_modules/request/uuid.js b/deps/npm/node_modules/request/uuid.js new file mode 100644 index 000000000..1d83bd50a --- /dev/null +++ b/deps/npm/node_modules/request/uuid.js @@ -0,0 +1,19 @@ +module.exports = function () { + var s = [], itoh = '0123456789ABCDEF'; + + // Make array of random hex digits. The UUID only has 32 digits in it, but we + // allocate an extra items to make room for the '-'s we'll be inserting. + for (var i = 0; i <36; i++) s[i] = Math.floor(Math.random()*0x10); + + // Conform to RFC-4122, section 4.4 + s[14] = 4; // Set 4 high bits of time_high field to version + s[19] = (s[19] & 0x3) | 0x8; // Specify 2 high bits of clock sequence + + // Convert to hex chars + for (var i = 0; i <36; i++) s[i] = itoh[s[i]]; + + // Insert '-'s + s[8] = s[13] = s[18] = s[23] = '-'; + + return s.join(''); +} diff --git a/deps/npm/node_modules/request/vendor/cookie/index.js b/deps/npm/node_modules/request/vendor/cookie/index.js new file mode 100644 index 000000000..4ba20d6af --- /dev/null +++ b/deps/npm/node_modules/request/vendor/cookie/index.js @@ -0,0 +1,57 @@ +/*! + * Tobi - Cookie + * Copyright(c) 2010 LearnBoost + * MIT Licensed + */ + +/** + * Module dependencies. + */ + +var url = require('url'); + +/** + * Initialize a new `Cookie` with the given cookie `str` and `req`. + * + * @param {String} str + * @param {IncomingRequest} req + * @api private + */ + +var Cookie = exports = module.exports = function Cookie(str, req) { + this.str = str; + + // First key is the name + this.name = str.substr(0, str.indexOf('=')); + + // Map the key/val pairs + str.split(/ *; */).reduce(function(obj, pair){ + pair = pair.split(/ *= */); + obj[pair[0]] = pair[1] || true; + return obj; + }, this); + + // Assign value + this.value = this[this.name]; + + // Expires + this.expires = this.expires + ? new Date(this.expires) + : Infinity; + + // Default or trim path + this.path = this.path + ? this.path.trim() + : url.parse(req.url).pathname; +}; + +/** + * Return the original cookie string. + * + * @return {String} + * @api public + */ + +Cookie.prototype.toString = function(){ + return this.str; +}; diff --git a/deps/npm/node_modules/request/vendor/cookie/jar.js b/deps/npm/node_modules/request/vendor/cookie/jar.js new file mode 100644 index 000000000..34920e062 --- /dev/null +++ b/deps/npm/node_modules/request/vendor/cookie/jar.js @@ -0,0 +1,72 @@ +/*! +* Tobi - CookieJar +* Copyright(c) 2010 LearnBoost +* MIT Licensed +*/ + +/** +* Module dependencies. +*/ + +var url = require('url'); + +/** +* Initialize a new `CookieJar`. +* +* @api private +*/ + +var CookieJar = exports = module.exports = function CookieJar() { + this.cookies = []; +}; + +/** +* Add the given `cookie` to the jar. +* +* @param {Cookie} cookie +* @api private +*/ + +CookieJar.prototype.add = function(cookie){ + this.cookies = this.cookies.filter(function(c){ + // Avoid duplication (same path, same name) + return !(c.name == cookie.name && c.path == cookie.path); + }); + this.cookies.push(cookie); +}; + +/** +* Get cookies for the given `req`. +* +* @param {IncomingRequest} req +* @return {Array} +* @api private +*/ + +CookieJar.prototype.get = function(req){ + var path = url.parse(req.url).pathname + , now = new Date + , specificity = {}; + return this.cookies.filter(function(cookie){ + if (0 == path.indexOf(cookie.path) && now < cookie.expires + && cookie.path.length > (specificity[cookie.name] || 0)) + return specificity[cookie.name] = cookie.path.length; + }); +}; + +/** +* Return Cookie string for the given `req`. +* +* @param {IncomingRequest} req +* @return {String} +* @api private +*/ + +CookieJar.prototype.cookieString = function(req){ + var cookies = this.get(req); + if (cookies.length) { + return cookies.map(function(cookie){ + return cookie.name + '=' + cookie.value; + }).join('; '); + } +}; diff --git a/deps/npm/node_modules/rimraf/test/run.sh b/deps/npm/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163b..000000000 --- a/deps/npm/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/deps/npm/node_modules/rimraf/test/setup.sh b/deps/npm/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e6316..000000000 --- a/deps/npm/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/deps/npm/node_modules/rimraf/test/test-async.js b/deps/npm/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7be..000000000 --- a/deps/npm/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/deps/npm/node_modules/rimraf/test/test-fiber.js b/deps/npm/node_modules/rimraf/test/test-fiber.js deleted file mode 100644 index 20d61a109..000000000 --- a/deps/npm/node_modules/rimraf/test/test-fiber.js +++ /dev/null @@ -1,15 +0,0 @@ -var rimraf - , path = require("path") - -try { - rimraf = require("../fiber") -} catch (er) { - console.error("skipping fiber test") -} - -if (rimraf) { - Fiber(function () { - rimraf(path.join(__dirname, "target")).wait() - }).run() -} - diff --git a/deps/npm/node_modules/rimraf/test/test-sync.js b/deps/npm/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f1047..000000000 --- a/deps/npm/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/deps/npm/node_modules/semver/test.js b/deps/npm/node_modules/semver/test.js deleted file mode 100644 index c28fe3970..000000000 --- a/deps/npm/node_modules/semver/test.js +++ /dev/null @@ -1,397 +0,0 @@ -var tap = require("tap") - , test = tap.test - , semver = require("./semver.js") - , eq = semver.eq - , gt = semver.gt - , lt = semver.lt - , neq = semver.neq - , cmp = semver.cmp - , gte = semver.gte - , lte = semver.lte - , satisfies = semver.satisfies - , validRange = semver.validRange - , inc = semver.inc - , replaceStars = semver.replaceStars - , toComparators = semver.toComparators - -tap.plan(8) - -test("\ncomparison tests", function (t) { -; [ ["0.0.0", "0.0.0foo"] - , ["0.0.1", "0.0.0"] - , ["1.0.0", "0.9.9"] - , ["0.10.0", "0.9.0"] - , ["0.99.0", "0.10.0"] - , ["2.0.0", "1.2.3"] - , ["v0.0.0", "0.0.0foo"] - , ["v0.0.1", "0.0.0"] - , ["v1.0.0", "0.9.9"] - , ["v0.10.0", "0.9.0"] - , ["v0.99.0", "0.10.0"] - , ["v2.0.0", "1.2.3"] - , ["0.0.0", "v0.0.0foo"] - , ["0.0.1", "v0.0.0"] - , ["1.0.0", "v0.9.9"] - , ["0.10.0", "v0.9.0"] - , ["0.99.0", "v0.10.0"] - , ["2.0.0", "v1.2.3"] - , ["1.2.3", "1.2.3-asdf"] - , ["1.2.3-4", "1.2.3"] - , ["1.2.3-4-foo", "1.2.3"] - , ["1.2.3-5", "1.2.3-5-foo"] - , ["1.2.3-5", "1.2.3-4"] - , ["1.2.3-5-foo", "1.2.3-5-Foo"] - ].forEach(function (v) { - var v0 = v[0] - , v1 = v[1] - t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')") - t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')") - t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')") - t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')") - t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')") - t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')") - t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')") - t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')") - t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')") - t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')") - t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')") - }) - t.end() -}) - -test("\nequality tests", function (t) { -; [ ["1.2.3", "v1.2.3"] - , ["1.2.3", "=1.2.3"] - , ["1.2.3", "v 1.2.3"] - , ["1.2.3", "= 1.2.3"] - , ["1.2.3", " v1.2.3"] - , ["1.2.3", " =1.2.3"] - , ["1.2.3", " v 1.2.3"] - , ["1.2.3", " = 1.2.3"] - , ["1.2.3-0", "v1.2.3-0"] - , ["1.2.3-0", "=1.2.3-0"] - , ["1.2.3-0", "v 1.2.3-0"] - , ["1.2.3-0", "= 1.2.3-0"] - , ["1.2.3-0", " v1.2.3-0"] - , ["1.2.3-0", " =1.2.3-0"] - , ["1.2.3-0", " v 1.2.3-0"] - , ["1.2.3-0", " = 1.2.3-0"] - , ["1.2.3-01", "v1.2.3-1"] - , ["1.2.3-01", "=1.2.3-1"] - , ["1.2.3-01", "v 1.2.3-1"] - , ["1.2.3-01", "= 1.2.3-1"] - , ["1.2.3-01", " v1.2.3-1"] - , ["1.2.3-01", " =1.2.3-1"] - , ["1.2.3-01", " v 1.2.3-1"] - , ["1.2.3-01", " = 1.2.3-1"] - , ["1.2.3beta", "v1.2.3beta"] - , ["1.2.3beta", "=1.2.3beta"] - , ["1.2.3beta", "v 1.2.3beta"] - , ["1.2.3beta", "= 1.2.3beta"] - , ["1.2.3beta", " v1.2.3beta"] - , ["1.2.3beta", " =1.2.3beta"] - , ["1.2.3beta", " v 1.2.3beta"] - , ["1.2.3beta", " = 1.2.3beta"] - ].forEach(function (v) { - var v0 = v[0] - , v1 = v[1] - t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')") - t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')") - t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")") - t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")") - t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")") - t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")") - t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')") - t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')") - t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')") - t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')") - }) - t.end() -}) - - -test("\nrange tests", function (t) { -; [ ["1.0.0 - 2.0.0", "1.2.3"] - , ["1.0.0", "1.0.0"] - , [">=*", "0.2.4"] - , ["", "1.0.0"] - , ["*", "1.2.3"] - , ["*", "v1.2.3-foo"] - , [">=1.0.0", "1.0.0"] - , [">=1.0.0", "1.0.1"] - , [">=1.0.0", "1.1.0"] - , [">1.0.0", "1.0.1"] - , [">1.0.0", "1.1.0"] - , ["<=2.0.0", "2.0.0"] - , ["<=2.0.0", "1.9999.9999"] - , ["<=2.0.0", "0.2.9"] - , ["<2.0.0", "1.9999.9999"] - , ["<2.0.0", "0.2.9"] - , [">= 1.0.0", "1.0.0"] - , [">= 1.0.0", "1.0.1"] - , [">= 1.0.0", "1.1.0"] - , ["> 1.0.0", "1.0.1"] - , ["> 1.0.0", "1.1.0"] - , ["<= 2.0.0", "2.0.0"] - , ["<= 2.0.0", "1.9999.9999"] - , ["<= 2.0.0", "0.2.9"] - , ["< 2.0.0", "1.9999.9999"] - , ["<\t2.0.0", "0.2.9"] - , [">=0.1.97", "v0.1.97"] - , [">=0.1.97", "0.1.97"] - , ["0.1.20 || 1.2.4", "1.2.4"] - , [">=0.2.3 || <0.0.1", "0.0.0"] - , [">=0.2.3 || <0.0.1", "0.2.3"] - , [">=0.2.3 || <0.0.1", "0.2.4"] - , ["||", "1.3.4"] - , ["2.x.x", "2.1.3"] - , ["1.2.x", "1.2.3"] - , ["1.2.x || 2.x", "2.1.3"] - , ["1.2.x || 2.x", "1.2.3"] - , ["x", "1.2.3"] - , ["2.*.*", "2.1.3"] - , ["1.2.*", "1.2.3"] - , ["1.2.* || 2.*", "2.1.3"] - , ["1.2.* || 2.*", "1.2.3"] - , ["*", "1.2.3"] - , ["2", "2.1.2"] - , ["2.3", "2.3.1"] - , ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0 - , ["~2.4", "2.4.5"] - , ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0 - , ["~1", "1.2.3"] // >=1.0.0 <2.0.0 - , ["~>1", "1.2.3"] - , ["~> 1", "1.2.3"] - , ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0 - , ["~ 1.0", "1.0.2"] - , [">=1", "1.0.0"] - , [">= 1", "1.0.0"] - , ["<1.2", "1.1.1"] - , ["< 1.2", "1.1.1"] - , ["1", "1.0.0beta"] - , ["~v0.5.4-pre", "0.5.5"] - , ["~v0.5.4-pre", "0.5.4"] - ].forEach(function (v) { - t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1]) - }) - t.end() -}) - -test("\nnegative range tests", function (t) { -; [ ["1.0.0 - 2.0.0", "2.2.3"] - , ["1.0.0", "1.0.1"] - , [">=1.0.0", "0.0.0"] - , [">=1.0.0", "0.0.1"] - , [">=1.0.0", "0.1.0"] - , [">1.0.0", "0.0.1"] - , [">1.0.0", "0.1.0"] - , ["<=2.0.0", "3.0.0"] - , ["<=2.0.0", "2.9999.9999"] - , ["<=2.0.0", "2.2.9"] - , ["<2.0.0", "2.9999.9999"] - , ["<2.0.0", "2.2.9"] - , [">=0.1.97", "v0.1.93"] - , [">=0.1.97", "0.1.93"] - , ["0.1.20 || 1.2.4", "1.2.3"] - , [">=0.2.3 || <0.0.1", "0.0.3"] - , [">=0.2.3 || <0.0.1", "0.2.2"] - , ["2.x.x", "1.1.3"] - , ["2.x.x", "3.1.3"] - , ["1.2.x", "1.3.3"] - , ["1.2.x || 2.x", "3.1.3"] - , ["1.2.x || 2.x", "1.1.3"] - , ["2.*.*", "1.1.3"] - , ["2.*.*", "3.1.3"] - , ["1.2.*", "1.3.3"] - , ["1.2.* || 2.*", "3.1.3"] - , ["1.2.* || 2.*", "1.1.3"] - , ["2", "1.1.2"] - , ["2.3", "2.4.1"] - , ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0 - , ["~2.4", "2.3.9"] - , ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0 - , ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0 - , ["~1", "0.2.3"] // >=1.0.0 <2.0.0 - , ["~>1", "2.2.3"] - , ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0 - , ["<1", "1.0.0"] - , [">=1.2", "1.1.1"] - , ["1", "2.0.0beta"] - , ["~v0.5.4-beta", "0.5.4-alpha"] - , ["<1", "1.0.0beta"] - , ["< 1", "1.0.0beta"] - ].forEach(function (v) { - t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1]) - }) - t.end() -}) - -test("\nincrement versions test", function (t) { -; [ [ "1.2.3", "major", "2.0.0" ] - , [ "1.2.3", "minor", "1.3.0" ] - , [ "1.2.3", "patch", "1.2.4" ] - , [ "1.2.3", "build", "1.2.3-1" ] - , [ "1.2.3-4", "build", "1.2.3-5" ] - , [ "1.2.3tag", "major", "2.0.0" ] - , [ "1.2.3-tag", "major", "2.0.0" ] - , [ "1.2.3tag", "build", "1.2.3-1" ] - , [ "1.2.3-tag", "build", "1.2.3-1" ] - , [ "1.2.3-4-tag", "build", "1.2.3-5" ] - , [ "1.2.3-4tag", "build", "1.2.3-5" ] - , [ "1.2.3", "fake", null ] - , [ "fake", "major", null ] - ].forEach(function (v) { - t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2]) - }) - - t.end() -}) - -test("\nreplace stars test", function (t) { -; [ [ "", "" ] - , [ "*", "" ] - , [ "> *", "" ] - , [ "<*", "" ] - , [ " >= *", "" ] - , [ "* || 1.2.3", " || 1.2.3" ] - ].forEach(function (v) { - t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1]) - }) - - t.end() -}) - -test("\nvalid range test", function (t) { -; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"] - , ["1.0.0", "1.0.0"] - , [">=*", ""] - , ["", ""] - , ["*", ""] - , ["*", ""] - , [">=1.0.0", ">=1.0.0"] - , [">1.0.0", ">1.0.0"] - , ["<=2.0.0", "<=2.0.0"] - , ["1", ">=1.0.0- <2.0.0-"] - , ["<=2.0.0", "<=2.0.0"] - , ["<=2.0.0", "<=2.0.0"] - , ["<2.0.0", "<2.0.0"] - , ["<2.0.0", "<2.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , ["> 1.0.0", ">1.0.0"] - , ["> 1.0.0", ">1.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["< 2.0.0", "<2.0.0"] - , ["< 2.0.0", "<2.0.0"] - , [">=0.1.97", ">=0.1.97"] - , [">=0.1.97", ">=0.1.97"] - , ["0.1.20 || 1.2.4", "0.1.20||1.2.4"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , ["||", "||"] - , ["2.x.x", ">=2.0.0- <3.0.0-"] - , ["1.2.x", ">=1.2.0- <1.3.0-"] - , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"] - , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"] - , ["x", ""] - , ["2.*.*", null] - , ["1.2.*", null] - , ["1.2.* || 2.*", null] - , ["1.2.* || 2.*", null] - , ["*", ""] - , ["2", ">=2.0.0- <3.0.0-"] - , ["2.3", ">=2.3.0- <2.4.0-"] - , ["~2.4", ">=2.4.0- <2.5.0-"] - , ["~2.4", ">=2.4.0- <2.5.0-"] - , ["~>3.2.1", ">=3.2.1- <3.3.0-"] - , ["~1", ">=1.0.0- <2.0.0-"] - , ["~>1", ">=1.0.0- <2.0.0-"] - , ["~> 1", ">=1.0.0- <2.0.0-"] - , ["~1.0", ">=1.0.0- <1.1.0-"] - , ["~ 1.0", ">=1.0.0- <1.1.0-"] - , ["<1", "<1.0.0-"] - , ["< 1", "<1.0.0-"] - , [">=1", ">=1.0.0-"] - , [">= 1", ">=1.0.0-"] - , ["<1.2", "<1.2.0-"] - , ["< 1.2", "<1.2.0-"] - , ["1", ">=1.0.0- <2.0.0-"] - ].forEach(function (v) { - t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1]) - }) - - t.end() -}) - -test("\ncomparators test", function (t) { -; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ] - , ["1.0.0", [["1.0.0"]] ] - , [">=*", [[">=0.0.0-"]] ] - , ["", [[""]]] - , ["*", [[""]] ] - , ["*", [[""]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">1.0.0", [[">1.0.0"]] ] - , [">1.0.0", [[">1.0.0"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["<2.0.0", [["<2.0.0"]] ] - , ["<2.0.0", [["<2.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , ["> 1.0.0", [[">1.0.0"]] ] - , ["> 1.0.0", [[">1.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["< 2.0.0", [["<2.0.0"]] ] - , ["<\t2.0.0", [["<2.0.0"]] ] - , [">=0.1.97", [[">=0.1.97"]] ] - , [">=0.1.97", [[">=0.1.97"]] ] - , ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , ["||", [[""], [""]] ] - , ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ] - , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["x", [[""]] ] - , ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ] - , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["*", [[""]] ] - , ["2", [[">=2.0.0-", "<3.0.0-"]] ] - , ["2.3", [[">=2.3.0-", "<2.4.0-"]] ] - , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ] - , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ] - , ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ] - , ["~1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~>1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ] - , ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ] - , ["<1", [["<1.0.0-"]] ] - , ["< 1", [["<1.0.0-"]] ] - , [">=1", [[">=1.0.0-"]] ] - , [">= 1", [[">=1.0.0-"]] ] - , ["<1.2", [["<1.2.0-"]] ] - , ["< 1.2", [["<1.2.0-"]] ] - , ["1", [[">=1.0.0-", "<2.0.0-"]] ] - ].forEach(function (v) { - t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1])) - }) - - t.end() -}) diff --git a/deps/npm/node_modules/tar/examples/extracter.js b/deps/npm/node_modules/tar/examples/extracter.js deleted file mode 100644 index e150abf25..000000000 --- a/deps/npm/node_modules/tar/examples/extracter.js +++ /dev/null @@ -1,11 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Extract({ path: __dirname + "/extract" })) - .on("error", function (er) { - console.error("error here") - }) - .on("end", function () { - console.error("done") - }) diff --git a/deps/npm/node_modules/tar/examples/reader.js b/deps/npm/node_modules/tar/examples/reader.js deleted file mode 100644 index c2584d398..000000000 --- a/deps/npm/node_modules/tar/examples/reader.js +++ /dev/null @@ -1,36 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Reader()) - .on("extendedHeader", function (e) { - console.error("extended pax header", e.props) - e.on("end", function () { - console.error("extended pax fields:", e.fields) - }) - }) - .on("ignoredEntry", function (e) { - console.error("ignoredEntry?!?", e.props) - }) - .on("longLinkpath", function (e) { - console.error("longLinkpath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("longPath", function (e) { - console.error("longPath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("entry", function (e) { - console.error("entry", e.props) - e.on("data", function (c) { - console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) - }) - e.on("end", function () { - console.error(" << Math.pow(10, digits) - digits) digits ++ + // itself. In that case, just bump it up again. + if (s.length + digits >= Math.pow(10, digits)) digits += 1 + // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) var len = digits + s.length + // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) + var lenBuf = new Buffer("" + len) + if (lenBuf.length + s.length !== len) { + throw new Error("Bad length calculation\n"+ + "len="+len+"\n"+ + "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ + "lenBuf.length="+lenBuf.length+"\n"+ + "digits="+digits+"\n"+ + "s="+JSON.stringify(s.toString())+"\n"+ + "s.length="+s.length) + } - return [new Buffer("" + len), s] + return [lenBuf, s] } diff --git a/deps/npm/node_modules/tar/old/README.md b/deps/npm/node_modules/tar/old/README.md deleted file mode 100644 index aef984497..000000000 --- a/deps/npm/node_modules/tar/old/README.md +++ /dev/null @@ -1 +0,0 @@ -tar for node diff --git a/deps/npm/node_modules/tar/old/doc/example.js b/deps/npm/node_modules/tar/old/doc/example.js deleted file mode 100644 index d29517e49..000000000 --- a/deps/npm/node_modules/tar/old/doc/example.js +++ /dev/null @@ -1,24 +0,0 @@ -// request a tar file, and then write it -require("http").request({...}, function (resp) { - resp.pipe(tar.createParser(function (file) { - if (file.isDirectory()) { - this.pause() - return fs.mkdir(file.name, function (er) { - if (er) return this.emit("error", er) - this.resume() - }) - } else if (file.isSymbolicLink()) { - this.pause() - return fs.symlink(file.link, file.name, function (er) { - if (er) return this.emit("error", er) - this.resume() - }) - } else if (file.isFile()) { - file.pipe(fs.createWriteStream(file.name)) - } - })) - // or maybe just have it do all that internally? - resp.pipe(tar.createParser(function (file) { - this.create("/extract/target/path", file) - })) -}) diff --git a/deps/npm/node_modules/tar/old/generator.js b/deps/npm/node_modules/tar/old/generator.js deleted file mode 100644 index c2506c415..000000000 --- a/deps/npm/node_modules/tar/old/generator.js +++ /dev/null @@ -1,387 +0,0 @@ -module.exports = Generator -Generator.create = create - -var tar = require("./tar") - , Stream = require("stream").Stream - , Parser = require("./parser") - , fs = require("fs") - -function create (opts) { - return new Generator(opts) -} - -function Generator (opts) { - this.readable = true - this.currentFile = null - - this._paused = false - this._ended = false - this._queue = [] - - this.options = { cwd: process.cwd() } - Object.keys(opts).forEach(function (o) { - this.options[o] = opts[o] - }, this) - if (this.options.cwd.slice(-1) !== "/") { - this.options.cwd += "/" - } - - Stream.apply(this) -} - -Generator.prototype = Object.create(Stream.prototype) - -Generator.prototype.pause = function () { - if (this.currentFile) this.currentFile.pause() - this.paused = true - this.emit("pause") -} - -Generator.prototype.resume = function () { - this.paused = false - if (this.currentFile) this.currentFile.resume() - this.emit("resume") - this._processQueue() -} - -Generator.prototype.end = function () { - this._ended = true - this._processQueue() -} - -Generator.prototype.append = function (f, st) { - if (this._ended) return this.emit("error", new Error( - "Cannot append after ending")) - - // if it's a string, then treat it as a filename. - // if it's a number, then treat it as a fd - // if it's a Stats, then treat it as a stat object - // if it's a Stream, then stream it in. - var s = toFileStream(f, st) - if (!s) return this.emit("error", new TypeError( - "Invalid argument: "+f)) - - // make sure it's in the folder being added. - if (s.name.indexOf(this.options.cwd) !== 0) { - this.emit("error", new Error( - "Invalid argument: "+s.name+"\nOutside of "+this.options.cwd)) - } - - s.name = s.name.substr(this.options.cwd.length) - s.pause() - this._queue.push(s) - - if (!s._needStat) return this._processQueue() - - var self = this - fs.lstat(s.name, function (er, st) { - if (er) return self.emit("error", new Error( - "invalid file "+s.name+"\n"+er.message)) - s.mode = st.mode & 0777 - s.uid = st.uid - s.gid = st.gid - s.size = st.size - s.mtime = +st.mtime / 1000 - s.type = st.isFile() ? "0" - : st.isSymbolicLink() ? "2" - : st.isCharacterDevice() ? "3" - : st.isBlockDevice() ? "4" - : st.isDirectory() ? "5" - : st.isFIFO() ? "6" - : null - - // TODO: handle all the types in - // http://cdrecord.berlios.de/private/man/star/star.4.html - // for now, skip over unknown ones. - if (s.type === null) { - console.error("Unknown file type: " + s.name) - // kick out of the queue - var i = self._queue.indexOf(s) - if (i !== -1) self._queue.splice(i, 1) - self._processQueue() - return - } - - if (s.type === "2") return fs.readlink(s.name, function (er, n) { - if (er) return self.emit("error", new Error( - "error reading link value "+s.name+"\n"+er.message)) - s.linkname = n - s._needStat = false - self._processQueue() - }) - s._needStat = false - self._processQueue() - }) - return false -} - -function toFileStream (thing) { - if (typeof thing === "string") { - return toFileStream(fs.createReadStream(thing)) - } - - if (thing && typeof thing === "object") { - if (thing instanceof (Parser.File)) return thing - - if (thing instanceof Stream) { - if (thing.hasOwnProperty("name") && - thing.hasOwnProperty("mode") && - thing.hasOwnProperty("uid") && - thing.hasOwnProperty("gid") && - thing.hasOwnProperty("size") && - thing.hasOwnProperty("mtime") && - thing.hasOwnProperty("type")) return thing - - if (thing instanceof (fs.ReadStream)) { - thing.name = thing.path - } - - if (thing.name) { - thing._needStat = true - return thing - } - } - } - - return null -} - -Generator.prototype._processQueue = function processQueue () { - console.error("processQueue", this._queue[0]) - if (this._paused) return false - - if (this.currentFile || - this._queue.length && this._queue[0]._needStat) { - // either already processing one, or waiting on something. - return - } - - var f = this.currentFile = this._queue.shift() - if (!f) { - if (this._ended) { - // close it off with 2 blocks of nulls. - this.emit("data", new Buffer(new Array(512 * 2))) - this.emit("end") - this.emit("close") - } - return true - } - - if (f.type === Parser.File.types.Directory && - f.name.slice(-1) !== "/") { - f.name += "/" - } - - // write out a Pax header if the file isn't kosher. - if (this._needPax(f)) this._emitPax(f) - - // write out the header - f.ustar = true - this._emitHeader(f) - var fpos = 0 - , self = this - console.error("about to read body data", f) - f.on("data", function (c) { - self.emit("data", c) - self.fpos += c.length - }) - f.on("error", function (er) { self.emit("error", er) }) - f.on("end", function $END () { - // pad with \0 out to an even multiple of 512 bytes. - // this ensures that every file starts on a block. - var b = new Buffer(fpos % 512 || 512) - - for (var i = 0, l = b.length; i < l; i ++) b[i] = 0 - //console.log(b.length, b) - self.emit("data", b) - self.currentFile = null - self._processQueue() - }) - f.resume() -} - -Generator.prototype._needPax = function (f) { - // meh. why not? - return true - - return oddTextField(f.name, "NAME") || - oddTextField(f.link, "LINK") || - oddTextField(f.gname, "GNAME") || - oddTextField(f.uname, "UNAME") || - oddTextField(f.prefix, "PREFIX") -} - -// check if a text field is too long or non-ascii -function oddTextField (val, field) { - var nl = Buffer.byteLength(val) - , len = tar.fieldSize[field] - if (nl > len || nl !== val.length) return true -} - -// emit a Pax header of "key = val" for any file with -// odd or too-long field values. -Generator.prototype._emitPax = function (f) { - // since these tend to be relatively small, just go ahead - // and emit it all in-band. That saves having to keep - // track of the pax state in the generator, and we can - // go right back to emitting the file in the same tick. - var dir = f.name.replace(/[^\/]+\/?$/, "") - , base = f.name.substr(dir.length) - var pax = { name: dir + "PaxHeader/" +base - , mode: 0644 - , uid: f.uid - , gid: f.gid - , mtime: +f.mtime - // don't know size yet. - , size: -1 - , type: "x" // extended header - , ustar: true - , ustarVersion: "00" - , user: f.user || f.uname || "" - , group: f.group || f.gname || "" - , dev: { major: f.dev && f.dev.major || 0 - , minor: f.dev && f.dev.minor || 0 } - , prefix: f.prefix - , linkname: "" } - - // generate the Pax body - var kv = { path: (f.prefix ? f.prefix + "/" : "") + f.name - , atime: f.atime - , mtime: f.mtime - , ctime: f.ctime - , charset: "UTF-8" - , gid: f.gid - , uid: f.uid - , uname: f.user || f.uname || "" - , gname: f.group || f.gname || "" - , linkpath: f.linkpath || "" - , size: f.size - } - // "%d %s=%s\n", , , - // length includes the length of the length number, - // the key=val, and the \n. - var body = new Buffer(Object.keys(kv).map(function (key) { - if (!kv[key]) return ["", ""] - - var s = new Buffer(" " + key + "=" + kv[key]+"\n") - , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 - - // if adding that many digits will make it go over that length, - // then add one to it - if (s.length > Math.pow(10, digits) - digits) digits ++ - - return [s.length + digits, s] - }).reduce(function (l, r) { - return l + r[0] + r[1] - }, "")) - - pax.size = body.length - this._emitHeader(pax) - this.emit("data", body) - // now the trailing buffer to make it an even number of 512 blocks - var b = new Buffer(512 + (body.length % 512 || 512)) - for (var i = 0, l = b.length; i < l; i ++) b[i] = 0 - this.emit("data", b) -} - -Generator.prototype._emitHeader = function (f) { - var header = new Buffer(new Array(512)) - , fields = tar.fields - , offs = tar.fieldOffs - , sz = tar.fieldSize - - addField(header, "NAME", f.name) - addField(header, "MODE", f.mode) - addField(header, "UID", f.uid) - addField(header, "GID", f.gid) - addField(header, "SIZE", f.size) - addField(header, "MTIME", +f.mtime) - // checksum is generated based on it being spaces - // then it's written as: "######\0 " - // where ### is a zero-lead 6-digit octal number - addField(header, "CKSUM", " ") - - addField(header, "TYPE", f.type) - addField(header, "LINKNAME", f.linkname || "") - if (f.ustar) { - console.error(">>> ustar!!") - addField(header, "USTAR", tar.ustar) - addField(header, "USTARVER", 0) - addField(header, "UNAME", f.user || "") - addField(header, "GNAME", f.group || "") - if (f.dev) { - addField(header, "DEVMAJ", f.dev.major || 0) - addField(header, "DEVMIN", f.dev.minor || 0) - } - addField(header, "PREFIX", f.prefix) - } else { - console.error(">>> no ustar!") - } - - // now the header is written except for checksum. - var ck = 0 - for (var i = 0; i < 512; i ++) ck += header[i] - addField(header, "CKSUM", nF(ck, 7)) - header[ offs[fields.CKSUM] + 7 ] = 0 - - this.emit("data", header) -} - -function addField (buf, field, val) { - var f = tar.fields[field] - console.error("Adding field", field, val) - val = typeof val === "number" - ? nF(val, tar.fieldSize[f]) - : new Buffer(val || "") - val.copy(buf, tar.fieldOffs[f]) -} - -function toBase256 (num, len) { - console.error("toBase256", num, len) - var positive = num > 0 - , buf = new Buffer(len) - if (!positive) { - // rare and slow - var b = num.toString(2).substr(1) - , padTo = (len - 1) * 8 - b = new Array(padTo - b.length + 1).join("0") + b - - // take the 2's complement - var ht = b.match(/^([01]*)(10*)?$/) - , head = ht[1] - , tail = ht[2] - head = head.split("1").join("2") - .split("0").join("1") - .split("2").join("0") - b = head + tail - - buf[0] = 0xFF - for (var i = 1; i < len; i ++) { - buf[i] = parseInt(buf.substr(i * 8, 8), 2) - } - return buf - } - - buf[0] = 0x80 - for (var i = 1, l = len, p = l - 1; i < l; i ++, p --) { - buf[p] = num % 256 - num = Math.floor(num / 256) - } - return buf -} - -function nF (num, size) { - var ns = num.toString(8) - - if (num < 0 || ns.length >= size) { - // make a base 256 buffer - // then return it - return toBase256(num, size) - } - - var buf = new Buffer(size) - ns = new Array(size - ns.length - 1).join("0") + ns + " " - buf[size - 1] = 0 - buf.asciiWrite(ns) - return buf -} diff --git a/deps/npm/node_modules/tar/old/parser.js b/deps/npm/node_modules/tar/old/parser.js deleted file mode 100644 index 1582ee757..000000000 --- a/deps/npm/node_modules/tar/old/parser.js +++ /dev/null @@ -1,344 +0,0 @@ -module.exports = Parser -Parser.create = create -Parser.File = File - -var tar = require("./tar") - , Stream = require("stream").Stream - , fs = require("fs") - -function create (cb) { - return new Parser(cb) -} - -var s = 0 - , HEADER = s ++ - , BODY = s ++ - , PAD = s ++ - -function Parser (cb) { - this.fields = tar.fields - this.fieldSize = tar.fieldSize - this.state = HEADER - this.position = 0 - this.currentFile = null - this._header = [] - this._headerPosition = 0 - this._bodyPosition = 0 - this.writable = true - Stream.apply(this) - if (cb) this.on("file", cb) -} - -Parser.prototype = Object.create(Stream.prototype) - -Parser.prototype.write = function (chunk) { - switch (this.state) { - case HEADER: - // buffer up to 512 bytes in memory, and then - // parse it, emit a "file" event, and stream the rest - this._header.push(chunk) - this._headerPosition += chunk.length - if (this._headerPosition >= tar.headerSize) { - return this._parseHeader() - } - return true - - case BODY: - // stream it through until the end of the file is reached, - // and then step over any \0 byte padding. - var cl = chunk.length - , bp = this._bodyPosition - , np = cl + bp - , s = this.currentFile.size - if (np < s) { - this._bodyPosition = np - return this.currentFile.write(chunk) - } - var c = chunk.slice(0, (s - bp)) - this.currentFile.write(c) - this._closeFile() - return this.write(chunk.slice(s - bp)) - - case PAD: - for (var i = 0, l = chunk.length; i < l; i ++) { - if (chunk[i] !== 0) { - this.state = HEADER - return this.write(chunk.slice(i)) - } - } - } - return true -} - -Parser.prototype.end = function (chunk) { - if (chunk) this.write(chunk) - if (this.currentFile) this._closeFile() - this.emit("end") - this.emit("close") -} - -// at this point, we have at least 512 bytes of header chunks -Parser.prototype._parseHeader = function () { - var hp = this._headerPosition - , last = this._header.pop() - , rem - - if (hp < 512) return this.emit("error", new Error( - "Trying to parse header before finished")) - - if (hp > 512) { - var ll = last.length - , llIntend = 512 - hp + ll - rem = last.slice(llIntend) - last = last.slice(0, llIntend) - } - this._header.push(last) - - var fields = tar.fields - , pos = 0 - , field = 0 - , fieldEnds = tar.fieldEnds - , fieldSize = tar.fieldSize - , set = {} - , fpos = 0 - - Object.keys(fieldSize).forEach(function (f) { - set[ fields[f] ] = new Buffer(fieldSize[f]) - }) - - this._header.forEach(function (chunk) { - for (var i = 0, l = chunk.length; i < l; i ++, pos ++, fpos ++) { - if (pos >= fieldEnds[field]) { - field ++ - fpos = 0 - } - // header is null-padded, so when the fields run out, - // just finish. - if (null === fields[field]) return - set[fields[field]][fpos] = chunk[i] - } - }) - - this._header.length = 0 - - // type definitions here: - // http://cdrecord.berlios.de/private/man/star/star.4.html - var type = set.TYPE.toString() - , file = this.currentFile = new File(set) - if (type === "\0" || - type >= "0" && type <= "7") { - this._addExtended(file) - this.emit("file", file) - } else if (type === "g") { - this._global = this._global || {} - readPax(this, file, this._global) - } else if (type === "h" || type === "x" || type === "X") { - this._extended = this._extended || {} - readPax(this, file, this._extended) - } else if (type === "K") { - this._readLongField(file, "linkname") - } else if (type === "L") { - this._readLongField(file, "name") - } - - this.state = BODY - if (rem) return this.write(rem) - return true -} - -function readPax (self, file, obj) { - var buf = "" - file.on("data", function (c) { - buf += c - var lines = buf.split(/\r?\n/) - buf = lines.pop() - lines.forEach(function (line) { - line = line.match(/^[0-9]+ ([^=]+)=(.*)/) - if (!line) return - obj[line[1]] = line[2] - }) - }) -} - -Parser.prototype._readLongField = function (f, field) { - var self = this - this._longFields[field] = "" - f.on("data", function (c) { - self._longFields[field] += c - }) -} - -Parser.prototype._addExtended = function (file) { - var g = this._global || {} - , e = this._extended || {} - file.extended = {} - ;[g, e].forEach(function (h) { - Object.keys(h).forEach(function (k) { - file.extended[k] = h[k] - // handle known fields - switch (k) { - case "path": file.name = h[k]; break - case "ctime": file.ctime = new Date(1000 * h[k]); break - case "mtime": file.mtime = new Date(1000 * h[k]); break - case "gid": file.gid = parseInt(h[k], 10); break - case "uid": file.uid = parseInt(h[k], 10); break - case "charset": file.charset = h[k]; break - case "gname": file.group = h[k]; break - case "uname": file.user = h[k]; break - case "linkpath": file.linkname = h[k]; break - case "size": file.size = parseInt(h[k], 10); break - case "SCHILY.devmajor": file.dev.major = parseInt(h[k], 10); break - case "SCHILY.devminor": file.dev.minor = parseInt(h[k], 10); break - } - }) - }) - var lf = this._longFields || {} - Object.keys(lf).forEach(function (f) { - file[f] = lf[f] - }) - this._extended = {} - this._longFields = {} -} - -Parser.prototype._closeFile = function () { - if (!this.currentFile) return this.emit("error", new Error( - "Trying to close without current file")) - - this._headerPosition = this._bodyPosition = 0 - this.currentFile.end() - this.currentFile = null - this.state = PAD -} - - -// file stuff - -function strF (f) { - return f.toString("ascii").split("\0").shift() || "" -} - -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return 0 - - if (!positive) { - // this is rare enough that the string slowness - // is not a big deal. You need *very* old files - // to ever hit this path. - var s = "" - for (var i = 1, l = buf.length; i < l; i ++) { - var byte = buf[i].toString(2) - if (byte.length < 8) { - byte = new Array(byte.length - 8 + 1).join("1") + byte - } - s += byte - } - var ht = s.match(/^([01]*)(10*)$/) - , head = ht[1] - , tail = ht[2] - head = head.split("1").join("2") - .split("0").join("1") - .split("2").join("0") - return -1 * parseInt(head + tail, 2) - } - - var sum = 0 - for (var i = 1, l = buf.length, p = l - 1; i < l; i ++, p--) { - sum += buf[i] * Math.pow(256, p) - } - return sum -} - -function nF (f) { - if (f[0] & 128 === 128) { - return parse256(f) - } - return parseInt(f.toString("ascii").replace(/\0+/g, "").trim(), 8) || 0 -} - -function bufferMatch (a, b) { - if (a.length != b.length) return false - for (var i = 0, l = a.length; i < l; i ++) { - if (a[i] !== b[i]) return false - } - return true -} - -function File (fields) { - this._raw = fields - this.name = strF(fields.NAME) - this.mode = nF(fields.MODE) - this.uid = nF(fields.UID) - this.gid = nF(fields.GID) - this.size = nF(fields.SIZE) - this.mtime = new Date(nF(fields.MTIME) * 1000) - this.cksum = nF(fields.CKSUM) - this.type = strF(fields.TYPE) - this.linkname = strF(fields.LINKNAME) - - this.ustar = bufferMatch(fields.USTAR, tar.ustar) - - if (this.ustar) { - this.ustarVersion = nF(fields.USTARVER) - this.user = strF(fields.UNAME) - this.group = strF(fields.GNAME) - this.dev = { major: nF(fields.DEVMAJ) - , minor: nF(fields.DEVMIN) } - this.prefix = strF(fields.PREFIX) - if (this.prefix) { - this.name = this.prefix + "/" + this.name - } - } - - this.writable = true - this.readable = true - Stream.apply(this) -} - -File.prototype = Object.create(Stream.prototype) - -File.types = { File: "0" - , HardLink: "1" - , SymbolicLink: "2" - , CharacterDevice: "3" - , BlockDevice: "4" - , Directory: "5" - , FIFO: "6" - , ContiguousFile: "7" } - -Object.keys(File.types).forEach(function (t) { - File.prototype["is"+t] = function () { - return File.types[t] === this.type - } - File.types[ File.types[t] ] = File.types[t] -}) - -// contiguous files are treated as regular files for most purposes. -File.prototype.isFile = function () { - return this.type === "0" && this.name.slice(-1) !== "/" - || this.type === "7" -} - -File.prototype.isDirectory = function () { - return this.type === "5" - || this.type === "0" && this.name.slice(-1) === "/" -} - -File.prototype.write = function (c) { - this.emit("data", c) - return true -} - -File.prototype.end = function (c) { - if (c) this.write(c) - this.emit("end") - this.emit("close") -} - -File.prototype.pause = function () { this.emit("pause") } - -File.prototype.resume = function () { this.emit("resume") } diff --git a/deps/npm/node_modules/tar/old/tar.js b/deps/npm/node_modules/tar/old/tar.js deleted file mode 100644 index f70c081d2..000000000 --- a/deps/npm/node_modules/tar/old/tar.js +++ /dev/null @@ -1,74 +0,0 @@ -// field names that every tar file must have. -// header is padded to 512 bytes. -var f = 0 - , fields = {} - , NAME = fields.NAME = f++ - , MODE = fields.MODE = f++ - , UID = fields.UID = f++ - , GID = fields.GID = f++ - , SIZE = fields.SIZE = f++ - , MTIME = fields.MTIME = f++ - , CKSUM = fields.CKSUM = f++ - , TYPE = fields.TYPE = f++ - , LINKNAME = fields.LINKNAME = f++ - , headerSize = 512 - , fieldSize = [] - -fieldSize[NAME] = 100 -fieldSize[MODE] = 8 -fieldSize[UID] = 8 -fieldSize[GID] = 8 -fieldSize[SIZE] = 12 -fieldSize[MTIME] = 12 -fieldSize[CKSUM] = 8 -fieldSize[TYPE] = 1 -fieldSize[LINKNAME] = 100 - -// "ustar\0" may introduce another bunch of headers. -// these are optional, and will be nulled out if not present. -var ustar = new Buffer(6) -ustar.asciiWrite("ustar\0") - -var USTAR = fields.USTAR = f++ - , USTARVER = fields.USTARVER = f++ - , UNAME = fields.UNAME = f++ - , GNAME = fields.GNAME = f++ - , DEVMAJ = fields.DEVMAJ = f++ - , DEVMIN = fields.DEVMIN = f++ - , PREFIX = fields.PREFIX = f++ -// terminate fields. -fields[f] = null - -fieldSize[USTAR] = 6 -fieldSize[USTARVER] = 2 -fieldSize[UNAME] = 32 -fieldSize[GNAME] = 32 -fieldSize[DEVMAJ] = 8 -fieldSize[DEVMIN] = 8 -fieldSize[PREFIX] = 155 - -var fieldEnds = {} - , fieldOffs = {} - , fe = 0 -for (var i = 0; i < f; i ++) { - fieldOffs[i] = fe - fieldEnds[i] = (fe += fieldSize[i]) -} - -// build a translation table of field names. -Object.keys(fields).forEach(function (f) { - fields[fields[f]] = f -}) - -exports.ustar = ustar -exports.fields = fields -exports.fieldSize = fieldSize -exports.fieldOffs = fieldOffs -exports.fieldEnds = fieldEnds -exports.headerSize = headerSize - -var Parser = exports.Parser = require("./parser") -exports.createParser = Parser.create - -var Generator = exports.Generator = require("./generator") -exports.createGenerator = Generator.create diff --git a/deps/npm/node_modules/tar/old/test/test-generator.js b/deps/npm/node_modules/tar/old/test/test-generator.js deleted file mode 100644 index dea273216..000000000 --- a/deps/npm/node_modules/tar/old/test/test-generator.js +++ /dev/null @@ -1,13 +0,0 @@ -// pipe this file to tar vt - -var Generator = require("../generator") - , fs = require("fs") - , path = require("path") - , ohm = fs.createReadStream(path.resolve(__dirname, "tar-files/Ω.txt")) - , foo = path.resolve(__dirname, "tar-files/foo.js") - , gen = Generator.create({cwd: __dirname}) - -gen.pipe(process.stdout) -gen.append(ohm) -//gen.append(foo) -gen.end() diff --git a/deps/npm/node_modules/tar/old/test/test-generator.tar b/deps/npm/node_modules/tar/old/test/test-generator.tar deleted file mode 100644 index 6752aa51de2f8362d8db9c622e8c44e5ae7c8463..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3260 zcmeHHOA5j;5Y0NLm?o4@kU<8GnrD|xR6Q;-Q;cZVZJYu z7hE+tlxJVh)~;E3xA)cT`Iv?#u)%=-RpCKa0%tbTarjZD=iHt1G|%} zY9H)&vz*NN0*>Y03gjf=*6x%pDBjlP-CM!?mysJ=8T(SM l_)}Ub!Cui5jfPUL#4^Tme?G>_obzS|G6R``%)qz|yZ~{8NM-;4 diff --git a/deps/npm/node_modules/tar/old/test/test-generator.txt b/deps/npm/node_modules/tar/old/test/test-generator.txt deleted file mode 100644 index 349757ba692925ea24ac27eb77f256c6c0052fb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3261 zcmeHHOA5j;5Y0NLm?o4@kU;zXEMbK;-VB(5Y5}!K5mV_1>9us@awi47_IyE*&~S8NXQK%1Ke)X<7YK)tAG{@rB(&1fa5Avk zxuW#JE*I0mm``AvudP5%5>8D|>5SrRnV-EC{0sP{6n<5K=O6nCp0TJqoeKr9N9Uqg hDF}?c>?VE4w9XZ;`%Bc9zoeZ=Ck2uMNr9vQ<5vbbNZP$|5kL z1Z1mJA^WRUFmusQ7k!&bsXOm?-Q~oTR#lh7Lo;JjawhYxLS*E(kMCuIFua5R=?en6 zi}hzHQ2}bRA?wbXA2oK&#-K=pe0|(LJ-@B?;kP8EokJiNq(;4NzLIV&ZI}hRQEm=( z^HHL>D;$d}W;*v<07z>-yZ`AonC!o{426VS6f?bZ;ro9&PJv`U6UYQIflOct1pWYk CGhK-Q diff --git a/deps/npm/node_modules/tar/old/test/test-tar.txt b/deps/npm/node_modules/tar/old/test/test-tar.txt deleted file mode 100644 index d9ac62cc5823cde33a0c0052136308972fa421b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3073 zcmeH{&2GXl499!UQ{)8z+xcn_J#k^u4oIAKj3Cvbv2JR!sjtM#@Js~JUMkTONJxz@ zk^i (http://blog.izs.me/)", "name": "tar", "description": "tar for node", - "version": "0.1.0", + "version": "0.1.3", "repository": { "type": "git", "url": "git://github.com/isaacs/node-tar.git" @@ -17,7 +17,7 @@ "dependencies": { "inherits": "1.x", "block-stream": "*", - "fstream": "~0.1" + "fstream": "0.1" }, "devDependencies": { "tap": "0.x", diff --git a/deps/npm/node_modules/tar/test/extract.js b/deps/npm/node_modules/tar/test/extract.js deleted file mode 100644 index e2dea5c05..000000000 --- a/deps/npm/node_modules/tar/test/extract.js +++ /dev/null @@ -1,406 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - - , ee = 0 - , expectEntries = -[ { path: 'c.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'cc.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 100, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51693379 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 201, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '777', - type: '2', - depth: undefined, - size: 0, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200-hard', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 2, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '1', - depth: undefined, - size: 0, - linkpath: path.resolve(target, '200-hard'), - nlink: 2, - dev: 234881026, - ino: 51681874 } ] - - , ef = 0 - , expectFiles = -[ { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - size: 306, - linkpath: undefined, - nlink: 9 }, - { path: '/200-hard', - mode: '100644', - type: 'File', - depth: 1, - size: 200, - linkpath: undefined, - nlink: 2 }, - { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'Link', - depth: 1, - size: 200, - linkpath: '/Users/isaacs/dev-src/js/node-tar/test/tmp/extract-test/200-hard', - nlink: 2 }, - { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120777', - type: 'SymbolicLink', - depth: 1, - size: 200, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: 1 }, - { path: '/c.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/cc.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/r', - mode: '40755', - type: 'Directory', - depth: 1, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e', - mode: '40755', - type: 'Directory', - depth: 2, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a', - mode: '40755', - type: 'Directory', - depth: 3, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l', - mode: '40755', - type: 'Directory', - depth: 4, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l', - mode: '40755', - type: 'Directory', - depth: 5, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y', - mode: '40755', - type: 'Directory', - depth: 6, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-', - mode: '40755', - type: 'Directory', - depth: 7, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d', - mode: '40755', - type: 'Directory', - depth: 8, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e', - mode: '40755', - type: 'Directory', - depth: 9, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e', - mode: '40755', - type: 'Directory', - depth: 10, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p', - mode: '40755', - type: 'Directory', - depth: 11, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-', - mode: '40755', - type: 'Directory', - depth: 12, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', - mode: '40755', - type: 'Directory', - depth: 13, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', - mode: '40755', - type: 'Directory', - depth: 14, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', - mode: '40755', - type: 'Directory', - depth: 15, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', - mode: '40755', - type: 'Directory', - depth: 16, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', - mode: '40755', - type: 'Directory', - depth: 17, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', - mode: '40755', - type: 'Directory', - depth: 18, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', - mode: '40755', - type: 'Directory', - depth: 19, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', - mode: '40755', - type: 'Directory', - depth: 20, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', - mode: '40755', - type: 'Directory', - depth: 21, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', - mode: '40755', - type: 'Directory', - depth: 22, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', - mode: '40755', - type: 'Directory', - depth: 23, - size: 102, - linkpath: undefined, - nlink: 3 }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'File', - depth: 24, - size: 100, - linkpath: undefined, - nlink: 1 }, - { path: '/Ω.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 2, - linkpath: undefined, - nlink: 1 } ] - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - next() - }) - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) - - function next () { - var r = fstream.Reader({ path: target - , type: "Directory" - // this is just to encourage consistency - , sort: "alpha" }) - - r.on("ready", function () { - foundEntry(r) - }) - - r.on("end", finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var found = - { path: p - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - } - - var wanted = expectFiles[ef ++] - - t.equivalent(found, wanted, "unpacked file " + ef + " " + wanted.path) - - entry.on("entry", foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, "should have "+ef+" items") - t.end() - } - } -}) diff --git a/deps/npm/node_modules/tar/test/fixtures/200.tar b/deps/npm/node_modules/tar/test/fixtures/200.tar deleted file mode 100644 index 7e3a8f3e77fa6081a8c32bfcfcdab57557bb60e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3072 zcmeHHO;5ux49z*eBEMkR&PT%`2S7-hv;zVOiDT4dq5?Y97POy_E3G>)t*2$0pw1!6 z^Go8`etC%7d5WvlToFK-!-N0;XN(eHi^3t#Y}BuJW(_JtX9+E8c7QgdL8z@bgMGDK zY&evvjj?QxU&yre`nY@dnBh@sgn3aeLQtQvdkwkDpQEM5&XfeI?5d9xP~)}p{phi{ z#|nc;PHL}~i`$#WyZPezepWV#8Jl{~>i1ca+>TGoSia0w={t}%-XrjC(gR-An_$s- z^o5b=2e^K(>bHRMqN;ru%o)nwOJh|3ntSk<{f~ OrwmLPm@@FUGw=gL<}U)LWSD>|5lc=c#xhHE6ydzL=6+;bbZ%9j9p)5 zS>KQb_ya^D4n!yCQvivWHHc@La>7$TZl5+GV6%1)nQ(Q*huODTNyNDZ+(z)i3hfG= ze}y1S4z1e!n;MYgsnmGK@&6}pzc+QQwfA_^eE9o6dddTc6iYS8kr|LBjROdo!<^3f YU)(g!F5coRKEAUtO@XFBQ=mu%z6f;$5C8xG diff --git a/deps/npm/node_modules/tar/test/fixtures/200longname.tar b/deps/npm/node_modules/tar/test/fixtures/200longname.tar deleted file mode 100644 index 5556567e1511b94317eded255d1827ea936402a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3072 zcmeH{K?=km3`MiUSkcc&cFxQL|-}>^KU4?+vxh+=W>P(NjZ&US%<3Gf0fEPAs zj{OHyYo&t6Y2c5)j~t}0|A{pBk`)gcP)daw1m diff --git a/deps/npm/node_modules/tar/test/fixtures/a.hex b/deps/npm/node_modules/tar/test/fixtures/a.hex deleted file mode 100644 index 529e9cbb3..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/a.hex +++ /dev/null @@ -1,14 +0,0 @@ --- header -- -612e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303034303120313136353133363033333320303132343531002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 a.txt...............................................................................................000644..057761..000024..00000000401.11651360333.012451..0................................................................................................... -00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000......................................................................................................................................................................... - --- file contents -- -61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -61000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 a............................................................................................................................................................................................................................................................... - --- tar eof -- -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ - diff --git a/deps/npm/node_modules/tar/test/fixtures/a.tar b/deps/npm/node_modules/tar/test/fixtures/a.tar deleted file mode 100644 index 27604d7ec37fb71f6906a9ca689a05947faf3421..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2048 zcmeHENeX~44D3_#0!f-K?+HS|tF7SkjaZNMRuSx6LYR=uOk^s1F@1rE!8tJKV+^EK zVb8w8ApueF!~vNZkgW4$0Q<_iwr{z}s#2CLGUxV19ZRWAS2MRMc$oYYC4a}KzA?m% M1V#cQf%g(P0GjxA*Z=?k diff --git a/deps/npm/node_modules/tar/test/fixtures/a.txt b/deps/npm/node_modules/tar/test/fixtures/a.txt deleted file mode 100644 index a6c406965..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/a.txt +++ /dev/null @@ -1 +0,0 @@ -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/fixtures/b.hex b/deps/npm/node_modules/tar/test/fixtures/b.hex deleted file mode 100644 index cf36eb6bb..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/b.hex +++ /dev/null @@ -1,14 +0,0 @@ --- normal header -- -622e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303130303020313136353133363036373720303132343631002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 b.txt...............................................................................................000644..057761..000024..00000001000.11651360677.012461..0................................................................................................... -00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000......................................................................................................................................................................... - --- file contents - exactly 512 bytes, no null padding -- -62626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -62626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb - --- tar eof blocks -- -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ - diff --git a/deps/npm/node_modules/tar/test/fixtures/b.tar b/deps/npm/node_modules/tar/test/fixtures/b.tar deleted file mode 100644 index 2d8e7b3ac7a3d7a20bc21576e0b65c745c8efdda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2048 zcmeHF(F%Yd4D?g>1+kgV@6kZ$H4Xaw7S^M^8A9I67(2GRV`0iiR&9ZZYz!#0&M`?9 z=&LUvDL}-QW=3`nkhEb^fNf=!?R(086De!*eo6IE$NYRnVzY$QdCC{ksQd5 zWqa2FX?HgJnD^|C^6~m^9r-N)V3dj@(AFBHCl%r9bwL1(5sjul3rfU*LTMAl;CET| z=)Z2)SxHM-+-6yR`}~a5?eg+@@WW=BO~oBO2L;MQIcW@x2E~nGG29r)bN>c_)cgzd zzj6BC2p#l42QQqo@(Y{KgZ}4`vf<9bAp$-6ACQ6r=l=`TsHKcSNr~#f^?#WZNtRsG z?@w};%&Ar+H}rOytfd*}Nzdf104z{#)3Re+};Z?~Vf_Cw~5iI=;!) zSJRsMBLQ)~Ui>VkC~;z?oxsGkWslk>U~ojow_o0$U(CLZ=f&@-kSa|Pgc%9hv@e#c zDV^v}Bn>jcv}s;mFP1;17{U$?-rivje^S4hyifjv{omk<`z_diZj29WzK#7C0A7N@ z$X$(fo&SPX_5GiV|0P)#kV;4h_Md}O1VZfq_#(d-p6VF1?ZTMU{kB{fg+i;5Oyk+b zySJaojrsavoRg+c#&k@xLE4+rDJS}6zpolsK%;A9-FuH?UYI#4D5mHn4mX=@^o zQUPoJAIX1T{$C$_SY+LKH5~NcmQ^41aG4y|A+jK*Qdqyh>sFJ1SNJ@ z%Ef(rTT-EpXjD%O+KZ&uzX|4;6J-1k4M=Rahc`t$gP|&5&>iv!QGj>xP@+~1GgqIgnYM0_(4I+AGa5#u~ z(yHl>{s{xoz`Yj~CP3;ui35C<>N>uaHDpDZO9)d%gs#O{0Xl!VpMuKfuSR3Y&98tA O#tfJNGhhZjF|Y%u7Z)G^ diff --git a/deps/npm/node_modules/tar/test/fixtures/hardlink-1 b/deps/npm/node_modules/tar/test/fixtures/hardlink-1 deleted file mode 100644 index c2b6e5096..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/hardlink-1 +++ /dev/null @@ -1 +0,0 @@ -200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/fixtures/hardlink-2 b/deps/npm/node_modules/tar/test/fixtures/hardlink-2 deleted file mode 100644 index c2b6e5096..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/hardlink-2 +++ /dev/null @@ -1 +0,0 @@ -200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/fixtures/omega.hex b/deps/npm/node_modules/tar/test/fixtures/omega.hex deleted file mode 100644 index eef879682..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/omega.hex +++ /dev/null @@ -1,22 +0,0 @@ --- pax header -- -5061784865616465722fcea92e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303031373020313135343337313036313120303135303531002078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 PaxHeader/Ω.txt....................................................................................000644..057761..000024..00000000170.11543710611.015051..x................................................................................................... -00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000......................................................................................................................................................................... - --- pax header contents -- -313520706174683dcea92e7478740a3230206374696d653d313330313435393237380a3230206174696d653d313330313431353738330a323420534348494c592e6465763d3233343838313032360a323320534348494c592e696e6f3d32333737323936360a313820534348494c592e6e6c696e6b3d310a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 15.path=Ω.txt.20.ctime=1301459278.20.atime=1301415783.24.SCHILY.dev=234881026.23.SCHILY.ino=23772966.18.SCHILY.nlink=1......................................................................................................................................... -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ - --- normal header -- -cea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303030303220313135343337313036313120303133303732002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Ω.txt..............................................................................................000644..057761..000024..00000000002.11543710611.013072..0................................................................................................... -00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000......................................................................................................................................................................... - --- file contents -- -cea90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Ω.............................................................................................................................................................................................................................................................. -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ - --- tar eof marker -- -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................ - diff --git a/deps/npm/node_modules/tar/test/fixtures/omega.tar b/deps/npm/node_modules/tar/test/fixtures/omega.tar deleted file mode 100644 index 6590e58ce41c56920dfe19fa8b9d18c6f5d8d839..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3072 zcmeH{&x*n@5XO7XQ{)NUnf#l0=xHws9u_=#3|iT;S{ECoujI@0nKs3(1qL6ZasFs;GvD|uLI8kKif5pS42Cs?=<@$S0*4)Ou3)56k^Izw`^ZV;F0etJrW09i-RC+GR zcA6VB)MO^V z)agG^)c>n|JV@-#HqZIC`a0F@C!n>Y?!rI&xXBpmDeY|ioD f>wnLG0a{1>?-2~Qi~1i9+ZZ__5D|z73>kq>zL21R diff --git a/deps/npm/node_modules/tar/test/fixtures/packtest/omega.txt b/deps/npm/node_modules/tar/test/fixtures/packtest/omega.txt deleted file mode 100644 index 1ca042fff..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/packtest/omega.txt +++ /dev/null @@ -1 +0,0 @@ -Ω \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/fixtures/packtest/star.4.html b/deps/npm/node_modules/tar/test/fixtures/packtest/star.4.html deleted file mode 100644 index b600d772f..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/packtest/star.4.html +++ /dev/null @@ -1,1184 +0,0 @@ - - -Manpage for star.4 - - - - -
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-
-
-

NAME

-     star - tape archive file format
-
-
-
-

DESCRIPTION

-     Tar Archives are layered archives.  The basic  structure  is
-     defined by the POSIX.1-1988 archive format and documented in
-     the BASIC TAR HEADER DESCRIPTION section below.  The  higher
-     level  structure  is  defined  by  the POSIX.1-2001 extended
-     headers and documented in  the  EXTENDED  TAR  (PAX)  HEADER
-     STRUCTURE  section below.  POSIX.1-2001 extended headers are
-     pseudo files that contain an unlimited  number  of  extended
-     header  keywords  and associated values. The header keywords
-     are documented in the EXTENDED  TAR  (PAX)  HEADER  KEYWORDS
-     section below.
-
-
-
-

BASIC TAR HEADER DESCRIPTION

-     Physically, a POSIX.1-1988 tar archive consists of a  series
-     of  fixed  sized blocks of TBLOCK (512) characters.  It con-
-     tains a series of  file  entries  terminated  by  a  logical
-     end-of-archive  marker,  which consists of two blocks of 512
-     bytes of binary zeroes.  Each file entry is represented by a
-     header block that describes the file followed by one or more
-     blocks with the content of the file. The length of each file
-     is rounded up to a multiple of 512 bytes.
-
-     A number of TBLOCK sizes blocks are grouped  together  to  a
-     tape  record  for  physical I/O operations. Each record of n
-     blocks is written with a single write(2) operation.  On mag-
-     netic tapes, this results in a single tape record.
-
-     The header block is defined in star.h as follows:
-     /*
-      * POSIX.1-1988 field size values and magic.
-      */
-     #define   TBLOCK         512
-     #define   NAMSIZ         100
-     #define   PFXSIZ         155
-
-     #define   TMODLEN        8
-     #define   TUIDLEN        8
-     #define   TGIDLEN        8
-     #define   TSIZLEN        12
-     #define   TMTMLEN        12
-     #define   TCKSLEN        8
-
-     #define   TMAGIC         "ustar"   /* ustar magic 6 chars + '\0' */
-     #define   TMAGLEN        6         /* "ustar" including '\0' */
-     #define   TVERSION       "00"
-     #define   TVERSLEN       2
-     #define   TUNMLEN        32
-     #define   TGNMLEN        32
-     #define   TDEVLEN        8
-
-Joerg Schilling       Last change: 05/10/19                     1
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     /*
-      * POSIX.1-1988 typeflag values
-      */
-     #define   REGTYPE        '0'  /* Regular File          */
-     #define   AREGTYPE       '\0' /* Regular File (outdated) */
-     #define   LNKTYPE        '1'  /* Hard Link             */
-     #define   SYMTYPE        '2'  /* Symbolic Link         */
-     #define   CHRTYPE        '3'  /* Character Special     */
-     #define   BLKTYPE        '4'  /* Block Special         */
-     #define   DIRTYPE        '5'  /* Directory             */
-     #define   FIFOTYPE       '6'  /* FIFO (named pipe)     */
-     #define   CONTTYPE       '7'  /* Contiguous File       */
-
-     /*
-      * POSIX.1-2001 typeflag extensions.
-      * POSIX.1-2001 calls the extended USTAR format PAX although it is
-      * definitely derived from and based on USTAR. The reason may be that
-      * POSIX.1-2001 calls the tar program outdated and lists the
-      * pax program as the successor.
-      */
-     #define   LF_GHDR        'g'  /* POSIX.1-2001 global extended header */
-     #define   LF_XHDR        'x'  /* POSIX.1-2001 extended header */
-
-     See section EXTENDED TAR  (PAX)  HEADER  KEYWORDS  for  more
-     information about the structure of a POSIX.1-2001 header.
-
-     /*
-      * star/gnu/Sun tar extensions:
-      *
-      * Note that the standards committee allows only capital A through
-      * capital Z for user-defined expansion.  This means that defining
-      * something as, say '8' is a *bad* idea.
-      */
-
-     #define   LF_ACL         'A'  /* Solaris Access Control List     */
-     #define   LF_DUMPDIR     'D'  /* GNU dump dir                    */
-     #define   LF_EXTATTR     'E'  /* Solaris Extended Attribute File */
-     #define   LF_META        'I'  /* Inode (metadata only) no file content */
-     #define   LF_LONGLINK    'K'  /* NEXT file has a long linkname   */
-     #define   LF_LONGNAME    'L'  /* NEXT file has a long name       */
-     #define   LF_MULTIVOL    'M'  /* Continuation file rest to be skipped */
-     #define   LF_NAMES       'N'  /* OLD GNU for names > 100 characters*/
-     #define   LF_SPARSE      'S'  /* This is for sparse files        */
-     #define   LF_VOLHDR      'V'  /* tape/volume header Ignore on extraction */
-     #define   LF_VU_XHDR     'X'  /* POSIX.1-2001 xtended (Sun VU version) */
-
-     /*
-      * Definitions for the t_mode field
-      */
-     #define   TSUID     04000     /* Set UID on execution  */
-     #define   TSGID     02000     /* Set GID on execution  */
-     #define   TSVTX     01000     /* On directories, restricted deletion flag */
-
-Joerg Schilling       Last change: 05/10/19                     2
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     #define   TUREAD    00400     /* Read by owner         */
-     #define   TUWRITE   00200     /* Write by owner special */
-     #define   TUEXEC    00100     /* Execute/search by owner */
-     #define   TGREAD    00040     /* Read by group         */
-     #define   TGWRITE   00020     /* Write by group        */
-     #define   TGEXEC    00010     /* Execute/search by group */
-     #define   TOREAD    00004     /* Read by other         */
-     #define   TOWRITE   00002     /* Write by other        */
-     #define   TOEXEC    00001     /* Execute/search by other */
-
-     #define   TALLMODES 07777     /* The low 12 bits       */
-
-     /*
-      * This is the ustar (Posix 1003.1) header.
-      */
-     struct header {
-          char t_name[NAMSIZ];     /*   0 Filename               */
-          char t_mode[8];          /* 100 Permissions            */
-          char t_uid[8];           /* 108 Numerical User ID      */
-          char t_gid[8];           /* 116 Numerical Group ID     */
-          char t_size[12];         /* 124 Filesize               */
-          char t_mtime[12];        /* 136 st_mtime               */
-          char t_chksum[8];        /* 148 Checksum               */
-          char t_typeflag;         /* 156 Typ of File            */
-          char t_linkname[NAMSIZ]; /* 157 Target of Links        */
-          char t_magic[TMAGLEN];   /* 257 "ustar"                */
-          char t_version[TVERSLEN]; /* 263 Version fixed to 00   */
-          char t_uname[TUNMLEN];   /* 265 User Name              */
-          char t_gname[TGNMLEN];   /* 297 Group Name             */
-          char t_devmajor[8];      /* 329 Major for devices      */
-          char t_devminor[8];      /* 337 Minor for devices      */
-          char t_prefix[PFXSIZ];   /* 345 Prefix for t_name      */
-                                   /* 500 End                    */
-          char t_mfill[12];        /* 500 Filler up to 512       */
-     };
-
-     /*
-      * star header specific definitions
-      */
-     #define   STMAGIC        "tar"     /* star magic */
-     #define   STMAGLEN       4         /* "tar" including '\0' */
-
-     /*
-      * This is the new (post Posix 1003.1-1988) xstar header
-      * defined in 1994.
-      *
-      * t_prefix[130]    is guaranteed to be ' ' to prevent ustar
-      *                  compliant implementations from failing.
-      * t_mfill & t_xmagic need to be zero for a 100% ustar compliant
-      *                  implementation, so setting t_xmagic to
-      *                  "tar" should be avoided in the future.
-      *
-
-Joerg Schilling       Last change: 05/10/19                     3
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-      * A different method to recognize this format is to verify that
-      * t_prefix[130]              is equal to ' ' and
-      * t_atime[0]/t_ctime[0]      is an octal number and
-      * t_atime[11]                is equal to ' ' and
-      * t_ctime[11]                is equal to ' '.
-      *
-      * Note that t_atime[11]/t_ctime[11] may be changed in future.
-      */
-     struct xstar_header {
-          char t_name[NAMSIZ];     /*   0 Filename               */
-          char t_mode[8];          /* 100 Permissions            */
-          char t_uid[8];           /* 108 Numerical User ID      */
-          char t_gid[8];           /* 116 Numerical Group ID     */
-          char t_size[12];         /* 124 Filesize               */
-          char t_mtime[12];        /* 136 st_mtime               */
-          char t_chksum[8];        /* 148 Checksum               */
-          char t_typeflag;         /* 156 Typ of File            */
-          char t_linkname[NAMSIZ]; /* 157 Target of Links        */
-          char t_magic[TMAGLEN];   /* 257 "ustar"                */
-          char t_version[TVERSLEN]; /* 263 Version fixed to 00   */
-          char t_uname[TUNMLEN];   /* 265 User Name              */
-          char t_gname[TGNMLEN];   /* 297 Group Name             */
-          char t_devmajor[8];      /* 329 Major for devices      */
-          char t_devminor[8];      /* 337 Minor for devices      */
-          char t_prefix[131];      /* 345 Prefix for t_name      */
-          char t_atime[12];        /* 476 st_atime               */
-          char t_ctime[12];        /* 488 st_ctime               */
-          char t_mfill[8];         /* 500 Filler up to star magic     */
-          char t_xmagic[4];        /* 508 "tar"                  */
-     };
-
-     struct sparse {
-          char t_offset[12];
-          char t_numbytes[12];
-     };
-
-     #define   SPARSE_EXT_HDR  21
-
-     struct xstar_ext_header {
-          struct sparse t_sp[21];
-          char t_isextended;
-     };
-
-     typedef union hblock {
-          char dummy[TBLOCK];
-          long ldummy[TBLOCK/sizeof (long)]; /* force long alignment */
-          struct header            dbuf;
-          struct xstar_header      xstar_dbuf;
-          struct xstar_ext_header  xstar_ext_dbuf;
-     } TCB;
-
-Joerg Schilling       Last change: 05/10/19                     4
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     For maximum portability, all fields that  contain  character
-     strings should be limited to use the low 7 bits of a charac-
-     ter.
-
-     The  name,  linkname  and  prefix  field  contain  character
-     strings.  The  strings  are null terminated except when they
-     use the full space of 100 characters for the name  or  link-
-     name field or 155 characters for the prefix field.
-
-     If the prefix does not start with  a  null  character,  then
-     prefix and name need to be concatenated by using the prefix,
-     followed a slash character followed by the name field.  If a
-     null  character appears in name or prefix before the maximum
-     size is reached, the field in question is terminated.   This
-     way  file  names  up to 256 characters may be archived.  The
-     prefix is not used together with the linkname field, so  the
-     maximum length of a link name is 100 characters.
-
-     The fields magic, uname and gname  contain  null  terminated
-     character strings.
-
-     The version field contains the string "00" without a  trail-
-     ing  zero.  It cannot be set to different values as POSIX.1-
-     1988 did not specify  a  way  to  handle  different  version
-     strings.  The typeflag field contains a single character.
-
-     All  numeric  fields  contain  size-1  leading   zero-filled
-     numbers  using  octal  digits.   They are followed by one or
-     more space or null characters.  All  recent  implementations
-     only use one space or null character at the end of a numeri-
-     cal field to get maximum space for the octal  number.   Star
-     always uses a space character as terminator.  Numeric fields
-     with 8 characters may hold up to 7  octal  digits  (7777777)
-     which results is a maximum value of 2097151.  Numeric fields
-     with  12  characters  may  hold  up  to  11   octal   digits
-     (77777777777)   which   results   is   a  maximum  value  of
-     8589934591.
-
-     Star implements  a  vendor  specific  (and  thus  non-POSIX)
-     extension  to  put  bigger  numbers into the numeric fields.
-     This is done by using a base 256 coding.  The top bit of the
-     first character in the appropriate 8 character or 12 charac-
-     ter field is set to flag non octal coding.  If base 256 cod-
-     ing  is  in  use,  then all remaining characters are used to
-     code the number. This results in 7  base  256  digits  in  8
-     character  fields  and in 11 base 256 digits in 12 character
-     fields.  All base 256 numbers are two's complement  numbers.
-     A base 256 number in a 8 character field may hold 56 bits, a
-     base 256 number in a 12 character field may  hold  88  bits.
-     This  may  extended to 64 bits for 8 character fields and to
-     95 bits for 12 character fields. For a negative  number  the
-     first  character  currently  is set to a value of 255 (all 8
-
-Joerg Schilling       Last change: 05/10/19                     5
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     bits are set).  The rightmost character in a 8 or 12 charac-
-     ter  field  contains  the least significant base 256 number.
-     Recent GNU tar versions implement the same extension.
-
-     While the POSIX standard makes obvious that the fields mode,
-     uid,  gid,    size,  chksum, devmajor and devminor should be
-     treated as unsigned numbers, there is no such definition for
-     the time field.
-
-     The mode field contains 12  bits  holding  permissions,  see
-     above for the definitions for each of the permission bits.
-
-     The uid and gid fields contain the numerical user id of  the
-     file.
-
-     The size field contains the size of the file in  characters.
-     If  the tar header is followed by file data, then the amount
-     of data that follows is computed by (size + 511) / 512.
-
-     The mtime filed contains the number of seconds since Jan 1st
-     1970 00:00 UTC as retrived via stat(2) in st_mtime.
-
-     The chksum field contains a simple checksum over  all  bytes
-     of  the header.  To compute the value, all characters in the
-     header are treated as unsigned integers and  the  characters
-     in  the chksum field are treated as if they were all spaces.
-     When the computation starts, the checksum value is  initial-
-     ized to 0.
-
-     The typeflag field specifies the type of the  file  that  is
-     archived.  If a specific tar implementation does not include
-     support for a specific typeflag value,  this  implementation
-     will  extract  the  unknown file types as if they were plain
-     files.
-
-     '0' REGTYPE
-          A regular file.  If the size field is  non  zero,  then
-          file data follows the header.
-
-     '\0' AREGTYPE
-          For backwards compatibility with pre  POSIX.1-1988  tar
-          implementations,  a nul character is also recognized as
-          marker for plain files.  It is not generated by  recent
-          tar  implementations.   If  the size field is non zero,
-          then file data follows the header.
-
-     '1' LNKTYPE
-          The file is a hard link to another file.  The  name  of
-          the  file that the file is linked to is in the linkname
-          part of the header.  For tar archives  written  by  pre
-          POSIX.1-1988  implementations,  the  size field usually
-          contains the size of the file and needs to  be  ignored
-
-Joerg Schilling       Last change: 05/10/19                     6
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          as  no  data may follow this header type.  For POSIX.1-
-          1988 compliant archives, the size field needs to be  0.
-          For POSIX.1-2001 compliant archives, the size field may
-          be non zero, indicating that file data is  included  in
-          the archive.
-
-     '2' SYMTYPE
-          The file is a symbolic link to another file.  The  name
-          of  the file that the file is linked to is in the link-
-          name part of the header.  The size field needs to be 0.
-          No file data may follow the header.
-
-     '3' CHRTYPE
-          A character special file.  The fields devmajor and dev-
-          minor  contain  information that defines the file.  The
-          meaning of the size field is unspecified by  the  POSIX
-          standard.  No file data may follow the header.
-
-     '4' BLKTYPE
-          A block special file.  The fields devmajor and devminor
-          contain information that defines the file.  The meaning
-          of the size field is unspecified by the POSIX standard.
-          No file data may follow the header.
-
-     '5' DIRTYPE
-          A directory or sub directory.  Old  (pre  POSIX.1-1988)
-          tar  implementations did use the same typeflag value as
-          for plain files and added a slash to the name.  If  the
-          size  field  is  non zero then it indicates the maximum
-          size in characters the system  may  allocate  for  this
-          directory.  If  the  size  field  is 0, then the system
-          shall not limit the size of the directory. On operating
-          systems  where  the  disk  allocation  is not done on a
-          directory base, the size field is  ignored  on  extrac-
-          tion.  No file data may follow the header.
-
-     '6' FIFOTYPE
-          A named  pipe.   The  meaning  of  the  size  field  is
-          unspecified by the POSIX standard.  The size field must
-          be ignored on extraction.  No file data may follow  the
-          header.
-
-     '7' CONTTYPE
-          A contiguous file.  This is a file that  gives  special
-          performance  attributes.   Operating systems that don't
-          support this file type extract this file type as  plain
-          files.   If  the size field is non zero, then file data
-          follows the header.
-
-     'g' GLOBAL POSIX.1-2001 HEADER
-          With POSIX.1-2001 pax archives,  this  type  defines  a
-          global  extended  header.   The size is always non zero
-
-Joerg Schilling       Last change: 05/10/19                     7
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          and denotes  the  sum  of  the  length  fields  in  the
-          extended header data.  The data that follows the header
-          is in the pax extended  header  format.   The  extended
-          header records in this header type affect all following
-          files in the archive unless they are overwritten by new
-          values.   See  EXTENDED TAR (PAX) HEADER FORMAT section
-          below.
-
-     'x' EXTENDED POSIX.1-2001 HEADER
-          With POSIX.1-2001 pax archives, this  type  defines  an
-          extended  header.   The  size  is  always  non zero and
-          denotes the sum of the length fields  in  the  extended
-          header  data.   The  data that follows the header is in
-          the pax extended header format.   The  extended  header
-          records  in  this header type only affect the following
-          file in the archive.  See  EXTENDED  TAR  (PAX)  HEADER
-          FORMAT section below.
-
-     'A' - 'Z'
-          Reserved for vendor specific implementations.
-
-     'A'  A Solaris ACL entry as used by the  tar  implementation
-          from  Sun.  The size is always non zero and denotes the
-          length of the  data  that  follows  the  header.   Star
-          currently is not able to handle this header type.
-
-     'D'  A GNU dump directory.  This header type is not  created
-          by  star and handled like a directory during an extract
-          operation, so the content is ignored by star.  The size
-          field  denotes  the length of the data that follows the
-          header.
-
-     'E'  A Solaris Extended  Attribute  File.   The  size  field
-          denotes the length of the data that follows the header.
-          Star currently is not able to handle this header type.
-
-     'I'  A inode metadata entry.  This header type  is  used  by
-          star  to archive inode meta data only.  To archive more
-          inode meta data than possible with a  POSIX-1.1988  tar
-          header, a header with type 'I' is usually preceded by a
-          'x' header.  It is used with incremental backups.   The
-          size  field holds the length of the file.  No file data
-          follows this header.
-
-     'K'  A long link name.  Star is able to read and write  this
-          type  of  header.  With the xustar and exustar formats,
-          star  prefers  to  store  long  link  names  using  the
-          POSIX.1-2001  method.   The size is always non zero and
-          denotes the length of the long link name including  the
-          trailing  null  byte. The link name is in the data that
-          follows the header.
-
-Joerg Schilling       Last change: 05/10/19                     8
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     'L'  A long file name.  Star is able to read and write  this
-          type  of  header.  With the xustar and exustar formats,
-          star  prefers  to  store  long  file  names  using  the
-          POSIX.1-2001  method.   The size is always non zero and
-          denotes the length of the long file name including  the
-          trailing  null  byte. The file name is in the data that
-          follows the header.
-
-     'M'  A multi volume continuation entry.  It is used by  star
-          to  tell the extraction program via the size field when
-          the next regular  archive  header  will  follow.   This
-          allows to start extracting multi volume archives with a
-          volume number greater than one.  It is used by GNU  tar
-          to  verify  multi  volume  continuation volumes.  Other
-          fields in the GNU multi volume continuation header  are
-          a  result  of  a  GNU tar miss conception and cannot be
-          used.  If the size field is non zero the data following
-          the header is skipped by star if the volume that starts
-          with it is mounted as the first volume.  This header is
-          ignored if the volume that starts with it is mounted as
-          continuation volume.
-
-     'N'  An outdated linktype used by old GNU  tar  versions  to
-          store  long  file  names.   This type is unsupported by
-          star.
-
-     'S'  A sparse file.  This header type is used  by  star  and
-          GNU  tar.   A  sparse header is uses instead of a plain
-          file header to  denote  a  sparse  file  that  follows.
-          Directly  after  the  header,  a  list  of  sparse hole
-          descriptors follows  followed  by  the  compacted  file
-          data.   With  star formats, the size field holds a size
-          that represents the sum of the sparse hole  descriptors
-          plus  the  size of the compacted file data. This allows
-          other tar implementations to correctly skip to the next
-          tar header.  With GNU tar, up to 4 sparse hole descrip-
-          tors fit  into  the  sparse  header.   Additional  hole
-          descriptors  are not needed if the file has less than 4
-          holes.  With GNU tar, the size field breaks general tar
-          header rules and is meaningless because the size of the
-          sparse hole descriptors does not count.
-
-     'V'  A volume header.  The name field is is used to hold the
-          volume  name.   Star  uses  the atime field to hold the
-          volume number in case there is no POSIX.1-2001 extended
-          header.   This header type is used by star and GNU tar.
-          If the size field is non zero the  data  following  the
-          header is skipped by star.
-
-     'X'  A vendor unique variant of  the  POSIX.1-2001  extended
-          header type.  It has been implemented by Sun many years
-          before the POSIX.1-2001  standard  has  been  approved.
-
-Joerg Schilling       Last change: 05/10/19                     9
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          See also the typeflag 'x' header type.  Star is able to
-          read and write this type of header.
-
-
-
-

EXTENDED TAR (PAX) HEADER STRUCTURE

-     Block type                            Description
-
-     Ustar Header [typeflag='g']      Global Extended Header
-     Global Extended Data
-     Ustar Header [typeflag='h']         Extended Header
-     Extended Data
-     Ustar header [typeflag='0']    File with Extended Header
-     Data for File #1
-     Ustar header [typeflag='0']   File without Extended Header
-     Data for File #2
-     Block of binary zeroes              First EOF Block
-     Block of binary zeroes              Second EOF Block
-
-
-
-

EXTENDED TAR (PAX) HEADER FORMAT

-     The data block  that  follows  a  tar  archive  header  with
-     typeflag 'g' or 'x' contains one or more records in the fol-
-     lowing format:
-
-          "%d %s=%s\n", <length>, <keyword>, <value>
-
-     Each record starts with a a decimal length field. The length
-     includes  the  total  size  of a record including the length
-     field itself and the trailing new line.
-
-     The keyword may not include an  equal  sign.   All  keywords
-     beginning  with  lower  case letters and digits are reserved
-     for future use by the POSIX standard.
-
-     If the value field is of zero length, it deletes any  header
-     field  of  the  same  name  that  is in effect from the same
-     extended header or from a previous global header.
-
-     Null characters do not delimit any value. The value is  only
-     limited by its implicit length.
-
-
-
-

EXTENDED TAR (PAX) HEADER KEYWORDS

-     POSIX.1-2001 extended pax  header  keywords.  All  numerical
-     values  are  represented  as decimal strings.  All texts are
-     represented as 7-bit ascii or UTF-8:
-
-     atime
-          The time from st_atime in sub second granularity.  Star
-          currently supports a nanosecond granularity.
-
-     charset
-          The name of the character set used to encode  the  data
-          in  the  following  file(s).  This keyword is currently
-
-Joerg Schilling       Last change: 05/10/19                    10
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          ignored by star.
-
-     comment
-          Any number of characters that   should  be  treated  as
-          comment.  Star ignores the comment as documented by the
-          POSIX standard.
-
-     ctime
-          The time from st_ctime in sub second granularity.  Star
-          currently supports a nanosecond granularity.
-
-     gid  The group ID of the group  that  owns  the  file.   The
-          argument  is  a  decimal number.  This field is used if
-          the group ID of a file is greater than  2097151  (octal
-          7777777).
-
-     gname
-          The group name of the following file(s) coded in  UTF-8
-          if  the  group name does not fit into 323 characters or
-          cannot be expressed in 7-Bit ASCII.
-
-     linkpath
-          The name of the linkpath coded in UTF-8 if it is longer
-          than  100  characters  or  cannot be expressed in 7-Bit
-          ASCII.
-
-     mtime
-          The time from st_mtime in sub second granularity.  Star
-          currently supports a nanosecond granularity.
-
-     path The name of the linkpath coded in UTF-8 if it does  not
-          fit into 100 characters + 155 characters prefix or can-
-          not be expressed in 7-Bit ASCII.
-
-     realtime.any
-          The keywords prefixed by  realtime.  are  reserved  for
-          future standardization.
-
-     security.any
-          The keywords prefixed by  security.  are  reserved  for
-          future standardization.
-
-     size The size of the file as decimal number if the file size
-          is  greater  than  8589934591  (octal 77777777777). The
-          size keyword may not refer to the real file size but is
-          related  to  the  size if the file in the archive.  See
-          also SCHILY.realsize for more information.
-
-     uid  The uid ID of the group that owns the file.  The  argu-
-          ment  is  a  decimal number.  This field is used if the
-          uid ID  of  a  file  is  greater  than  2097151  (octal
-          7777777).
-
-Joerg Schilling       Last change: 05/10/19                    11
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     uname
-          The user name of the following file(s) coded  in  UTF-8
-          if  the  user  name does not fit into 323 characters or
-          cannot be expressed in 7-Bit ASCII.
-
-     VENDOR.keyword
-          Any keyword that starts with a vendor name  in  capital
-          letters  is  reserved for vendor specific extensions by
-          the standard.  Star uses a lot of these vendor specific
-          extension. See below for more informations.
-
-
-
-

SCHILY PAX EXTENSION KEYWORDS

-     Star uses own vendor specific extensions. The SCHILY  vendor
-     specific extended pax header keywords are:
-
-     SCHILY.acl.access
-          The ACL for a file.
-
-          Since no official backup format for POSIX  access  con-
-          trol  lists  has  been  defined,  star  uses the vendor
-          defined      attributes      SCHILY.acl.access      and
-          SCHILY.acl.default  for storing the ACL and Default ACL
-          of a file, respectively.  The access control lists  are
-          stored  in  the  short  text  form  as defined in POSIX
-          1003.1e draft standard 17.
-
-          To each named user ACL entry a fourth  colon  separated
-          field field containing the user identifier (UID) of the
-          associated user is appended.  To each named group entry
-          a  fourth  colon  separated  field containing the group
-          identifier (GID) of the associated group  is  appended.
-          (POSIX  1003.1e  draft standard 17 allows to add fields
-          to ACL entries.)
-
-          This  is  an   example   of   the   format   used   for
-          SCHILY.acl.access  (a space has been inserted after the
-          equal sign and lines are broken [marked with '\' ]  for
-          readability, additional fields in bold):
-
-          SCHILY.acl.access= user::rwx,user:lisa:r-x:502, \
-                             group::r-x,group:toolies:rwx:102, \
-                             mask::rwx,other::r--x
-
-          The numerical user and group identifiers are  essential
-          when  restoring  a  system completely from a backup, as
-          initially the name-to-identifier mappings  may  not  be
-          available,  and  then  file ownership restoration would
-          not work.
-
-          As the archive format  that  is  used  for  backing  up
-          access control lists is compatible with the pax archive
-          format, archives created that way can  be  restored  by
-
-Joerg Schilling       Last change: 05/10/19                    12
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          star  or  a POSIX.1-2001 compliant pax.  Note that pro-
-          grams other than star will ignore the ACL information.
-
-     SCHILY.acl.default
-          The default ACL for a file. See  SCHILY.acl.access  for
-          more information.
-
-          This  is  an   example   of   the   format   used   for
-          SCHILY.acl.default (a space has been inserted after the
-          equal sign and lines are broken [marked with '\' ]  for
-          readability, additional fields in bold):
-
-          SCHILY.acl.default= user::rwx,user:lisa:r-x:502, \
-                              group::r-x,mask::r-x,other::r-x
-
-     SCHILY.ddev
-          The device ids for names used is  the  SCHILY.dir  dump
-          directory  list  from  st_dev  of  the  file as decimal
-          number.  The SCHILY.ddev keyword is followed by a space
-          separated  list  of device id numbers. Each corresponds
-          exactly to a name in the list found in SCHILY.dir.   If
-          a  specific  device  id number is repeated, a comma (,)
-          without a following space may be use to denote that the
-          current  device  id number is identical to the previous
-          number.  This keyword is used in dump mode.  This  key-
-          word is not yet implemented.
-
-          The value is a signed int.  An implementation should be
-          able  to  handle at least 64 bit values.  Note that the
-          value is signed because POSIX  does  not  specify  more
-          than the type should be an int.
-
-     SCHILY.dev
-          The device id  from  st_dev  of  the  file  as  decimal
-          number.  This keyword is used in dump mode.
-
-          The value is a signed int.  An implementation should be
-          able  to  handle at least 64 bit values.  Note that the
-          value is signed because POSIX  does  not  specify  more
-          than the type should be an int.
-
-     SCHILY.devmajor
-          The device major number of the file if it is a  charac-
-          ter  or  block special file.  The argument is a decimal
-          number.  This field is used if the device major of  the
-          file is greater than 2097151 (octal 7777777).
-
-          The value is a signed int.  An implementation should be
-          able  to  handle at least 64 bit values.  Note that the
-          value is signed because POSIX  does  not  specify  more
-          than the type should be an int.
-
-Joerg Schilling       Last change: 05/10/19                    13
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     SCHILY.devminor
-          The device minor number of the file if it is a  charac-
-          ter  or  block special file.  The argument is a decimal
-          number.  This field is used if the device minor of  the
-          file is greater than 2097151 (octal 7777777).
-
-          The value is a signed int.  An implementation should be
-          able  to  handle at least 64 bit values.  Note that the
-          value is signed because POSIX  does  not  specify  more
-          than the type should be an int.
-
-     SCHILY.dino
-          The inode numbers for names used is the SCHILY.dir dump
-          directory  list  from  st_ino  of  the  file as decimal
-          number.  The SCHILY.dino keyword is followed by a space
-          separated  list  of  inode  numbers.  Each  corresponds
-          exactly to a name in  the  list  found  in  SCHILY.dir.
-          This keyword is used in dump mode.
-
-          The values are unsigned int.  An implementation  should
-          be able to handle at least 64 bit unsigned values.
-
-     SCHILY.dir
-          A list of  filenames  (the  content)  for  the  current
-          directory.   The  names  are coded in UTF-8.  Each file
-          name is prefixed by a single character that is used  as
-          a flag.  Each file name is limited by a null character.
-          The null character is  directly  followed  by  he  flag
-          character  for  the  next file name in case the list is
-          not terminated by the  current  file  name.   The  flag
-          character  must not be a null character.  By default, a
-          ^A (octal  001)  is  used.   The  following  flags  are
-          defined:
-
-          \000 This is the list terminator character - the second
-               null byte, see below.
-
-          ^A   The default flag that is used in case the dump dir
-               features have not been active.
-
-          Y    A non  directory  file  that  is  in  the  current
-               (incremental) dump.
-
-          N    A non directory file that is not  in  the  current
-               (incremental) dump.
-
-          D    A directory that is in the  current  (incremental)
-               dump.
-
-          d    A directory that is not in the current  (incremen-
-               tal) dump.
-
-Joerg Schilling       Last change: 05/10/19                    14
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          The list is terminated by two  successive  null  bytes.
-          The first is the null byte for the last file name.  The
-          second null byte is at the position where a flag  char-
-          acter  would be expected, it acts ad a list terminator.
-          The length tag for the SCHILY.dir  data  includes  both
-          null bytes.
-
-          If a dump mode has been selected  that  writes  compact
-          complete  directory information to the beginning of the
-          archive, the flag character  may  contain  values  dif-
-          ferent from ^A.  Star implementations up to star-1.5 do
-          not include this  feature.   Tar  implementations  that
-          like  to read archives that use the SCHILY.dir keyword,
-          shall not rely on values other than \000 (^@)  or  \001
-          (^A).
-
-          This keyword is used in dump mode.
-
-     SCHILY.fflags
-          A textual version of the BSD  or  Linux  extended  file
-          flags.  As this tag has not yet been documented, please
-          look into the  star  source,  file  fflags.c  for  more
-          information.
-
-     SCHILY.filetype
-          A textual version of the real file type  of  the  file.
-          The following names are used:
-
-          unallocated             An unknown file type  that  may
-                                  be  a  result  of  a  unlink(2)
-                                  operation.  This  should  never
-                                  happen.
-
-          regular                 A regular file.
-
-          contiguous              A contiguous file. On operating
-                                  systems  or  file  systems that
-                                  don't support this  file  type,
-                                  it  is  handled  like a regular
-                                  file.
-
-          symlink                 A symbolic  link  to  any  file
-                                  type.
-
-          directory               A directory.
-
-          character special       A character special file.
-
-          block special           A block special file.
-
-          fifo                    A named pipe.
-
-Joerg Schilling       Last change: 05/10/19                    15
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          socket                  A UNIX domain socket.
-
-          mpx character special   A multiplexed character special
-                                  file.
-
-          mpx block special       A  multiplexed  block   special
-                                  file.
-
-          XENIX nsem              A XENIX named semaphore.
-
-          XENIX nshd              XENIX shared data.
-
-          door                    A Solaris door.
-
-          eventcount              A UNOS event count.
-
-          whiteout                A BSD whiteout directory entry.
-
-          sparse                  A sparse regular file.
-
-          volheader               A volume header.
-
-          unknown/bad             Any other  unknown  file  type.
-                                  This should never happen.
-
-     SCHILY.ino
-          The inode number from st_ino of  the  file  as  decimal
-          number.  This keyword is used in dump mode.
-
-          The value is an unsigned int.  An implementation should
-          be able to handle at least 64 bit unsigned values.
-
-     SCHILY.nlink
-          The link count of the file  as  decimal  number.   This
-          keyword is used in dump mode.
-
-          The value is an unsigned int.  An implementation should
-          be able to handle at least 32 bit unsigned values.
-
-     SCHILY.offset
-          The  offset  value  for  a  multi  volume  continuation
-          header.   This  keyword  is used with multi volume con-
-          tinuation headers.  Multi volume  continuation  headers
-          are  used  to  allow  to  start  reading a multi volume
-          archive past the first volume.
-
-          The value is an unsigned int.  An implementation should
-          be able to handle at least 64 bit unsigned values.
-
-     SCHILY.realsize
-          The real size of the  file  as  decimal  number.   This
-
-Joerg Schilling       Last change: 05/10/19                    16
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          keyword  is  used  if the real size of the file differs
-          from the visible size of the file in the archive.   The
-          real  file size differs from the size in the archive if
-          the file type is sparse or if the file is  a  continua-
-          tion  file  on  a  multi  volume  archive.  In case the
-          SCHILY.realsize keyword is needed, it must be past  any
-          size keyword in case a size keyword is also present.
-
-          The value is an unsigned int.  An implementation should
-          be able to handle at least 64 bit unsigned values.
-
-     SCHILY.tarfiletype
-          The  following  additional  file  types  are  used   in
-          SCHILY.tarfiletype:
-
-          hardlink
-               A hard link to any file type.
-
-          dumpdir
-               A directory with dump entries
-
-          multivol continuation
-               A multi volume continuation for any file type.
-
-          meta A meta entry (inode meta data only) for  any  file
-               type.
-
-     SCHILY.xattr.attr
-          A POSIX.1-2001 coded version of the Linux extended file
-          attributes.    Linux   extended   file  attributes  are
-          name/value pairs. Every attribute  name  results  in  a
-          SCHILY.xattr.name  tag  and  the  value of the extended
-          attribute is used as  the  value  of  the  POSIX.1-2001
-          header  tag.  Note that this way of coding is not port-
-          able across  platforms.   A  version  for  BSD  may  be
-          created  but  Solaris  includes  far more features with
-          extended attribute files than Linux does.
-
-          A future version  of  star  will  implement  a  similar
-          method  as  the  tar program on Solaris currently uses.
-          When    this    implementation    is     ready,     the
-          SCHILY.xattr.name  feature may be removed in favor of a
-          truly portable  implementation  that  supports  Solaris
-          also.
-
-
-
-

SCHILY 'G'LOBAL PAX EXTENSION KEYWORDS

-     The following star vendor unique extensions may only  appear
-     in 'g'lobal extended pax headers:
-
-     SCHILY.archtype
-          The textual version of  the  archive  type  used.   The
-
-Joerg Schilling       Last change: 05/10/19                    17
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          textual  values  used  for SCHILY.archtype are the same
-          names that are used in the star command line options to
-          set up a specific archive type.
-
-          In order to allow archive type  recognition  from  this
-          keyword,  the  minimum  tape  block  size must be 2x512
-          bytes (1024  bytes)  and  the  SCHILY.archtype  keyword
-          needs  to  be  in the first 512 bytes of the content of
-          the first 'g'lobal pax  header.  Then  the  first  tape
-          block may be scanned to recognize the archive type.
-
-     SCHILY.release
-          The textual version of the star version string and  the
-          platform  name  where this star has been compiled.  The
-          same text appears when calling star -version.
-
-     SCHILY.volhdr.blockoff
-          This keyword is used for  multi  volume  archives.   It
-          represents   the   offset   within  the  whole  archive
-          expressed in 512 byte units.
-
-          The value is an unsigned int with a valid range between
-          1  and  infinity.  An  implementation should be able to
-          handle at least 64 bit unsigned values.
-
-     SCHILY.volhdr.blocksize
-          The tape blocksize expressed in 512 byte units that was
-          used when writing the archive.
-
-          The value is an unsigned int with a valid range between
-          1  and  infinity.  An  implementation should be able to
-          handle at least 31 bit unsigned values.
-
-     SCHILY.volhdr.cwd
-          This keyword is used in dump mode.  It is only used  to
-          contain  the  real  backup  working  directory  if  the
-          fs-name= option  of  star  is  used  to  overwrite  the
-          SCHILY.volhdr.filesys         value.        Overwriting
-          SCHILY.volhdr.filesys is needed when backups are run on
-          file system snapshots rather than on the real file sys-
-          tem.
-
-     SCHILY.volhdr.device
-          This keyword is used in dump mode.  It  represents  the
-          name of the device that holds the file system data. For
-          disk based file systems, this is the device name of the
-          mounted device.
-
-          This keyword is optional. It helps to  correctly  iden-
-          tify  the  file  system  from  which this dump has been
-          made.
-
-Joerg Schilling       Last change: 05/10/19                    18
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-     SCHILY.volhdr.dumpdate
-          This keyword is used in dump mode.  It  represents  the
-          time the current dump did start.
-
-     SCHILY.volhdr.dumplevel
-          This keyword is used in dump mode.  It  represents  the
-          level  of  the  current  dump.   Dump  levels are small
-          numbers, the lowest possible number is 0.  Dump level 0
-          represents  a  full  backup.  Dump level 1 represents a
-          backup that contains all changes that did  occur  since
-          the  last  level  0  dump.   Dump  level 2 represents a
-          backup that contains all changes that did  occur  since
-          the last level 1 dump.  Star does not specify a maximum
-          allowed dump level but  you  should  try  to  keep  the
-          numbers less than 100.
-
-          The value is an unsigned int with a valid range between
-          0 and at least 100.
-
-     SCHILY.volhdr.dumptype
-          This keyword is used in dump mode.  If the  dump  is  a
-          complete  dump  of  a file system, then the argument is
-          the text full, else the argument is the text partial.
-
-     SCHILY.volhdr.filesys
-          This keyword is used in dump mode.  It  represents  the
-          top level directory for the file system from which this
-          dump has been made.  If the dump represents a dump that
-          has  an associated level, then the this directory needs
-          to be identical to the root directory of this file sys-
-          tem which is the mount point.
-
-     SCHILY.volhdr.hostname
-          This keyword is  used  in  dump  mode.   The  value  is
-          retrieved from gethostname(3) or uname(2).
-
-     SCHILY.volhdr.label
-          The textual volume label.  The  volume  label  must  be
-          identical within a set of multi volume archives.
-
-     SCHILY.volhdr.refdate
-          This keyword is used in dump mode if the  current  dump
-          is an incremental dump with a level > 0.  It represents
-          the time the related dump did start.
-
-     SCHILY.volhdr.reflevel
-          This keyword is used in dump mode if the  current  dump
-          is an incremental dump with a level > 0.  It represents
-          the level of the related dump.  The related dump is the
-          last  dump with a level that is lower that the level of
-          this dump.  If a dump with the  level  of  the  current
-          dump  -1  exists,  then this is the related dump level.
-
-Joerg Schilling       Last change: 05/10/19                    19
-
-
-Schily's USER COMMANDS                                   STAR(4L)
-
-          Otherwise, the dump level is decremented until a  valid
-          dump level could be found in the dump database.
-
-          The value is an unsigned int with a valid range between
-          0 and at least 100.
-
-     SCHILY.volhdr.tapesize
-          This keyword is used for multi volume archives and  may
-          be  used  to  verify  the volume size on read back.  It
-          represents the tape size expressed in 512  byte  units.
-          If  this  keyword is set in multi volume mode, the size
-          of the tape is not autodetected but set from a  command
-          line option.
-
-          The value is an unsigned int with a valid range between
-          1  and  infinity.  An  implementation should be able to
-          handle at least 64 bit unsigned values.
-
-     SCHILY.volhdr.volume
-          This keyword is used for  multi  volume  archives.   It
-          represents  the volume number within a volume set.  The
-          number used for the first volume is 1.
-
-          The value is an unsigned int with a valid range between
-          1  and  infinity.  An  implementation should be able to
-          handle at least 31 bit unsigned values.
-
-
-
-

MULTI VOLUME ARCHIVE HANDLING

-     To be documented in the future.
-
-
-
-

SEE ALSO

-
-
-

NOTES

-
-
-

BUGS

-
-
-

AUTHOR

-
-Joerg Schilling       Last change: 05/10/19                    20
-
-
-
-
-Man(1) output converted with -man2html -
-


-FhG -FhG FOKUS -BerliOS - -Schily -Schily's Home -VED powered - - - diff --git a/deps/npm/node_modules/tar/test/fixtures/packtest/Ω.txt b/deps/npm/node_modules/tar/test/fixtures/packtest/Ω.txt deleted file mode 100644 index 1ca042fff..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/packtest/Ω.txt +++ /dev/null @@ -1 +0,0 @@ -Ω \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc b/deps/npm/node_modules/tar/test/fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc deleted file mode 100644 index 5a5d18e29..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +++ /dev/null @@ -1 +0,0 @@ -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/fixtures/symlink b/deps/npm/node_modules/tar/test/fixtures/symlink deleted file mode 120000 index 218c28e64..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/symlink +++ /dev/null @@ -1 +0,0 @@ -hardlink-1 \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/fixtures/Ω.txt b/deps/npm/node_modules/tar/test/fixtures/Ω.txt deleted file mode 100644 index 1ca042fff..000000000 --- a/deps/npm/node_modules/tar/test/fixtures/Ω.txt +++ /dev/null @@ -1 +0,0 @@ -Ω \ No newline at end of file diff --git a/deps/npm/node_modules/tar/test/header.js b/deps/npm/node_modules/tar/test/header.js deleted file mode 100644 index 8ea6f7950..000000000 --- a/deps/npm/node_modules/tar/test/header.js +++ /dev/null @@ -1,183 +0,0 @@ -var tap = require("tap") -var TarHeader = require("../lib/header.js") -var tar = require("../tar.js") -var fs = require("fs") - - -var headers = - { "a.txt file header": - [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'a.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 257 - , mtime: 1319493851 - , cksum: 5417 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "omega pax": // the extended header from omega tar. - [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'PaxHeader/Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 120 - , mtime: 1301254537 - , cksum: 6697 - , type: 'x' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "omega file header": - [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 2 - , mtime: 1301254537 - , cksum: 5690 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "foo.js file header": - [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'foo.js' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 4 - , mtime: 1301246433 - , cksum: 5519 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "b.txt file header": - [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'b.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 512 - , mtime: 1319494079 - , cksum: 5425 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "deep nested file": - [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true, - path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 100 - , mtime: 1319687003 - , cksum: 18124 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - } - -tap.test("parsing", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , header = new Buffer(h[0], "hex") - , expect = h[1] - , parsed = new TarHeader(header) - - // console.error(parsed) - t.has(parsed, expect, "parse " + name) - }) - t.end() -}) - -tap.test("encoding", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , expect = new Buffer(h[0], "hex") - , encoded = TarHeader.encode(h[1]) - - // might have slightly different bytes, since the standard - // isn't very strict, but should have the same semantics - // checkSum will be different, but cksumValid will be true - - var th = new TarHeader(encoded) - delete h[1].block - delete h[1].needExtended - delete h[1].cksum - t.has(th, h[1], "fields "+name) - }) - t.end() -}) - -// test these manually. they're a bit rare to find in the wild -tap.test("parseNumeric tests", function (t) { - var parseNumeric = TarHeader.parseNumeric - , numbers = - { "303737373737373700": 2097151 - , "30373737373737373737373700": 8589934591 - , "303030303036343400": 420 - , "800000ffffffffffff": 281474976710655 - , "ffffff000000000001": -281474976710654 - , "ffffff000000000000": -281474976710655 - , "800000000000200000": 2097152 - , "8000000000001544c5": 1393861 - , "ffffffffffff1544c5": -15383354 } - Object.keys(numbers).forEach(function (n) { - var b = new Buffer(n, "hex") - t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) - }) - t.end() -}) diff --git a/deps/npm/node_modules/tar/test/pack.js b/deps/npm/node_modules/tar/test/pack.js deleted file mode 100644 index 3fc808d04..000000000 --- a/deps/npm/node_modules/tar/test/pack.js +++ /dev/null @@ -1,953 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , path = require("path") - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. Rather than use - [ [ 'globalExtendedHeader', - { path: 'PaxHeader/', - mode: 438, - uid: 0, - gid: 0, - type: 'g', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { "NODETAR.author": pkg.author, - "NODETAR.name": pkg.name, - "NODETAR.description": pkg.description, - "NODETAR.version": pkg.version, - "NODETAR.repository.type": pkg.repository.type, - "NODETAR.repository.url": pkg.repository.url, - "NODETAR.main": pkg.main, - "NODETAR.scripts.test": pkg.scripts.test, - "NODETAR.engines.node": pkg.engines.node } ] - - , [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 402, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 13492, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 200, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 13475, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - mtime: new Date('Mon, 24 Oct 2011 22:04:11 GMT'), - cksum: 5114, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - mtime: new Date('Mon, 24 Oct 2011 22:07:59 GMT'), - cksum: 5122, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5119, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5222, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - mtime: new Date('Fri, 21 Oct 2011 21:19:29 GMT'), - cksum: 5211, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - mtime: new Date('Tue, 15 Nov 2011 03:10:09 GMT'), - cksum: 5554, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Tue, 15 Nov 2011 03:10:09 GMT'), - cksum: 7428, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - mtime: new Date('Fri, 21 Oct 2011 21:19:29 GMT'), - cksum: 5537, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - mtime: new Date('Mon, 14 Nov 2011 21:42:24 GMT'), - cksum: 6440, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - mtime: new Date("Sun, 06 May 2007 13:25:06 GMT"), - cksum: 6566, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 213, - mtime: new Date('Mon, 14 Nov 2011 21:39:39 GMT'), - cksum: 7306, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 2, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - mtime: new Date('Mon, 14 Nov 2011 21:39:39 GMT'), - cksum: 6297, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 4789, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 4937, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 5081, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 5236, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 5391, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 5559, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 5651, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 5798, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 5946, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 6094, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 6253, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 6345, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 6494, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 6652, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 6807, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 6954, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 7102, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 7263, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 7355, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 7514, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 7658, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:42:46 GMT'), - cksum: 7821, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 7967, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 17821, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - mode: 493, - uid: uid, - gid: gid, - size: 0, - mtime: new Date('Tue, 15 Nov 2011 19:57:48 GMT'), - cksum: 6337, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 204, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6399, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , "NODETAR.depth": "1" - , "NODETAR.type": "File" - , nlink: 1 - , uid: uid - , gid: gid - , size: 2 - , "NODETAR.blksize": "4096" - , "NODETAR.blocks": "8" } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5392, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - }) - - var pack = Pack(doGH ? pkg : null) - var writer = Writer(target) - - // skip the global header if we're not doing that. - var entry = doGH ? 0 : 1 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - // if (ev !== wanted[0] || e.path !== wanted[1].path) { - // console.error(wanted) - // console.error([ev, e.props]) - // throw "break" - // } - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - t.has(e.fields, wanted[2], "should get expected fields") - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/deps/npm/node_modules/tar/test/parse.js b/deps/npm/node_modules/tar/test/parse.js deleted file mode 100644 index f765a5012..000000000 --- a/deps/npm/node_modules/tar/test/parse.js +++ /dev/null @@ -1,359 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , index = 0 - - , expect = -[ [ 'entry', - { path: 'c.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5422, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'cc.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5525, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 18124, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 120, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6702, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'Ω.txt', - ctime: 1319737909, - atime: 1319739061, - dev: 234881026, - ino: 51693379, - nlink: 1 } ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), - dev: 234881026, - ino: 51693379, - nlink: 1 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1319686868, - atime: 1319741254, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14570, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 }, - undefined ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 1000, - gid: 1000, - size: 201, - mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), - cksum: 14086, - type: '0', - linkpath: '', - ustar: false }, - undefined ], - [ 'longLinkpath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4975, - type: 'K', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], - [ 'entry', - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: 511, - uid: 1000, - gid: 1000, - size: 0, - mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), - cksum: 21603, - type: '2', - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ustar: false }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 143, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 6533, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { ctime: 1320617144, - atime: 1320617232, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 5526, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1320617144, - atime: 1320617406, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 15173, - type: '1', - linkpath: '200-hard', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ] ] - - -tap.test("parser test", function (t) { - var parser = tar.Parse() - - parser.on("end", function () { - t.equal(index, expect.length, "saw all expected events") - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on("*", function (ev, entry) { - var wanted = expect[index] - if (!wanted) { - return t.fail("Unexpected event: " + ev) - } - var result = [ev, entry.props] - entry.on("end", function () { - result.push(entry.fields || entry.body) - - t.equal(ev, wanted[0], index + " event type") - t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") - if (wanted[2]) { - t.equivalent(result[2], wanted[2], "metadata values") - } - index ++ - }) - }) -}) diff --git a/deps/npm/package.json b/deps/npm/package.json index 3060e4d07..23fdd515a 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -2,7 +2,7 @@ , "publishConfig": { "tag": "alpha" } , "description": "A package manager for node" , "keywords": [ "package manager", "modules", "install", "package.json" ] -, "version": "1.1.0-alpha" +, "version": "1.1.0-alpha-2" , "preferGlobal": true , "config": { "publishtest": false } , "homepage": "http://npmjs.org/" @@ -32,16 +32,17 @@ , "graceful-fs": "1" , "minimatch": "0" , "nopt": "1" - , "node-uuid": "1.2" + , "node-uuid": "~1.3" , "proto-list": "1" , "rimraf": "1" - , "request": "~2.1.1" + , "request": "~2.2" , "which": "1" - , "tar": "0" - , "fstream": "0" + , "tar": "0.1 >=0.1.3" + , "fstream": "0.1" , "block-stream": "*" , "inherits": "1" , "mkdirp": "0.1" + , "fast-list": "1" } , "bundleDependencies": [ "slide" @@ -61,6 +62,7 @@ , "block-stream" , "inherits" , "mkdirp" + , "fast-list" ] , "devDependencies": { "ronn": "https://github.com/isaacs/ronnjs/tarball/master" } diff --git a/deps/npm/test/common.js b/deps/npm/test/common.js deleted file mode 100644 index 2755056b1..000000000 --- a/deps/npm/test/common.js +++ /dev/null @@ -1,7 +0,0 @@ - -// whatever, it's just tests. -;["util","assert"].forEach(function (thing) { - thing = require("thing") - for (var i in thing) global[i] = thing[i] -} - diff --git a/deps/npm/test/disabled/bundlerecurs/package.json b/deps/npm/test/disabled/bundlerecurs/package.json deleted file mode 100644 index d87041170..000000000 --- a/deps/npm/test/disabled/bundlerecurs/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ "name" : "bundletest" -, "version" : "1.0.0" -, "dependencies" : { "bundletest" : "*" } -} diff --git a/deps/npm/test/disabled/failer/package.json b/deps/npm/test/disabled/failer/package.json deleted file mode 100644 index e1f8e946b..000000000 --- a/deps/npm/test/disabled/failer/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ "name" : "failer" -, "version" : "9999.999.99" -, "dependencies" : { "base64" : "*" } -, "scripts" : { "preinstall" : "exit 1" } -} diff --git a/deps/npm/test/disabled/fast/package.json b/deps/npm/test/disabled/fast/package.json deleted file mode 100644 index fbf26e9b1..000000000 --- a/deps/npm/test/disabled/fast/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ "name" : "fast" -, "description" : "does nothing, and not very fast" -, "version" : "1.2.3" -, "scripts" : -{ "preinstall" : "sleep 1 && echo fast 1 $(date +%s) && echo fast 2" -, "install" : "sleep 1 && echo fast 2 $(date +%s) && echo fast 3" -, "postinstall" : "sleep 1 && echo fast 3 $(date +%s) && echo fast 4" -} -} diff --git a/deps/npm/test/disabled/package-config/package.json b/deps/npm/test/disabled/package-config/package.json deleted file mode 100644 index 7ec97d380..000000000 --- a/deps/npm/test/disabled/package-config/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{"name":"package-config" -,"version":"1.2.3" -,"config":{"foo":"bar"} -,"scripts":{"test":"./test.js"}} diff --git a/deps/npm/test/disabled/package-config/test.js b/deps/npm/test/disabled/package-config/test.js deleted file mode 100755 index 7337b237b..000000000 --- a/deps/npm/test/disabled/package-config/test.js +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node - -var env = process.env - , orig = require(process.env.npm_package_name+"/package.json").config - , assert = require("assert") - -console.log("Before running this test, do:\n" - +" npm config set package-config:foo boo\n" - +"or else it's about to fail.") -assert.equal(env.npm_package_config_foo, "boo", "foo != boo") -assert.equal(orig.foo, "bar", "original foo != bar") -assert.equal(env["npm_config_package-config:foo"], "boo", - "package-config:foo != boo") -console.log({ foo: env.npm_package_config_foo - , orig_foo: orig.foo - , "package-config:foo": env["npm_config_package-config:foo"] - }) diff --git a/deps/npm/test/disabled/slow/package.json b/deps/npm/test/disabled/slow/package.json deleted file mode 100644 index ba6be42fa..000000000 --- a/deps/npm/test/disabled/slow/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ "name" : "slow" -, "description" : "just like fast, but even slower" -, "version" : "1.2.3" -, "scripts" : - { "preinstall" : "sleep 1 && echo slow 1 $(date +%s) && sleep 1 && echo slow 2 $(date +%s)" - , "install" : "sleep 1 && echo slow 2 $(date +%s) && sleep 1 && echo slow 3 $(date +%s)" - , "postinstall" : "sleep 1 && echo slow 3 $(date +%s) && sleep 1 && echo slow 4 $(date +%s)" - } -} diff --git a/deps/npm/test/disabled/startstop/package.json b/deps/npm/test/disabled/startstop/package.json deleted file mode 100644 index bee2a2fd3..000000000 --- a/deps/npm/test/disabled/startstop/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{"name":"startstop" -,"version":"1.2.3" -,"scripts":{"start":"echo 'start'","stop":"echo 'stop'"}} diff --git a/deps/npm/test/packages/npm-test-blerg/package.json b/deps/npm/test/packages/npm-test-blerg/package.json deleted file mode 100644 index 374b4432b..000000000 --- a/deps/npm/test/packages/npm-test-blerg/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ "name":"npm-test-blerg" -, "version" : "0.0.0" -, "scripts" : { "test" : "node test.js" } -} diff --git a/deps/npm/test/packages/npm-test-blerg/test.js b/deps/npm/test/packages/npm-test-blerg/test.js deleted file mode 100644 index f548458ac..000000000 --- a/deps/npm/test/packages/npm-test-blerg/test.js +++ /dev/null @@ -1,5 +0,0 @@ - -var assert = require("assert") -assert.equal(undefined, process.env.npm_config__password, "password exposed!") -assert.equal(undefined, process.env.npm_config__auth, "auth exposed!") -assert.equal(undefined, process.env.npm_config__authCrypt, "authCrypt exposed!") diff --git a/deps/npm/test/packages/npm-test-env-reader/package.json b/deps/npm/test/packages/npm-test-env-reader/package.json deleted file mode 100644 index ddd5c91ab..000000000 --- a/deps/npm/test/packages/npm-test-env-reader/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "name":"npm-test-env-reader" -, "version" : "1.2.3" -, "scripts" : - { "install" : "./test.sh" - , "preinstall" : "./test.sh" - , "preuninstall" : "./test.sh" - , "postuninstall" : "./test.sh" - , "test" : "./test.sh" - , "stop" : "./test.sh" - , "start" : "./test.sh" - , "restart" : "./test.sh" - , "foo" : "./test.sh" - } -} diff --git a/deps/npm/test/packages/npm-test-env-reader/test.sh b/deps/npm/test/packages/npm-test-env-reader/test.sh deleted file mode 100755 index b4ca4374e..000000000 --- a/deps/npm/test/packages/npm-test-env-reader/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh -env | grep npm | sort | uniq -echo PATH=$PATH diff --git a/deps/npm/test/packages/npm-test-missing-bindir/package.json b/deps/npm/test/packages/npm-test-missing-bindir/package.json deleted file mode 100644 index 49e26742d..000000000 --- a/deps/npm/test/packages/npm-test-missing-bindir/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ "name":"npm-test-missing-bindir" -, "version" : "0.0.0" -, "scripts" : { "test" : "node test.js" } -, "directories": { "bin" : "./not-found" } } diff --git a/deps/npm/test/packages/npm-test-missing-bindir/test.js b/deps/npm/test/packages/npm-test-missing-bindir/test.js deleted file mode 100644 index f548458ac..000000000 --- a/deps/npm/test/packages/npm-test-missing-bindir/test.js +++ /dev/null @@ -1,5 +0,0 @@ - -var assert = require("assert") -assert.equal(undefined, process.env.npm_config__password, "password exposed!") -assert.equal(undefined, process.env.npm_config__auth, "auth exposed!") -assert.equal(undefined, process.env.npm_config__authCrypt, "authCrypt exposed!") diff --git a/deps/npm/test/packages/npm-test-private/package.json b/deps/npm/test/packages/npm-test-private/package.json deleted file mode 100644 index 3d95a37af..000000000 --- a/deps/npm/test/packages/npm-test-private/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{"name":"npm-test-private" -,"version":"9.9.9-9" -,"homepage":"http://www.youtube.com/watch?v=1MLry6Cn_D4" -,"private":"true"} diff --git a/deps/npm/test/packages/npm-test-test-package/package.json b/deps/npm/test/packages/npm-test-test-package/package.json deleted file mode 100644 index c5c5aeabc..000000000 --- a/deps/npm/test/packages/npm-test-test-package/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ "name":"npm-test-test-package" -, "author" : "Testy McMock" -, "version" : "1.2.3-99-b" -, "description" : "This is a test package used for debugging. It has some random data and that's all." -} diff --git a/deps/npm/test/packages/npm-test-url-dep/package.json b/deps/npm/test/packages/npm-test-url-dep/package.json deleted file mode 100644 index 72a139e54..000000000 --- a/deps/npm/test/packages/npm-test-url-dep/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ "name":"npm-test-url-dep" -, "version" : "1.2.3" -, "dependencies" : - { "dnode" : "https://github.com/substack/dnode/tarball/master" } } diff --git a/deps/npm/test/run b/deps/npm/test/run deleted file mode 100755 index 2443726db..000000000 --- a/deps/npm/test/run +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/bash - -if [ "$DEBUG" != "" ]; then - set -x -fi - - -# the "npm" command is set to a custom function here so that we can -# test the code in this repo, rather than whichever version of npm -# happens to be installed. - -main () { - # setup - FAILURES=0 - - cd "$TESTDIR" - - npm config ls - - # install - npm install "$NPMPKG" || exit 1 - - # used in test later - npm config set package-config:foo boo || exit 1 - - npm install $( ls packages | awk '{print "packages/" $1 }' ) || exit 1 - (ls packages | while read pkg; do - npm test "$pkg" - done) || exit 1 - if [ "$FAILURES" == "0" ]; then - npm rm $(ls packages) npm || exit 1 - fi - cleanup - - if ! [ "$npm_package_config_publishtest" == "true" ]; then - echo_err "To test publishing: npm config set npm:publishtest true" - else - # attempt to publish and unpublish each of them. - npm install "$NPMPKG" || exit 1 - - (ls packages | grep -v 'npm-test-private' | while read pkg; do - npm publish packages/$pkg || exit 1 - npm install $pkg || exit 1 - npm unpublish $pkg || exit 1 - done) || exit 1 - - # verify that the private package can't be published - # bypass the test-harness npm function. - "$NPMCLI" publish packages/npm-test-private && ( - npm unpublish npm-test-private - exit 1000 - ) - if [ $? -eq 1000 ]; then - fail "Private package shouldn't be publishable" >&2 - fi - - if [ "$FAILURES" == "0" ]; then - npm rm $(ls packages) npm || exit 1 - fi - cleanup - - fi - - if [ $FAILURES -eq 0 ]; then - echo_err "ok" - rm -rf $TMP - else - echo_err "FAILED: $FAILURES" - fi - exit $FAILURES -} - - - -#################### -# Test Harness below - -# fake functions -npm () { - echo -e "npm $@" - "$NPMCLI" "$@" \ - || fail npm "$@" -} - -# get the absolute path of the executable -SELF_PATH="$0" -if [ "${SELF_PATH:0:1}" != "." ] && [ "${SELF_PATH:0:1}" != "/" ]; then - SELF_PATH=./"$SELF_PATH" -fi -SELF_PATH=$( cd -P -- "$(dirname -- "$SELF_PATH")" \ - && pwd -P \ - ) && SELF_PATH=$SELF_PATH/$(basename -- "$0") -# resolve symlinks -while [ -h "$SELF_PATH" ]; do - DIR=$(dirname -- "$SELF_PATH") - SYM=$(readlink -- "$SELF_PATH") - SELF_PATH=$( cd -- "$DIR" \ - && cd -- $(dirname -- "$SYM") \ - && pwd \ - )/$(basename -- "$SYM") -done -NPMPKG="$(dirname -- "$(dirname -- "$SELF_PATH")")" -NPMCLI="$NPMPKG/cli.js" -TESTDIR="$NPMPKG/test/" -TMP=${TMPDIR:-/tmp} -rm -rf $TMP/npm* -TMP=$TMP/npm-test-$$ -echo "Testing in $TMP ..." -ROOTDIR="$TMP/root" - -cleanup () { - if [ "$FAILURES" != "0" ] && [ "$FAILURES" != "" ]; then - return - fi - [ -d "$ROOTDIR" ] && rm -rf -- "$ROOTDIR" - mkdir -p -- "$ROOTDIR" -} - -export npm_config_prefix="$ROOTDIR" -export npm_config_color="always" -export npm_config_global=true -# have to set this to false, or it'll try to test itself forever -export npm_config_npat=false -export PATH="$PATH":"$ROOTDIR/bin":"$ROOTDIR/node_modules/.bin" -export NODE_PATH="$ROOTDIR/node_modules" - -echo_err () { - echo "$@" >&2 -} -fail () { - let 'FAILURES += 1' - echo_err "" - echo_err -e "\033[33mFailure: $@\033[m" - exit 1 -} - -cleanup -main diff --git a/deps/npm/test/update-test.sh b/deps/npm/test/update-test.sh deleted file mode 100755 index f72c90dd9..000000000 --- a/deps/npm/test/update-test.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -SELF_PATH="$0" -if [ "${SELF_PATH:0:1}" != "." ] && [ "${SELF_PATH:0:1}" != "/" ]; then - SELF_PATH=./"$SELF_PATH" -fi -SELF_PATH=$( cd -P -- "$(dirname -- "$SELF_PATH")" \ - && pwd -P \ - ) && SELF_PATH=$SELF_PATH/$(basename -- "$0") - -# resolve symlinks -while [ -h "$SELF_PATH" ]; do - DIR=$(dirname -- "$SELF_PATH") - SYM=$(readlink -- "$SELF_PATH") - SELF_PATH=$( cd -- "$DIR" \ - && cd -- $(dirname -- "$SYM") \ - && pwd \ - )/$(basename -- "$SYM") -done -DIR=$( dirname -- "$SELF_PATH" ) - -export npm_config_root=$DIR/root -export npm_config_binroot=$DIR/bin - -rm -rf $DIR/{root,bin} -mkdir -p $DIR/root -mkdir -p $DIR/bin -npm ls installed 2>/dev/null | grep -v npm | awk '{print $1}' | xargs npm rm &>/dev/null -npm install \ - base64@1.0.0 \ - eyes@0.1.1 \ - vows@0.2.5 \ - websocket-server@1.0.5 &>/dev/null -npm install ./test/packages/blerg &>/dev/null -npm install vows@0.3.0 &>/dev/null - -echo "" -echo "##" -echo "## starting update" -echo "##" -echo "" - -npm update - -echo "" -echo "##" -echo "## update done, all should be 'latest'" -echo "##" -echo "" - -list=$( npm ls installed remote 2>/dev/null ) -echo "$list" -notlatest=$( echo "$list" | grep -v latest ) -if [ "$notlatest" != "" ]; then - echo "Failed: not latest" - echo $notlatest -else - echo "ok" -fi From e5cf3f9751c32143e898bf1cd818d42a4f6f1407 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 22 Nov 2011 16:10:32 -0800 Subject: [PATCH 05/26] Fixes #2083. Support installing npm in the .msi --- .gitignore | 2 ++ tools/msvs/msi/nodemsi.wixproj | 8 +++++--- tools/msvs/msi/product.wxs | 6 ++++++ vcbuild.bat | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2b27112ac..48513041d 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ ipch/ *-nodegyp* /gyp-mac-tool /dist-osx +/npm.wxs +/tools/msvs/npm.wixobj diff --git a/tools/msvs/msi/nodemsi.wixproj b/tools/msvs/msi/nodemsi.wixproj index 8ac7a3e3a..e45372457 100644 --- a/tools/msvs/msi/nodemsi.wixproj +++ b/tools/msvs/msi/nodemsi.wixproj @@ -1,4 +1,5 @@  + Debug @@ -15,15 +16,16 @@ ..\..\..\$(Configuration)\ obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion) + Debug;ProductVersion=$(NodeVersion);NPMSourceDir=..\..\..\deps\npm\ ..\..\..\$(Configuration)\ obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion) + Debug;ProductVersion=$(NodeVersion);NPMSourceDir=..\..\..\deps\npm\ + @@ -40,4 +42,4 @@ --> - \ No newline at end of file + diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index e3fa2ecd4..d3586e332 100644 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -17,6 +17,7 @@ + + + + @@ -37,6 +41,8 @@ + + diff --git a/vcbuild.bat b/vcbuild.bat index 709d71ce7..8bd93164a 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -83,6 +83,7 @@ if not defined msi goto run python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt" if not errorlevel 0 echo Cannot determine current version of node.js & goto exit for /F "tokens=*" %%i in (%temp%\node_version.txt) do set NODE_VERSION=%%i +heat dir deps\npm -var var.NPMSourceDir -dr NodeModulesFolder -cg NPMFiles -gg -template fragment -nologo -out npm.wxs msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /t:Clean,Build /p:Configuration=%config% /p:NodeVersion=%NODE_VERSION% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit From 055a933fa9ecc3df2aefd6ea74dfb7c9fce684d7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 22 Nov 2011 18:17:12 -0800 Subject: [PATCH 06/26] Add exe and msi signing to vcbuild.bat --- vcbuild.bat | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index 8bd93164a..38a1951b9 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -16,6 +16,7 @@ set config=Debug set target=Build set noprojgen= set nobuild= +set nosign= set test= set test_args= set msi= @@ -28,6 +29,7 @@ if /i "%1"=="release" set config=Release&goto arg-ok if /i "%1"=="clean" set target=Clean&goto arg-ok if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok if /i "%1"=="nobuild" set nobuild=1&goto arg-ok +if /i "%1"=="nosign" set nosign=1&goto arg-ok if /i "%1"=="test-uv" set test=test-uv&goto arg-ok if /i "%1"=="test-internet"set test=test-internet&goto arg-ok if /i "%1"=="test-pummel" set test=test-pummel&goto arg-ok @@ -77,6 +79,9 @@ goto run msbuild node.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit +if defined nosign goto msi +signtool sign /a Release\node.exe + :msi @rem Skip msi generation if not requested if not defined msi goto run @@ -87,6 +92,9 @@ heat dir deps\npm -var var.NPMSourceDir -dr NodeModulesFolder -cg NPMFiles -gg - msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /t:Clean,Build /p:Configuration=%config% /p:NodeVersion=%NODE_VERSION% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit +if defined nosign goto run +signtool sign /a Release\node.msi + :run @rem Run tests if requested. if "%test%"=="" goto exit @@ -123,7 +131,7 @@ scp Release\node.pdb node@nodejs.org:~/web/nodejs.org/dist/v%NODE_VERSION%/node. goto exit :help -echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [nobuild] +echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [nobuild] [nosign] echo Examples: echo vcbuild.bat : builds debug build echo vcbuild.bat release msi : builds release build and MSI installer package From b906e8599662bae8bd518b0f5b732ade54468e05 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 22 Nov 2011 19:23:41 -0800 Subject: [PATCH 07/26] Fixes #2076. Add logos to MSI --- doc/windows_banner_nodejs_installer_logo.jpg | Bin 0 -> 5031 bytes doc/windows_dialog_nodejs_installer_logo.jpg | Bin 0 -> 12170 bytes tools/msvs/msi/product.wxs | 3 +++ 3 files changed, 3 insertions(+) create mode 100644 doc/windows_banner_nodejs_installer_logo.jpg create mode 100644 doc/windows_dialog_nodejs_installer_logo.jpg diff --git a/doc/windows_banner_nodejs_installer_logo.jpg b/doc/windows_banner_nodejs_installer_logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2dfb59a647900c56af0c0980eaa6b350ed2187b6 GIT binary patch literal 5031 zcmcImcQ{;I*FR%0N_3J4L6jguqC^WOO}|l6NC=Ze?>$DFQLc#I2?>H|QHCHA!3aVS zSMPO33nFHeF_`j=d+&R{=lTBn+Pn5yd;gwu)>?c0)_Ts_hdM!B05}bF^mPCb2n6WS z20+CC-?ZUQ_5g7EHgEv|044we;s(Gp1fmT9bOvDf69d3gkib9K86@?$4IRx!9-z$t z2Ti>}3V&i=8V-+g0_gwt&7iHvLfi2;>R+pg6Wq?#?TN34w}^t=WdKmPEHAH4yA%{e zFB^;(sR8 zR)C8MPzP;-L81U17YNJ+qILknH0BJnx*wPRZvoMP=@}Ryw47LJ2KAf(9S97jqX*OS zr4cy)NmYmNdcBAGC-*3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0bW5#?qss}j#Qp)0U*psp5xfnvWu}?Jx*&;{z0^@H2 zEp7&9VTeqoVG`M?}Mx?rSSZUg^;~60% zslxPDVZpmnfa8g|V?jN5$s>UZ)ReR#+rU7R4|sQ^>T^bg%@(<@YtmXd|jN}nIrUy34}VT{6F^G@w|X*O6)dz2#9|6Al* za;J}VmbNz*r{u*tpHS{F8c@=Rcz)lptzbX1|J|;J(rvtdC;gh@OV literal 0 HcmV?d00001 diff --git a/doc/windows_dialog_nodejs_installer_logo.jpg b/doc/windows_dialog_nodejs_installer_logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..716791d6477c1e959cac52a5ce36b556bbf923eb GIT binary patch literal 12170 zcmeHtcUV))*7t^>K@gE%B}x$y0RfRtM5T#>C>4d5&Q0L%cGffE4HYYg-QU=Rcj{ZR*idkjK<)m<6R z{Mm<*-bWswp8<9{`7kK_QRk-D!y;V(ra$jZrhn7RvEO|Z{`q~=1@7eTVgJa>=cIz{ zdHRL(^73l*kAlKUdDY*Qi}bFbY=(dQ6O9G{*^K`jkzp+x^jBTw_t>;C;0nO_yDIGXj3A~% zhr#q`Vx@PeJPt52fIy5)Ao}yt1;-FVzYZ{Q9O67BuYH)y#2zf_&8-lc@P=9Ja#=Ia zt$w_?;ys_RBP_gp`~rd!rzOuwoxPxRQCUS*?aEahT|Iq+Yqw3!%q=XftQ{Pk?mItl zarJ%V=N|wM3<`e|@ia0jIwmpc#mnTBSE*?^xq0~og>Q@AeJro2tg5c5{nXOh*51+C z)!j2NIP`rO_hV#qYIIOwY@{!CGGA1=8HZ*|6uDc&i)Hu9CW@InV3LK z;NN^PFb2>G#KCmvl>A{%Z4@UXt=4%u<3Syv79*6^g0u*vi%o*T6^dA}gM+g3+1OL&1|7IO1a1UxZvl9u+NKzD%u$+MwDNil`lq-U*EDg3xv-&3WZLTy1;^P(^n zbwAeaeAK4(yKj>Ofsy~Fc?8X8jj^SoCeu*7F^Po-vhvS^g`&z~k0)4>N@N3)@^o`C z9Mpy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E;it!Y<@r5y zm(CYarvtRsI?FIVDZ+E?EX%cI=w>V(`kY$a)wrpGZa?|PY2Q3ajF z;Y}v3(%NnlZ|OP8wT#d|R_A}O(El&UX; z3>tjz;3Z1@<}=r;@Bh@ysBM9k4rZljZ0}&K`X8Nuw2qz&LdMy96pp?^eT^x z=RfyG#5BntZg88{=&V1cu;I~R^^%j2!#42X=1+%Hr+$hYYV#j{_yqhDZLYB+p0<1@ z=PhH*ne4x)o(4=ywrntv&G1)8!SQ6(!j)m!Jl!q5=xmj#+~8VmMq+$#rW?G-D3paLVOU=E_hQCGFM;iK zxL@4*0q)n~{(HX*-94l`^8yGZe07{hYNe2PxJl>wMz)aC33{#@?)&QlLJSXU(c;GP z^|HFDg}v@n8klp~m(}lU;I?>qTkP{flx4KZv#em0_1?PA=R=pxG;_mhSF-Ks+q)le TSD4rq4biux0RNRxw2}V-3%1=z literal 0 HcmV?d00001 diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index d3586e332..4071b79da 100644 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -81,9 +81,12 @@ + + + From ce3ccc8d5ac62f6e583d6eec04598c117e676eef Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 23 Nov 2011 12:54:45 +0100 Subject: [PATCH 08/26] build: fix circular dependency in doc target --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 16c035f7f..031f70a7d 100644 --- a/Makefile +++ b/Makefile @@ -89,10 +89,7 @@ website_files = \ out/doc/favicon.ico \ out/doc/pipe.css -doc: doc - -out/doc: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) - +doc docs: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) $(apidoc_dirs): mkdir -p $@ From 16889e22cc89721807bf166833d4e11dc1d8230a Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 23 Nov 2011 12:55:49 +0100 Subject: [PATCH 09/26] docs: fix dgram markdown --- doc/api/dgram.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/dgram.markdown b/doc/api/dgram.markdown index 6daf4a724..d057b412f 100644 --- a/doc/api/dgram.markdown +++ b/doc/api/dgram.markdown @@ -23,7 +23,7 @@ are created. Emitted when a socket is closed with `close()`. No new `message` events will be emitted on this socket. -#### Event: 'error' +### Event: 'error' `function (exception) {}` From cbcf4fe768fc9e046d18e58510c77de17c83ed4d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 24 Nov 2011 02:19:54 +0100 Subject: [PATCH 10/26] Don't die when arguments are passed to process.cwd() --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 4664287d0..1f5e2c9ab 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1163,9 +1163,9 @@ static Handle Chdir(const Arguments& args) { return Undefined(); } + static Handle Cwd(const Arguments& args) { HandleScope scope; - assert(args.Length() == 0); char *r = getcwd(getbuf, ARRAY_SIZE(getbuf) - 1); if (r == NULL) { From 86fba381fdeadc00921d34024bdef357e6a56e6e Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 24 Nov 2011 02:38:34 +0100 Subject: [PATCH 11/26] Windows: correctly resolve drive-relative paths --- lib/path.js | 28 +++++++++----------- src/node.cc | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 16 deletions(-) diff --git a/lib/path.js b/lib/path.js index c843d53dd..162a15fc2 100644 --- a/lib/path.js +++ b/lib/path.js @@ -86,7 +86,18 @@ if (isWindows) { resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); + var path; + if (i >= 0) { + path = arguments[i]; + } else if (!resolvedDevice) { + path = process.cwd(); + } else { + // Windows has the concept of drive-specific current working + // directories. If we've resolved a drive letter but not yet an + // absolute path, get cwd for that drive. We're sure the device is not + // an unc path at this points, because unc paths are always absolute. + path = process._cwdForDrive(resolvedDevice[0]); + } // Skip empty and invalid entries if (typeof path !== 'string' || !path) { @@ -119,21 +130,6 @@ if (isWindows) { } } - if (!resolvedAbsolute && resolvedDevice) { - // If we still don't have an absolute path, - // prepend the current path for the device found. - - // TODO - // Windows stores the current directories for 'other' drives - // as hidden environment variables like =C:=c:\windows (literally) - // var deviceCwd = os.getCwdForDrive(resolvedDevice); - var deviceCwd = ''; - - // If there is no cwd set for the drive, it is at root - resolvedTail = deviceCwd + '\\' + resolvedTail; - resolvedAbsolute = true; - } - // Replace slashes (in UNC share name) by backslashes resolvedDevice = resolvedDevice.replace(/\//g, '\\'); diff --git a/src/node.cc b/src/node.cc index 1f5e2c9ab..d61fd82a9 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1178,6 +1178,76 @@ static Handle Cwd(const Arguments& args) { return scope.Close(cwd); } +#ifdef _WIN32 +static Handle CwdForDrive(const Arguments& args) { + HandleScope scope; + + if (args.Length() < 1) { + Local exception = Exception::Error( + String::New("process._cwdForDrive takes exactly 1 argument.")); + return ThrowException(exception); + } + + Local driveLetter = args[0]->ToString(); + if (driveLetter->Length() != 1) { + Local exception = Exception::Error( + String::New("Drive name should be 1 character.")); + return ThrowException(exception); + } + + char drive; + + driveLetter->WriteAscii(&drive, 0, 1, 0); + if (drive >= 'a' && drive <= 'z') { + // Convert to uppercase + drive += 'A' - 'a'; + } else if (drive < 'A' || drive > 'Z') { + // Not a letter + Local exception = Exception::Error( + String::New("Drive name should be a letter.")); + return ThrowException(exception); + } + + WCHAR env_key[] = L"=X:"; + env_key[1] = (WCHAR) drive; + + DWORD len = GetEnvironmentVariableW(env_key, NULL, 0); + if (len == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) { + // There is no current directory for that drive. Default to drive + ":\". + Local cwd = String::Concat(String::New(&drive, 1), + String::New(":\\")); + return scope.Close(cwd); + + } else if (len == 0) { + // Error + Local exception = Exception::Error( + String::New(winapi_strerror(GetLastError()))); + return ThrowException(exception); + } + + WCHAR* buffer = new WCHAR[len]; + if (buffer == NULL) { + Local exception = Exception::Error( + String::New("Out of memory.")); + return ThrowException(exception); + } + + DWORD len2 = GetEnvironmentVariableW(env_key, buffer, len); + if (len2 == 0 || len2 >= len) { + // Error + delete[] buffer; + Local exception = Exception::Error( + String::New(winapi_strerror(GetLastError()))); + return ThrowException(exception); + } + + Local cwd = String::New(reinterpret_cast(buffer), len2); + delete[] buffer; + return scope.Close(cwd); +} +#endif + + static Handle Umask(const Arguments& args) { HandleScope scope; unsigned int old; @@ -1931,6 +2001,10 @@ Handle SetupProcessObject(int argc, char *argv[]) { NODE_SET_METHOD(process, "chdir", Chdir); NODE_SET_METHOD(process, "cwd", Cwd); +#ifdef _WIN32 + NODE_SET_METHOD(process, "_cwdForDrive", CwdForDrive); +#endif + NODE_SET_METHOD(process, "umask", Umask); #ifdef __POSIX__ From 83152d174cbba36f967cab775260262d98706475 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 24 Nov 2011 17:00:53 +0100 Subject: [PATCH 12/26] Dgram: correctly report recvmsg errors --- lib/dgram.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dgram.js b/lib/dgram.js index 435644709..26e0a2a3e 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -300,7 +300,7 @@ function onMessage(handle, nread, buf, rinfo) { var self = handle.socket; if (nread == -1) { - self.emit('error', errnoException('recvmsg')); + self.emit('error', errnoException(errno, 'recvmsg')); } else { rinfo.size = buf.length; // compatibility From a639cf7d84c49a963f628db6fc9f2118a00f4efd Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 24 Nov 2011 19:56:41 +0100 Subject: [PATCH 13/26] Add test for GH-2177 --- test/simple/test-dgram-send-error.js | 81 ++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 test/simple/test-dgram-send-error.js diff --git a/test/simple/test-dgram-send-error.js b/test/simple/test-dgram-send-error.js new file mode 100644 index 000000000..803a371fc --- /dev/null +++ b/test/simple/test-dgram-send-error.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. + +// Some operating systems report errors when an UDP message is sent to an +// unreachable host. This error can be reported by sendto() and even by +// recvfrom(). Node should not propagate this error to the user. + +// We test this by sending a bunch of packets to random IPs. In the meantime +// we also send packets to ourselves to verify that after receiving an error +// we can still receive packets successfully. + +var ITERATIONS = 1000; + +var assert = require('assert'), + common = require('../common'), + dgram = require('dgram'); + +var buf = new Buffer(1024); +buf.fill(42); + +var packetsReceived = 0, + packetsSent = 0; + +var socket = dgram.createSocket('udp4'); + +socket.on('message', onMessage); +socket.on('listening', doSend); +socket.bind(common.PORT); + +function onMessage(message, info) { + packetsReceived++; + if (packetsReceived < ITERATIONS) { + doSend(); + } else { + socket.close(); + } +} + +function afterSend(err) { + if (err) throw err; + packetsSent++; +} + +function doSend() { + // Generate a random IP. + var parts = []; + for (var i = 0; i < 4; i++) { + // Generate a random number in the range 1..254. + parts.push(Math.floor(Math.random() * 254) + 1); + } + var ip = parts.join('.'); + + socket.send(buf, 0, buf.length, 1, ip, afterSend); + socket.send(buf, 0, buf.length, common.PORT, '127.0.0.1', afterSend); +} + +process.on('exit', function() { + console.log(packetsSent + ' UDP packets sent, ' + + packetsReceived + ' received'); + + assert.strictEqual(packetsSent, ITERATIONS * 2); + assert.strictEqual(packetsReceived, ITERATIONS); +}); From 7244b9cee8d77144507af6f5d9a71f9af11df888 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 24 Nov 2011 19:57:17 +0100 Subject: [PATCH 14/26] Upgrade libuv to ea63f06 --- deps/uv/src/unix/cygwin.c | 1 + deps/uv/src/unix/fs.c | 2 +- deps/uv/src/unix/internal.h | 4 ++++ deps/uv/src/win/udp.c | 40 ++++++++++++++++++++++++++----------- deps/uv/src/win/winsock.c | 4 +++- 5 files changed, 37 insertions(+), 14 deletions(-) diff --git a/deps/uv/src/unix/cygwin.c b/deps/uv/src/unix/cygwin.c index 024e7d5bf..25ff02c9f 100644 --- a/deps/uv/src/unix/cygwin.c +++ b/deps/uv/src/unix/cygwin.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #undef NANOSEC diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c index 57664c83c..2ce38f140 100644 --- a/deps/uv/src/unix/fs.c +++ b/deps/uv/src/unix/fs.c @@ -518,11 +518,11 @@ static int _futime(const uv_file file, double atime, double mtime) { int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file file, double atime, double mtime, uv_fs_cb cb) { -#if HAVE_FUTIMES const char* path = NULL; uv_fs_req_init(loop, req, UV_FS_FUTIME, path, cb); +#if HAVE_FUTIMES WRAP_EIO(UV_FS_FUTIME, eio_futime, _futime, ARGS3(file, atime, mtime)) #else uv__set_sys_error(loop, ENOSYS); diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h index 12ab62177..80df6a837 100644 --- a/deps/uv/src/unix/internal.h +++ b/deps/uv/src/unix/internal.h @@ -27,6 +27,10 @@ #include /* offsetof */ +#if __STRICT_ANSI__ +# define inline __inline +#endif + #undef HAVE_FUTIMES #undef HAVE_PIPE2 #undef HAVE_ACCEPT4 diff --git a/deps/uv/src/win/udp.c b/deps/uv/src/win/udp.c index 07082ddb5..3beb8ab9e 100644 --- a/deps/uv/src/win/udp.c +++ b/deps/uv/src/win/udp.c @@ -466,17 +466,31 @@ void uv_process_udp_recv_req(uv_loop_t* loop, uv_udp_t* handle, handle->flags &= ~UV_HANDLE_READ_PENDING; - if (!REQ_SUCCESS(req) && - GET_REQ_SOCK_ERROR(req) != WSAEMSGSIZE) { - /* An error occurred doing the read. */ - if (handle->flags & UV_HANDLE_READING) { - uv__set_sys_error(loop, GET_REQ_SOCK_ERROR(req)); - uv_udp_recv_stop(handle); - buf = (handle->flags & UV_HANDLE_ZERO_READ) ? - uv_buf_init(NULL, 0) : handle->recv_buffer; - handle->recv_cb(handle, -1, buf, NULL, 0); + if (!REQ_SUCCESS(req)) { + DWORD err = GET_REQ_SOCK_ERROR(req); + if (err == WSAEMSGSIZE) { + /* Not a real error, it just indicates that the received packet */ + /* was bigger than the receive buffer. */ + } else if (err == WSAECONNRESET || err == WSAENETRESET) { + /* A previous sendto operation failed; ignore this error. If */ + /* zero-reading we need to call WSARecv/WSARecvFrom _without_ the */ + /* MSG_PEEK flag to clear out the error queue. For nonzero reads, */ + /* immediately queue a new receive. */ + if (!(handle->flags & UV_HANDLE_ZERO_READ)) { + goto done; + } + } else { + /* A real error occurred. Report the error to the user only if we're */ + /* currently reading. */ + if (handle->flags & UV_HANDLE_READING) { + uv__set_sys_error(loop, err); + uv_udp_recv_stop(handle); + buf = (handle->flags & UV_HANDLE_ZERO_READ) ? + uv_buf_init(NULL, 0) : handle->recv_buffer; + handle->recv_cb(handle, -1, buf, NULL, 0); + } + goto done; } - goto done; } if (!(handle->flags & UV_HANDLE_ZERO_READ)) { @@ -527,8 +541,10 @@ void uv_process_udp_recv_req(uv_loop_t* loop, uv_udp_t* handle, /* Kernel buffer empty */ uv__set_sys_error(loop, WSAEWOULDBLOCK); handle->recv_cb(handle, 0, buf, NULL, 0); - } else { - /* Ouch! serious error. */ + } else if (err != WSAECONNRESET && err != WSAENETRESET) { + /* Serious error. WSAECONNRESET/WSANETRESET is ignored because this */ + /* just indicates that a previous sendto operation failed. */ + uv_udp_recv_stop(handle); uv__set_sys_error(loop, err); handle->recv_cb(handle, -1, buf, NULL, 0); } diff --git a/deps/uv/src/win/winsock.c b/deps/uv/src/win/winsock.c index 5309f1eed..78acba909 100644 --- a/deps/uv/src/win/winsock.c +++ b/deps/uv/src/win/winsock.c @@ -144,6 +144,7 @@ int uv_ntstatus_to_winsock_error(NTSTATUS status) { case STATUS_LINK_FAILED: case STATUS_CONNECTION_DISCONNECTED: case STATUS_PORT_UNREACHABLE: + case STATUS_HOPLIMIT_EXCEEDED: return WSAECONNRESET; case STATUS_LOCAL_DISCONNECT: @@ -206,7 +207,8 @@ int uv_ntstatus_to_winsock_error(NTSTATUS status) { return WSAEACCES; default: - if (status & ((FACILITY_NTWIN32 << 16) | ERROR_SEVERITY_ERROR)) { + if ((status & (FACILITY_NTWIN32 << 16)) == (FACILITY_NTWIN32 << 16) && + (status & (ERROR_SEVERITY_ERROR | ERROR_SEVERITY_WARNING))) { /* It's a windows error that has been previously mapped to an */ /* ntstatus code. */ return (DWORD) (status & 0xffff); From 55a8a3aad47592e10f3689f579eec1d320ae47aa Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 25 Nov 2011 00:55:10 +0100 Subject: [PATCH 15/26] test: better fs.lchmod() availability check fs.lchmod() is a BSD-ism, not a "not Windows"-ism. --- test/simple/test-fs-chmod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/simple/test-fs-chmod.js b/test/simple/test-fs-chmod.js index 436ab734f..b8dfd5f98 100644 --- a/test/simple/test-fs-chmod.js +++ b/test/simple/test-fs-chmod.js @@ -127,7 +127,7 @@ fs.open(file, 'a', function(err, fd) { }); // lchmod -if (!is_windows) { +if (fs.lchmod) { var link = path.join(common.tmpDir, 'symbolic-link'); try { From d51a0c353b1ca58a164b7a141ac9c81d502ef42c Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 01:01:17 +0100 Subject: [PATCH 16/26] Upgrade libuv to 45b976a --- deps/uv/src/win/error.c | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/uv/src/win/error.c b/deps/uv/src/win/error.c index 3db97a10f..12ce4d1b5 100644 --- a/deps/uv/src/win/error.c +++ b/deps/uv/src/win/error.c @@ -69,6 +69,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case ERROR_SUCCESS: return UV_OK; case ERROR_FILE_NOT_FOUND: return UV_ENOENT; case ERROR_PATH_NOT_FOUND: return UV_ENOENT; + case ERROR_ACCESS_DENIED: return UV_EACCES; case ERROR_NOACCESS: return UV_EACCES; case WSAEACCES: return UV_EACCES; case ERROR_ADDRESS_ALREADY_ASSOCIATED: return UV_EADDRINUSE; From 236b217cd705d03713c467b49d4c063f69187ddb Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 01:25:38 +0100 Subject: [PATCH 17/26] Fix issues with test-fs-chmod - The test simultaneously chmods and fchmods the same file. - On windows, it leaves behind a fixture in read-only mode, which causes test-fs-fsync to fail. --- test/simple/test-fs-chmod.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/test/simple/test-fs-chmod.js b/test/simple/test-fs-chmod.js index b8dfd5f98..12fd820f3 100644 --- a/test/simple/test-fs-chmod.js +++ b/test/simple/test-fs-chmod.js @@ -65,38 +65,39 @@ function closeSync() { // On Windows chmod is only able to manipulate read-only bit if (is_windows) { - mode_async = 0600; // read-write - mode_sync = 0400; // read-only + mode_async = 0400; // read-only + mode_sync = 0600; // read-write } else { mode_async = 0777; mode_sync = 0644; } -var file = path.join(common.fixturesDir, 'a.js'); +var file1 = path.join(common.fixturesDir, 'a.js'), + file2 = path.join(common.fixturesDir, 'a1.js'); -fs.chmod(file, mode_async.toString(8), function(err) { +fs.chmod(file1, mode_async.toString(8), function(err) { if (err) { got_error = true; } else { - console.log(fs.statSync(file).mode); + console.log(fs.statSync(file1).mode); if (is_windows) { - assert.ok((fs.statSync(file).mode & 0777) & mode_async); + assert.ok((fs.statSync(file1).mode & 0777) & mode_async); } else { - assert.equal(mode_async, fs.statSync(file).mode & 0777); + assert.equal(mode_async, fs.statSync(file1).mode & 0777); } - fs.chmodSync(file, mode_sync); + fs.chmodSync(file1, mode_sync); if (is_windows) { - assert.ok((fs.statSync(file).mode & 0777) & mode_sync); + assert.ok((fs.statSync(file1).mode & 0777) & mode_sync); } else { - assert.equal(mode_sync, fs.statSync(file).mode & 0777); + assert.equal(mode_sync, fs.statSync(file1).mode & 0777); } success_count++; } }); -fs.open(file, 'a', function(err, fd) { +fs.open(file2, 'a', function(err, fd) { if (err) { got_error = true; console.error(err.stack); @@ -133,7 +134,7 @@ if (fs.lchmod) { try { fs.unlinkSync(link); } catch (er) {} - fs.symlinkSync(file, link); + fs.symlinkSync(file2, link); fs.lchmod(link, mode_async, function(err) { if (err) { From 95eb729e6fff5c06ce2825381d9ed875be1b8508 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 02:13:37 +0100 Subject: [PATCH 18/26] Upgrade libuv to 3a50f8f --- deps/uv/src/win/getaddrinfo.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/deps/uv/src/win/getaddrinfo.c b/deps/uv/src/win/getaddrinfo.c index f0d854216..a97a0b91e 100644 --- a/deps/uv/src/win/getaddrinfo.c +++ b/deps/uv/src/win/getaddrinfo.c @@ -117,7 +117,7 @@ void uv_process_getaddrinfo_req(uv_loop_t* loop, uv_getaddrinfo_t* handle, struct addrinfo* addrinfo_ptr; char* alloc_ptr = NULL; char* cur_ptr = NULL; - uv_err_code uv_ret; + int status = 0; /* release input parameter memory */ if (handle->alloc != NULL) { @@ -125,7 +125,6 @@ void uv_process_getaddrinfo_req(uv_loop_t* loop, uv_getaddrinfo_t* handle, handle->alloc = NULL; } - uv_ret = uv_translate_eai_error(handle->retcode); if (handle->retcode == 0) { /* convert addrinfoW to addrinfo */ /* first calculate required length */ @@ -136,7 +135,8 @@ void uv_process_getaddrinfo_req(uv_loop_t* loop, uv_getaddrinfo_t* handle, if (addrinfow_ptr->ai_canonname != NULL) { name_len = uv_utf16_to_utf8(addrinfow_ptr->ai_canonname, -1, NULL, 0); if (name_len == 0) { - uv_ret = uv_translate_sys_error(GetLastError()); + uv__set_sys_error(loop, GetLastError()); + status = -1; goto complete; } addrinfo_len += ALIGNED_SIZE(name_len); @@ -201,9 +201,13 @@ void uv_process_getaddrinfo_req(uv_loop_t* loop, uv_getaddrinfo_t* handle, } } } else { - uv_ret = UV_ENOMEM; + uv__set_artificial_error(loop, UV_ENOMEM); + status = -1; } - + } else { + /* GetAddrInfo failed */ + uv__set_artificial_error(loop, uv_translate_eai_error(handle->retcode)); + status = -1; } /* return memory to system */ @@ -214,7 +218,7 @@ void uv_process_getaddrinfo_req(uv_loop_t* loop, uv_getaddrinfo_t* handle, complete: /* finally do callback with converted result */ - handle->getaddrinfo_cb(handle, uv_ret, (struct addrinfo*)alloc_ptr); + handle->getaddrinfo_cb(handle, status, (struct addrinfo*)alloc_ptr); uv_unref(loop); } From 232e8e19a1f7ff482acaba708d30eaea0209467e Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 03:08:27 +0100 Subject: [PATCH 19/26] Fix test-stdin-from-file --- test/fixtures/echo.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/fixtures/echo.js b/test/fixtures/echo.js index 1e6c6b959..e5fc06b99 100644 --- a/test/fixtures/echo.js +++ b/test/fixtures/echo.js @@ -29,7 +29,3 @@ var stdin = process.openStdin(); stdin.on('data', function(data) { process.stdout.write(data.toString()); }); - -stdin.on('end', function() { - process.stdout.end(); -}); From 319580953d69819e07b1162dd6dee218d0d5bb95 Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Thu, 24 Nov 2011 19:45:35 -0800 Subject: [PATCH 20/26] update libuv to cfa4112950b1f897fda7 --- deps/uv/src/win/fs.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index c6d86b02b..ec9bfbdec 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -491,14 +491,36 @@ void fs__readdir(uv_fs_t* req, const wchar_t* path, int flags) { void fs__stat(uv_fs_t* req, const wchar_t* path) { int result; + unsigned short mode; - result = _wstati64(path, &req->stat); + fs__open(req, path, _O_RDONLY, 0); + if (req->result == -1) { + return; + } + + result = _fstati64(req->result, &req->stat); if (result == -1) { req->ptr = NULL; } else { + + /* + * VC CRT doesn't properly set S_IFDIR in _fstati64, + * so we set it here if path is a directory. + */ + if (GetFileAttributesW(path) & FILE_ATTRIBUTE_DIRECTORY) { + mode = req->stat.st_mode; + mode &= ~_S_IFMT; + mode |= _S_IFDIR; + + req->stat.st_mode = mode; + assert((req->stat.st_mode & _S_IFMT) == _S_IFDIR); + } + req->ptr = &req->stat; } + _close(req->result); + SET_REQ_RESULT(req, result); } From 1f16a7b6e541694067178a022b9f7a082a6ce7f1 Mon Sep 17 00:00:00 2001 From: "Author: Igor Zinkovsky" Date: Fri, 25 Nov 2011 09:29:06 +0100 Subject: [PATCH 21/26] Enable long paths on windows --- lib/fs.js | 89 +++++++++++++++++-------------- lib/path.js | 21 ++++++++ src/node_file.cc | 18 ++++++- test/simple/test-fs-long-path.js | 49 +++++++++++++++++ test/simple/test-path-makelong.js | 38 +++++++++++++ 5 files changed, 173 insertions(+), 42 deletions(-) create mode 100644 test/simple/test-fs-long-path.js create mode 100644 test/simple/test-path-makelong.js diff --git a/lib/fs.js b/lib/fs.js index 4ef239836..e9efece32 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -26,6 +26,7 @@ // var mode = 438; /* mode=0666 */ var util = require('util'); +var pathModule = require('path'); var binding = process.binding('fs'); var constants = process.binding('constants'); @@ -220,12 +221,13 @@ fs.open = function(path, flags, mode, callback) { mode = modeNum(mode, 438 /*=0666*/); - binding.open(path, stringToFlags(flags), mode, callback); + binding.open(pathModule._makeLong(path), stringToFlags(flags), mode, + callback); }; fs.openSync = function(path, flags, mode) { mode = modeNum(mode, 438 /*=0666*/); - return binding.open(path, stringToFlags(flags), mode); + return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); }; fs.read = function(fd, buffer, offset, length, position, callback) { @@ -320,11 +322,13 @@ fs.writeSync = function(fd, buffer, offset, length, position) { }; fs.rename = function(oldPath, newPath, callback) { - binding.rename(oldPath, newPath, callback || noop); + binding.rename(pathModule._makeLong(oldPath), pathModule._makeLong(newPath), + callback || noop); }; fs.renameSync = function(oldPath, newPath) { - return binding.rename(oldPath, newPath); + return binding.rename(pathModule._makeLong(oldPath), + pathModule._makeLong(newPath)); }; fs.truncate = function(fd, len, callback) { @@ -336,11 +340,11 @@ fs.truncateSync = function(fd, len) { }; fs.rmdir = function(path, callback) { - binding.rmdir(path, callback || noop); + binding.rmdir(pathModule._makeLong(path), callback || noop); }; fs.rmdirSync = function(path) { - return binding.rmdir(path); + return binding.rmdir(pathModule._makeLong(path)); }; fs.fdatasync = function(fd, callback) { @@ -361,11 +365,13 @@ fs.fsyncSync = function(fd) { fs.mkdir = function(path, mode, callback) { if (typeof mode === 'function') callback = mode; - binding.mkdir(path, modeNum(mode, 511 /*=0777*/), callback || noop); + binding.mkdir(pathModule._makeLong(path), modeNum(mode, 511 /*=0777*/), + callback || noop); }; fs.mkdirSync = function(path, mode) { - return binding.mkdir(path, modeNum(mode, 511 /*=0777*/)); + return binding.mkdir(pathModule._makeLong(path), + modeNum(mode, 511 /*=0777*/)); }; fs.sendfile = function(outFd, inFd, inOffset, length, callback) { @@ -377,11 +383,11 @@ fs.sendfileSync = function(outFd, inFd, inOffset, length) { }; fs.readdir = function(path, callback) { - binding.readdir(path, callback || noop); + binding.readdir(pathModule._makeLong(path), callback || noop); }; fs.readdirSync = function(path) { - return binding.readdir(path); + return binding.readdir(pathModule._makeLong(path)); }; fs.fstat = function(fd, callback) { @@ -389,11 +395,11 @@ fs.fstat = function(fd, callback) { }; fs.lstat = function(path, callback) { - binding.lstat(path, callback || noop); + binding.lstat(pathModule._makeLong(path), callback || noop); }; fs.stat = function(path, callback) { - binding.stat(path, callback || noop); + binding.stat(pathModule._makeLong(path), callback || noop); }; fs.fstatSync = function(fd) { @@ -401,46 +407,50 @@ fs.fstatSync = function(fd) { }; fs.lstatSync = function(path) { - return binding.lstat(path); + return binding.lstat(pathModule._makeLong(path)); }; fs.statSync = function(path) { - return binding.stat(path); + return binding.stat(pathModule._makeLong(path)); }; fs.readlink = function(path, callback) { - binding.readlink(path, callback || noop); + binding.readlink(pathModule._makeLong(path), callback || noop); }; fs.readlinkSync = function(path) { - return binding.readlink(path); + return binding.readlink(pathModule._makeLong(path)); }; fs.symlink = function(destination, path, mode_, callback) { var mode = (typeof(mode_) == 'string' ? mode_ : null); var callback_ = arguments[arguments.length - 1]; callback = (typeof(callback_) == 'function' ? callback_ : null); - binding.symlink(destination, path, mode, callback); + binding.symlink(pathModule._makeLong(destination), + pathModule._makeLong(path), mode, callback); }; fs.symlinkSync = function(destination, path, mode) { - return binding.symlink(destination, path, mode); + return binding.symlink(pathModule._makeLong(destination), + pathModule._makeLong(path), mode); }; fs.link = function(srcpath, dstpath, callback) { - binding.link(srcpath, dstpath, callback || noop); + binding.link(pathModule._makeLong(srcpath), pathModule._makeLong(dstpath), + callback || noop); }; fs.linkSync = function(srcpath, dstpath) { - return binding.link(srcpath, dstpath); + return binding.link(pathModule._makeLong(srcpath), + pathModule._makeLong(dstpath)); }; fs.unlink = function(path, callback) { - binding.unlink(path, callback || noop); + binding.unlink(pathModule._makeLong(path), callback || noop); }; fs.unlinkSync = function(path) { - return binding.unlink(path); + return binding.unlink(pathModule._makeLong(path)); }; fs.fchmod = function(fd, mode, callback) { @@ -492,11 +502,11 @@ if (constants.hasOwnProperty('O_SYMLINK')) { fs.chmod = function(path, mode, callback) { - binding.chmod(path, modeNum(mode), callback || noop); + binding.chmod(pathModule._makeLong(path), modeNum(mode), callback || noop); }; fs.chmodSync = function(path, mode) { - return binding.chmod(path, modeNum(mode)); + return binding.chmod(pathModule._makeLong(path), modeNum(mode)); }; if (constants.hasOwnProperty('O_SYMLINK')) { @@ -526,11 +536,11 @@ fs.fchownSync = function(fd, uid, gid) { }; fs.chown = function(path, uid, gid, callback) { - binding.chown(path, uid, gid, callback || noop); + binding.chown(pathModule._makeLong(path), uid, gid, callback || noop); }; fs.chownSync = function(path, uid, gid) { - return binding.chown(path, uid, gid); + return binding.chown(pathModule._makeLong(path), uid, gid); }; // converts Date or number to a fractional UNIX timestamp @@ -551,13 +561,13 @@ fs._toUnixTimestamp = toUnixTimestamp; fs.utimes = function(path, atime, mtime, callback) { atime = toUnixTimestamp(atime); mtime = toUnixTimestamp(mtime); - binding.utimes(path, atime, mtime, callback || noop); + binding.utimes(pathModule._makeLong(path), atime, mtime, callback || noop); }; fs.utimesSync = function(path, atime, mtime) { atime = toUnixTimestamp(atime); mtime = toUnixTimestamp(mtime); - binding.utimes(path, atime, mtime); + binding.utimes(pathModule._makeLong(path), atime, mtime); }; fs.futimes = function(fd, atime, mtime, callback) { @@ -646,7 +656,7 @@ function FSWatcher() { util.inherits(FSWatcher, EventEmitter); FSWatcher.prototype.start = function(filename, persistent) { - var r = this._handle.start(filename, persistent); + var r = this._handle.start(pathModule._makeLong(filename), persistent); if (r) { this._handle.close(); @@ -703,7 +713,7 @@ util.inherits(StatWatcher, EventEmitter); StatWatcher.prototype.start = function(filename, persistent, interval) { - this._handle.start(filename, persistent, interval); + this._handle.start(pathModule._makeLong(filename), persistent, interval); }; @@ -766,8 +776,7 @@ fs.unwatchFile = function(filename) { // Not using realpath(2) because it's bad. // See: http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html -var path = require('path'), - normalize = path.normalize, +var normalize = pathModule.normalize, isWindows = process.platform === 'win32'; if (isWindows) { @@ -776,7 +785,7 @@ if (isWindows) { // windows version fs.realpathSync = function realpathSync(p, cache) { - p = path.resolve(p); + p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return cache[p]; } @@ -791,7 +800,7 @@ if (isWindows) { cb = cache; cache = null; } - p = path.resolve(p); + p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return cb(null, cache[p]); } @@ -812,7 +821,7 @@ if (isWindows) { // posix version fs.realpathSync = function realpathSync(p, cache) { // make p is absolute - p = path.resolve(p); + p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return cache[p]; @@ -865,14 +874,14 @@ if (isWindows) { if (!seenLinks[id]) { fs.statSync(base); seenLinks[id] = fs.readlinkSync(base); - resolvedLink = path.resolve(previous, seenLinks[id]); + resolvedLink = pathModule.resolve(previous, seenLinks[id]); // track this, if given a cache. if (cache) cache[base] = resolvedLink; } } // resolve the link, then start over - p = path.resolve(resolvedLink, p.slice(pos)); + p = pathModule.resolve(resolvedLink, p.slice(pos)); pos = 0; previous = base = current = ''; } @@ -891,7 +900,7 @@ if (isWindows) { } // make p is absolute - p = path.resolve(p); + p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return cb(null, cache[p]); @@ -969,7 +978,7 @@ if (isWindows) { function gotTarget(err, target, base) { if (err) return cb(err); - var resolvedLink = path.resolve(previous, target); + var resolvedLink = pathModule.resolve(previous, target); if (cache) cache[base] = resolvedLink; gotResolvedLink(resolvedLink); } @@ -977,7 +986,7 @@ if (isWindows) { function gotResolvedLink(resolvedLink) { // resolve the link, then start over - p = path.resolve(resolvedLink, p.slice(pos)); + p = pathModule.resolve(resolvedLink, p.slice(pos)); pos = 0; previous = base = current = ''; diff --git a/lib/path.js b/lib/path.js index 162a15fc2..03d0807f7 100644 --- a/lib/path.js +++ b/lib/path.js @@ -417,3 +417,24 @@ exports.existsSync = function(path) { return false; } }; + + +exports._makeLong = isWindows ? + function(path) { + var resolvedPath = exports.resolve(path); + + if (resolvedPath.match(/^[a-zA-Z]\:\\/)) { + // path is local filesystem path, which needs to be converted + // to long UNC path. + return '\\\\?\\' + resolvedPath; + } else if (resolvedPath.match(/^\\\\[^?.]/)) { + // path is network UNC path, which needs to be converted + // to long UNC path. + return '\\\\?\\UNC\\' + resolvedPath.substring(2); + } + + return path; + } : + function(path) { + return path; + }; diff --git a/src/node_file.cc b/src/node_file.cc index c6dcdda4d..411f86ce7 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -252,9 +252,23 @@ Local FSError(int errorno, Local e; + Local path_str; + if (path) { +#ifdef _WIN32 + if (memcmp(path, "\\\\?\\UNC\\", 8) == 0) { + path_str = String::Concat(String::New("\\\\"), String::New(path + 8)); + } else if (memcmp(path, "\\\\?\\", 4) == 0) { + path_str = String::New(path + 4); + } else { + path_str = String::New(path); + } +#else + path_str = String::New(path); +#endif + Local cons3 = String::Concat(cons2, String::NewSymbol(" '")); - Local cons4 = String::Concat(cons3, String::New(path)); + Local cons4 = String::Concat(cons3, path_str); Local cons5 = String::Concat(cons4, String::NewSymbol("'")); e = Exception::Error(cons5); } else { @@ -266,7 +280,7 @@ Local FSError(int errorno, // TODO errno should probably go obj->Set(errno_symbol, Integer::New(errorno)); obj->Set(code_symbol, estring); - if (path) obj->Set(errpath_symbol, String::New(path)); + if (path) obj->Set(errpath_symbol, path_str); if (syscall) obj->Set(syscall_symbol, String::NewSymbol(syscall)); return e; } diff --git a/test/simple/test-fs-long-path.js b/test/simple/test-fs-long-path.js new file mode 100644 index 000000000..dfd68802a --- /dev/null +++ b/test/simple/test-fs-long-path.js @@ -0,0 +1,49 @@ +// 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 fs = require('fs'); +var path = require('path'); +var assert = require('assert'); + +var successes = 0; + +// make a path that will be at least 260 chars long. +var cwd = process.cwd(); +var fileNameLen = Math.max(260 - cwd.length - 1, 1); +var fileName = new Array(fileNameLen + 1).join('x'); +var fullPath = path.resolve(fileName); + +console.log({ filenameLength: fileName.length, + fullPathLength: fullPath.length }); + +fs.writeFile(fullPath, 'ok', function(err) { + if (err) throw err; + successes++; + + fs.stat(fullPath, function(err, stats) { + if (err) throw err; + successes++; + }); +}); + +process.on('exit', function() { + assert.equal(2, successes); +}); diff --git a/test/simple/test-path-makelong.js b/test/simple/test-path-makelong.js new file mode 100644 index 000000000..885eb12a9 --- /dev/null +++ b/test/simple/test-path-makelong.js @@ -0,0 +1,38 @@ +// 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. + +if (process.platform === 'win32') { + var assert = require('assert'); + var path = require('path'); + var common = require('../common'); + + var file = path.join(common.fixturesDir, 'a.js'); + var resolvedFile = path.resolve(file); + var networkFile = '\\\\someserver\\someshare\\somefile'; + + assert.equal('\\\\?\\' + resolvedFile, path._makeLong(file)); + assert.equal('\\\\?\\' + resolvedFile, path._makeLong('\\\\?\\' + file)); + assert.equal('\\\\?\\UNC\\someserver\\someshare\\somefile', + path._makeLong('\\\\someserver\\someshare\\somefile')); + assert.equal('\\\\?\\UNC\\someserver\\someshare\\somefile', + path._makeLong('\\\\?\\UNC\\someserver\\someshare\\somefile')); + assert.equal('\\\\.\\pipe\\somepipe', path._makeLong('\\\\.\\pipe\\somepipe')); +} From 5b014e07251857967ecbb4b873f8279b1ffe4e51 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 09:30:50 +0100 Subject: [PATCH 22/26] Fs: use strncmp instead of memcmp for comparing strings --- src/node_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index 411f86ce7..dd2948656 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -256,9 +256,9 @@ Local FSError(int errorno, if (path) { #ifdef _WIN32 - if (memcmp(path, "\\\\?\\UNC\\", 8) == 0) { + if (strncmp(path, "\\\\?\\UNC\\", 8) == 0) { path_str = String::Concat(String::New("\\\\"), String::New(path + 8)); - } else if (memcmp(path, "\\\\?\\", 4) == 0) { + } else if (strncmp(path, "\\\\?\\", 4) == 0) { path_str = String::New(path + 4); } else { path_str = String::New(path); From a056ef1f398a03c891236f33c5a7efef0688345f Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 10:16:43 +0100 Subject: [PATCH 23/26] Upgrade libuv to 01f64f6 --- deps/uv/include/uv.h | 1 - deps/uv/src/win/fs.c | 8 ++++---- deps/uv/src/win/getaddrinfo.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h index a2c4f2aa7..6eaf63557 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h @@ -111,7 +111,6 @@ typedef intptr_t ssize_t; XX( 40, ETIMEDOUT, "connection timed out") \ XX( 41, ECHARSET, "") \ XX( 42, EAIFAMNOSUPPORT, "") \ - XX( 43, EAINONAME, "") \ XX( 44, EAISERVICE, "") \ XX( 45, EAISOCKTYPE, "") \ XX( 46, ESHUTDOWN, "") \ diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index ec9bfbdec..2037ddd6b 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -503,7 +503,7 @@ void fs__stat(uv_fs_t* req, const wchar_t* path) { req->ptr = NULL; } else { - /* + /* * VC CRT doesn't properly set S_IFDIR in _fstati64, * so we set it here if path is a directory. */ @@ -511,7 +511,7 @@ void fs__stat(uv_fs_t* req, const wchar_t* path) { mode = req->stat.st_mode; mode &= ~_S_IFMT; mode |= _S_IFDIR; - + req->stat.st_mode = mode; assert((req->stat.st_mode & _S_IFMT) == _S_IFDIR); } @@ -709,7 +709,7 @@ void fs__symlink(uv_fs_t* req, const wchar_t* path, const wchar_t* new_path, req->last_error = ERROR_SUCCESS; return; } - + SET_REQ_RESULT(req, result); } @@ -748,7 +748,7 @@ void fs__readlink(uv_fs_t* req, const wchar_t* path) { FSCTL_GET_REPARSE_POINT, NULL, 0, - buffer, + buffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &bytes_returned, NULL); diff --git a/deps/uv/src/win/getaddrinfo.c b/deps/uv/src/win/getaddrinfo.c index a97a0b91e..5353c0b5f 100644 --- a/deps/uv/src/win/getaddrinfo.c +++ b/deps/uv/src/win/getaddrinfo.c @@ -66,7 +66,7 @@ static uv_err_code uv_translate_eai_error(int eai_errno) { case EAI_FAIL: return UV_EFAULT; case EAI_FAMILY: return UV_EAIFAMNOSUPPORT; case EAI_MEMORY: return UV_ENOMEM; - case EAI_NONAME: return UV_EAINONAME; + case EAI_NONAME: return UV_ENOENT; case EAI_AGAIN: return UV_EAGAIN; case EAI_SERVICE: return UV_EAISERVICE; case EAI_SOCKTYPE: return UV_EAISOCKTYPE; From b480cfaf346a1e2d43d31073bd689bd599e3dae1 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 10:27:30 +0100 Subject: [PATCH 24/26] Make the pummel test runner not crash on windows when a directory is locked --- test/pummel/testcfg.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/pummel/testcfg.py b/test/pummel/testcfg.py index b7a72c133..02f5ec6a9 100644 --- a/test/pummel/testcfg.py +++ b/test/pummel/testcfg.py @@ -55,7 +55,10 @@ class PummelTestCase(test.TestCase): except: pass # make it again. - mkdir(self.tmpdir) + try: + mkdir(self.tmpdir) + except: + pass def BeforeRun(self): # delete the whole tmp dir @@ -64,8 +67,11 @@ class PummelTestCase(test.TestCase): except: pass # make it again. - mkdir(self.tmpdir) - + try: + mkdir(self.tmpdir) + except: + pass + def GetLabel(self): return "%s %s" % (self.mode, self.GetName()) From 2335c4bb414013d9a826e7ac7738a4f06a440f00 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 11:07:57 +0100 Subject: [PATCH 25/26] Strip trailing whitespace in changelog --- ChangeLog | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6db61b0e..5cc66ba2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -114,7 +114,7 @@ * Documentation improvments (Igor Zinkovsky, Bert Belder, Ilya Dmitrichenko, koichik, Maciej Małecki, Guglielmo Ferri, isaacs) -* Performance improvements (Daniel Ennis, Bert Belder, Ben Noordhuis) +* Performance improvements (Daniel Ennis, Bert Belder, Ben Noordhuis) * Long process.title support (Ben Noordhuis) @@ -370,7 +370,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs) * Fixes https host header default port handling. (Mikeal Rogers) -* #1440 strip byte order marker when loading *.js and *.json files +* #1440 strip byte order marker when loading *.js and *.json files (Ben Noordhuis) * #1434 Improve util.format() compatibility with browser. (Koichi Kobayashi) @@ -581,9 +581,9 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs) * #829 Backport r8577 from V8 (Ben Noordhuis) -* #877 Don't wait for HTTP Agent socket pool to establish connections. +* #877 Don't wait for HTTP Agent socket pool to establish connections. -* #915 Find kqueue on FreeBSD correctly (Brett Kiefer) +* #915 Find kqueue on FreeBSD correctly (Brett Kiefer) * #1085 HTTP: Fix race in abort/dispatch code (Stefan Rusu) @@ -980,7 +980,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs) * HTTPS server -* Built in debugger 'node debug script.js' +* Built in debugger 'node debug script.js' * realpath files during module load (Mihai Călin Bazon) @@ -1122,7 +1122,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs) * fs bugfixes (Tj Holowaychuk, Tobie Langel, Marco Rogers, isaacs) -* http bug fixes (Fedor Indutny, Mikeal Rogers) +* http bug fixes (Fedor Indutny, Mikeal Rogers) * Faster buffers; breaks C++ API (Tim-Smart, Stéphan Kochen) @@ -1291,7 +1291,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs) * Upgrade http-parser, V8 to 2.2.21 -2010.06.21, Version 0.1.99, a620b7298f68f68a855306437a3b60b650d61d78 +2010.06.21, Version 0.1.99, a620b7298f68f68a855306437a3b60b650d61d78 * Datagram sockets (Paul Querna) @@ -1397,7 +1397,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs) 2010.05.06, Version 0.1.94, f711d5343b29d1e72e87107315708e40951a7826 -* Look in /usr/local/lib/node for modules, so that there's a way +* Look in /usr/local/lib/node for modules, so that there's a way to install modules globally (Issac Schlueter) * SSL improvements (Rhys Jones, Paulo Matias) @@ -1417,7 +1417,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs) * Bugfix: destroy() instead of end() http connection at end of pipeline -* Bugfix: http.Client may be prematurely released back to the +* Bugfix: http.Client may be prematurely released back to the free pool. (Thomas Lee) * Upgrade V8 to 2.2.8 From b159c6d62e5756d3f8847419d29c6959ea288b56 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 25 Nov 2011 11:23:28 +0100 Subject: [PATCH 26/26] Bump version to v0.6.3 --- ChangeLog | 30 ++++++++++++++++++++++++++++-- doc/index.html | 14 +++++++------- doc/template.html | 4 ++-- src/node_version.h | 2 +- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5cc66ba2f..9d34c82b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,30 @@ -2011.11.18, Version 0.6.2 (stable) +2011.11.25, Version 0.6.3 (stable) + +* #2083 Land NPM in Node. It is included in packages/installers and installed + on `make install`. + +* #2076 Add logos to windows installer. + +* #1711 Correctly handle http requests without headers. (Ben Noordhuis, + Felix Geisendörfer) + +* TLS: expose more openssl SSL context options and constants. (Ben Noordhuis) + +* #2177 Windows: don't kill UDP socket when a packet fails to reach its + destination. (Bert Belder) + +* Windows: support paths longer than 260 characters. (Igor Zinkovsky) + +* Windows: correctly resolve drive-relative paths. (Bert Belder) + +* #2166 Don't leave file descriptor open after lchmod. (Isaac Schlueter) + +* #2084 Add OS X .pkg build script to make file. + +* #2160 Documentation improvements. (Ben Noordhuis) + + +2011.11.18, Version 0.6.2 (stable), a4402f0b2e410b19375a1d5c5fb7fe7f66f3c7f8 * doc improvements (Artur Adib, Trevor Burnham, Ryan Emery, Trent Mick) @@ -23,7 +49,7 @@ * Upgrade V8 to 3.6.6.8 -2011.11.11, Version 0.6.1 (stable) +2011.11.11, Version 0.6.1 (stable), 170f2addb2dd0c625bc4a6d461e89a31ad68b79b * doc improvements (Eric Lovett, Ben Noordhuis, Scott Anderson, Yoji SHIDARA) diff --git a/doc/index.html b/doc/index.html index fb97c9121..c17c1951c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -26,7 +26,7 @@
  • Download
  • ChangeLog
  • About
  • -
  • v0.6.2 docs
  • +
  • v0.6.3 docs

  • Wiki
  • Blog
  • @@ -105,14 +105,14 @@ server.listen(1337, "127.0.0.1");

    Download

    -

    2011.11.18 v0.6.2 +

    2011.11.25 v0.6.3

    diff --git a/doc/template.html b/doc/template.html index 8d3e56eaa..1b68ba9fb 100644 --- a/doc/template.html +++ b/doc/template.html @@ -2,7 +2,7 @@ - {{section}}Node.js v0.6.2 Manual & Documentation + {{section}}Node.js v0.6.3 Manual & Documentation @@ -11,7 +11,7 @@
    -

    Node.js v0.6.2 Manual & Documentation

    +

    Node.js v0.6.3 Manual & Documentation

    diff --git a/src/node_version.h b/src/node_version.h index 138a161b8..ad56ec422 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 3 -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)