diff --git a/.mailmap b/.mailmap index 3b5f111f777..f5201458039 100644 --- a/.mailmap +++ b/.mailmap @@ -8,12 +8,13 @@ Arlo Breault Artem Zaytsev Atsuo Fukaya Ben Noordhuis +Ben Taber Bert Belder +Bert Belder Bert Belder Brandon Benvie Brian White Brian White -Bryan Cantrill Chew Choon Keat Christopher Lenz Daniel Berger @@ -30,28 +31,37 @@ Elliott Cable EungJun Yi Evan Larkin Farid Neshat +Felix Böhm Felix Geisendörfer Felix Geisendörfer Friedemann Altrock Fuji Goro Gabriel de Perthuis +Gil Pedersen +Henry Chin Herbert Vojčík +Igor Soarez Igor Zinkovsky Isaac Z. Schlueter Isaac Z. Schlueter -Jérémy Lal -Jérémy Lal +Jake Verbaten Jered Schmidt Joe Shaw Johan Bergström Johan Dahlberg Jonas Pfenniger Jonathan Rentzsch +Josh Erickson Joshua S. Weinstein +Jérémy Lal +Jérémy Lal +Kai Sasaki Lewuathe Kazuyuki Yamada Koichi Kobayashi Kris Kowal Kyle Robinson Young +Luke Bayes +Maciej Małecki Mathias Pettersson Michael Bernstein Michael Wilber @@ -70,6 +80,7 @@ Sam Shull Sam Shull Sambasiva Suda San-Tai Hsu +Scott Blomquist Sergey Kryzhanovsky Shannen Saez Shigeki Ohtsu @@ -77,15 +88,17 @@ Siddharth Mahendraker Simon Willison Stanislav Opichal Stefan Bühler +TJ Holowaychuk +TJ Holowaychuk Tadashi SAWADA Takahiro ANDO Ted Young Thomas Lee Tim Caswell +Tim Price Tim Smart Tim Smart -TJ Holowaychuk -TJ Holowaychuk +Tom Hughes-Croucher Tom Hughes-Croucher Trevor Burnham Tyler Larson diff --git a/AUTHORS b/AUTHORS index d8470be27bc..9b392cf3976 100644 --- a/AUTHORS +++ b/AUTHORS @@ -124,7 +124,7 @@ Sam Stephenson Jorge Chamorro Bieling Evan Larkin Sean Coates -Tom Hughes +Tom Hughes-Croucher Joshua Peek Nathan Rajlich Peteris Krumins @@ -415,7 +415,6 @@ Andy Burke Sugendran Ganess Jim Schubert Victor Costan -Timothy J Fontaine Arianit Uka Andrei Sedoi Eugene Girshov @@ -428,3 +427,5 @@ Paolo Fragomeni Scott Blomquist Henry Chin Julian Gruber +JeongHoon Byun +Iskren Ivov Chernev diff --git a/ChangeLog b/ChangeLog index 5a5b8bc9342..a6263414e29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,35 @@ -2013.03.11, Version 0.10.0 (Stable) +2013.03.21, Version 0.10.1 (Stable) + +* npm: upgrade to 1.2.15 + +* crypto: Improve performance of non-stream APIs (Fedor Indutny) + +* tls: always reset this.ssl.error after handling (Fedor Indutny) + +* tls: Prevent mid-stream hangs (Fedor Indutny, isaacs) + +* net: improve arbitrary tcp socket support (Ben Noordhuis) + +* net: handle 'finish' event only after 'connect' (Fedor Indutny) + +* http: Don't hot-path end() for large buffers (isaacs) + +* fs: Missing cb errors are deprecated, not a throw (isaacs) + +* fs: make write/appendFileSync correctly set file mode (Raymond Feng) + +* stream: Return self from readable.wrap (isaacs) + +* stream: Never call decoder.end() multiple times (Gil Pedersen) + +* windows: enable watching signals with process.on('SIGXYZ') (Bert Belder) + +* node: revert removal of MakeCallback (Trevor Norris) + +* node: Unwrap without aborting in handle fd getter (isaacs) + + +2013.03.11, Version 0.10.0 (Stable), 163ca274230fce536afe76c64676c332693ad7c1 * npm: Upgrade to 1.2.14 diff --git a/benchmark/compare.js b/benchmark/compare.js index 2e365454b6b..d6ad44922dd 100644 --- a/benchmark/compare.js +++ b/benchmark/compare.js @@ -48,36 +48,24 @@ if (nodes.length !== 2) var spawn = require('child_process').spawn; var results = {}; -var n = 1; +var toggle = 1; +var r = (+process.env.NODE_BENCH_RUNS || 1) * 2; run(); - -var RUNS = +process.env.NODE_BENCH_RUNS || 1; -var r = RUNS; function run() { - // Flip back and forth between the two binaries. - if (n === 1) { - n--; - } else { - r--; - if (r === 0) - return compare(); - else - n++; - } - - if (n === -1) + if (--r < 0) return compare(); + toggle = ++toggle % 2; - var node = nodes[n]; + var node = nodes[toggle]; console.error('running %s', node); var env = {}; for (var i in process.env) env[i] = process.env[i]; env.NODE = node; - var child = spawn('make', [runBench], { env: env }); var out = ''; + var child = spawn('make', [runBench], { env: env }); child.stdout.setEncoding('utf8'); child.stdout.on('data', function(c) { out += c; diff --git a/benchmark/http/end-vs-write-end.js b/benchmark/http/end-vs-write-end.js new file mode 100644 index 00000000000..06fce6f4686 --- /dev/null +++ b/benchmark/http/end-vs-write-end.js @@ -0,0 +1,59 @@ +// When calling .end(buffer) right away, this triggers a "hot path" +// optimization in http.js, to avoid an extra write call. +// +// However, the overhead of copying a large buffer is higher than +// the overhead of an extra write() call, so the hot path was not +// always as hot as it could be. +// +// Verify that our assumptions are valid. + +var common = require('../common.js'); +var PORT = common.PORT; + +var bench = common.createBenchmark(main, { + type: ['asc', 'utf', 'buf'], + kb: [64, 128, 256, 1024], + c: [100], + method: ['write', 'end '] // two spaces added to line up each row +}); + +function main(conf) { + http = require('http'); + var chunk; + var len = conf.kb * 1024; + switch (conf.type) { + case 'buf': + chunk = new Buffer(len); + chunk.fill('x'); + break; + case 'utf': + encoding = 'utf8'; + chunk = new Array(len / 2 + 1).join('ü'); + break; + case 'asc': + chunk = new Array(len + 1).join('a'); + break; + } + + function write(res) { + res.write(chunk); + res.end(); + } + + function end(res) { + res.end(chunk); + } + + var method = conf.method === 'write' ? write : end; + var args = ['-r', 5000, '-t', 8, '-c', conf.c]; + + var server = http.createServer(function(req, res) { + method(res); + }); + + server.listen(common.PORT, function() { + bench.http('/', args, function() { + server.close(); + }); + }); +} diff --git a/benchmark/net/dgram.js b/benchmark/net/dgram.js new file mode 100644 index 00000000000..6a0c5501c62 --- /dev/null +++ b/benchmark/net/dgram.js @@ -0,0 +1,61 @@ +// test UDP send/recv throughput + +var common = require('../common.js'); +var PORT = common.PORT; + +// `num` is the number of send requests to queue up each time. +// Keep it reasonably high (>10) otherwise you're benchmarking the speed of +// event loop cycles more than anything else. +var bench = common.createBenchmark(main, { + len: [1, 64, 256, 1024], + num: [100], + type: ['send', 'recv'], + dur: [5] +}); + +var dur; +var len; +var num; +var type; +var chunk; +var encoding; + +function main(conf) { + dur = +conf.dur; + len = +conf.len; + num = +conf.num; + type = conf.type; + chunk = new Buffer(len); + server(); +} + +var dgram = require('dgram'); + +function server() { + var sent = 0; + var received = 0; + var socket = dgram.createSocket('udp4'); + + function onsend() { + if (sent++ % num == 0) + for (var i = 0; i < num; i++) + socket.send(chunk, 0, chunk.length, PORT, '127.0.0.1', onsend); + } + + socket.on('listening', function() { + bench.start(); + onsend(); + + setTimeout(function() { + var bytes = (type === 'send' ? sent : received) * chunk.length; + var gbits = (bytes * 8) / (1024 * 1024 * 1024); + bench.end(gbits); + }, dur * 1000); + }); + + socket.on('message', function(buf, rinfo) { + received++; + }); + + socket.bind(PORT); +} diff --git a/deps/npm/.npmignore b/deps/npm/.npmignore index bd0982f2e27..6c258eaa0b8 100644 --- a/deps/npm/.npmignore +++ b/deps/npm/.npmignore @@ -1,4 +1,5 @@ *.swp +.*.swp npm-debug.log /test/bin /test/output.log @@ -20,3 +21,5 @@ html/*.png !.npmignore /npm-*.tgz + +*.pyc diff --git a/deps/npm/doc/cli/faq.md b/deps/npm/doc/cli/faq.md index d6cc041e4ca..518fbef120c 100644 --- a/deps/npm/doc/cli/faq.md +++ b/deps/npm/doc/cli/faq.md @@ -77,7 +77,7 @@ npm will not help you do something that is known to be a bad idea. No. This will never happen. This question comes up sometimes, because it seems silly from the outside that npm couldn't just be configured to put stuff somewhere else, and then npm could load them -from there. It's an arbitrary spelling choice, right? What's the bg +from there. It's an arbitrary spelling choice, right? What's the big deal? At the time of this writing, the string `'node_modules'` appears 151 diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md index c6cedaaaf3b..403f7f856a7 100644 --- a/deps/npm/doc/cli/json.md +++ b/deps/npm/doc/cli/json.md @@ -118,6 +118,27 @@ you can specify the value for "bugs" as a simple string instead of an object. If a url is provided, it will be used by the `npm bugs` command. +## license + +You should specify a license for your package so that people know how they are +permitted to use it, and any restrictions you're placing on it. + +The simplest way, assuming you're using a common license such as BSD or MIT, is +to just specify the name of the license you're using, like this: + + { "license" : "BSD" } + +If you have more complex licensing terms, or you want to provide more detail +in your package.json file, you can use the more verbose plural form, like this: + + "licenses" : [ + { "type" : "MyLicense" + , "url" : "http://github.com/owner/project/path/to/license" + } + ] + +It's also a good idea to include a license file at the top level in your package. + ## people fields: author, contributors The "author" is one person. "contributors" is an array of people. A "person" @@ -416,9 +437,9 @@ In this case, it's best to list these additional items in a `devDependencies` hash. These things will be installed whenever the `--dev` configuration flag -is set. This flag is set automatically when doing `npm link`, and can -be managed like any other npm configuration param. See `npm-config(1)` -for more on the topic. +is set. This flag is set automatically when doing `npm link` or when doing +`npm install` from the root of a package, and can be managed like any other npm +configuration param. See `npm-config(1)` for more on the topic. ## bundledDependencies diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 7aa186c24f7..7408820b374 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@

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

- +