Merge remote-tracking branch 'ry/v0.8' into master
authorisaacs <i@izs.me>
Fri, 14 Dec 2012 00:57:58 +0000 (16:57 -0800)
committerisaacs <i@izs.me>
Fri, 14 Dec 2012 00:57:58 +0000 (16:57 -0800)
Conflicts:
AUTHORS
ChangeLog
deps/uv/test/test-spawn.c
deps/uv/uv.gyp
src/cares_wrap.cc
src/node.cc
src/node_version.h
test/simple/test-buffer.js
tools/gyp/pylib/gyp/common.py
tools/install.py

14 files changed:
1  2 
AUTHORS
ChangeLog
doc/api/buffer.markdown
doc/api/http.markdown
doc/api/https.markdown
lib/buffer.js
lib/events.js
lib/fs.js
lib/net.js
lib/tls.js
test/simple/test-buffer.js
test/simple/test-event-emitter-listeners-side-effects.js
test/simple/test-event-emitter-set-max-listeners-side-effects.js
tools/install.py

diff --cc AUTHORS
+++ b/AUTHORS
@@@ -369,12 -363,12 +369,16 @@@ Atsuya Takagi <atsuya.takagi@gmail.com
  Pooya Karimian <pkarimian@sencha.com>
  Frédéric Germain <frederic.germain@gmail.com>
  Robin Lee <cheeselee@fedoraproject.org>
 +Kazuyuki Yamada <tasogare.pg@gmail.com>
  Adam Blackburn <regality@gmail.com>
  Willi Eggeling <email@wje-online.de>
 +Paul Serby <paul.serby@clock.co.uk>
  Andrew Paprocki <andrew@ishiboo.com>
 +Ricky Ng-Adam <rngadam@lophilo.com>
 +Aaditya Bhatia <aadityabhatia@gmail.com>
  Max Ogden <max@maxogden.com>
 -Joshua Erickson <josh@snoj.us>
 +Igor Soarez <igorsoarez@gmail.com>
+ Olivier Lalonde <olalonde@gmail.com>
+ Francois Marier <francois@mozilla.com>
+ Trevor Norris <trev.norris@gmail.com>
+ Kai Sasaki Lewuathe <sasaki_kai@lewuathe.sakura.ne.jp>
diff --cc ChangeLog
+++ b/ChangeLog
 -2012.12.13, Version 0.8.16 (Stable)
 +2012.10.24, Version 0.9.3 (Unstable)
 +
 +* V8: Upgrade to 3.13.7.4
 +
 +* crypto: Default to buffers instead of binary strings (isaacs, Fedor Indutny)
 +
 +* crypto: add getHashes() and getCiphers() (Ben Noordhuis)
 +
 +* unix: add custom thread pool, remove libeio (Ben Noordhuis)
 +
 +* util: make `inspect()` accept an "options" argument (Nathan Rajlich)
 +
 +* https: fix renegotation attack protection (Ben Noordhuis)
 +
 +* cluster: make 'listening' handler see actual port (Aaditya Bhatia)
 +
 +* windows: use USERPROFILE to get the user's home dir (Bert Belder)
 +
 +* path: add platform specific path delimiter (Paul Serby)
 +
 +* http: add response.headersSent property (Pavel Lang)
 +
 +* child_process: make .fork()'d child auto-exit (Ben Noordhuis)
 +
 +* events: add 'removeListener' event (Ben Noordhuis)
 +
 +* string_decoder: Add 'end' method, do base64 properly (isaacs)
 +
 +* buffer: include encoding value in exception when invalid (Ricky Ng-Adam)
 +
 +* http: make http.ServerResponse no longer emit 'end' (isaacs)
 +
 +* streams: fix pipe is destructed by 'end' from destination (koichik)
 +
 +
- 2012.09.17, Version 0.9.2 (Unstable)
++2012.09.17, Version 0.9.2 (Unstable), 6e2055889091a424fbb5c500bc3ab9c05d1c28b4
 +
 +* http_parser: upgrade to ad3b631
 +
 +* openssl: upgrade 1.0.1c
 +
 +* darwin: use FSEvents to watch directory changes (Fedor Indutny)
 +
 +* unix: support missing API on NetBSD (Shigeki Ohtsu)
 +
 +* unix: fix EMFILE busy loop (Ben Noordhuis)
 +
 +* windows: un-break writable tty handles (Bert Belder)
 +
 +* windows: map WSAESHUTDOWN to UV_EPIPE (Bert Belder)
 +
 +* windows: make spawn with custom environment work again (Bert Belder)
 +
 +* windows: map ERROR_DIRECTORY to UV_ENOENT (Bert Belder)
 +
 +* tls, https: validate server certificate by default (Ben Noordhuis)
 +
 +* tls, https: throw exception on missing key/cert (Ben Noordhuis)
 +
 +* tls: async session storage (Fedor Indutny)
 +
 +* installer: don't install header files (Ben Noordhuis)
 +
 +* buffer: implement Buffer.prototype.toJSON() (Nathan Rajlich)
 +
 +* buffer: added support for writing NaN and Infinity (koichik)
 +
 +* http: make http.ServerResponse emit 'end' (Ben Noordhuis)
 +
 +* build: ./configure --ninja (Ben Noordhuis, Timothy J Fontaine)
 +
 +* installer: fix --without-npm (Ben Noordhuis)
 +
 +* cli: make -p equivalent to -pe (Ben Noordhuis)
 +
 +* url: Go much faster by using Url class (isaacs)
 +
 +
 +2012.08.28, Version 0.9.1 (Unstable), e6ce259d2caf338fec991c2dd447de763ce99ab7
 +
 +* buffer: Add Buffer.isEncoding(enc) to test for valid encoding values (isaacs)
 +
 +* Raise UV_ECANCELED on premature close. (Ben Noordhuis)
 +
 +* Remove c-ares from libuv, move to a top-level node dependency (Bert Belder)
 +
 +* ref/unref for all HandleWraps, timers, servers, and sockets (Timothy J Fontaine)
 +
 +* addon: remove node-waf, superseded by node-gyp (Ben Noordhuis)
 +
 +* child_process: emit error on exec failure (Ben Noordhuis)
 +
 +* cluster: do not use internal server API (Andreas Madsen)
 +
 +* constants: add O_DIRECT (Ian Babrou)
 +
 +* crypto: add sync interface to crypto.pbkdf2() (Ben Noordhuis)
 +
 +* darwin: emulate fdatasync() (Fedor Indutny)
 +
 +* dgram: make .bind() always asynchronous (Ben Noordhuis)
 +
 +* events: Make emitter.listeners() side-effect free (isaacs, Joe Andaverde)
 +
 +* fs: Throw early on invalid encoding args (isaacs)
 +
 +* fs: fix naming of truncate/ftruncate functions (isaacs)
 +
 +* http: bubble up parser errors to ClientRequest (Brian White)
 +
 +* linux: improve cpuinfo parser on ARM and MIPS (Ben Noordhuis)
 +
 +* net: add support for IPv6 addresses ending in :: (Josh Erickson)
 +
 +* net: support Server.listen(Pipe) (Andreas Madsen)
 +
 +* node: don't scan add-on for "init" symbol (Ben Noordhuis)
 +
 +* remove process.uvCounters() (Ben Noordhuis)
 +
 +* repl: console writes to repl rather than process stdio (Nathan Rajlich)
 +
 +* timers: implement setImmediate (Timothy J Fontaine)
 +
 +* tls: fix segfault in pummel/test-tls-ci-reneg-attack (Ben Noordhuis)
 +
 +* tools: Move gyp addon tools to node-gyp (Nathan Rajlich)
 +
 +* unix: preliminary signal handler support (Ben Noordhuis)
 +
 +* unix: remove dependency on ev_child (Ben Noordhuis)
 +
 +* unix: work around darwin bug, don't poll() on pipe (Fedor Indutny)
 +
 +* util: Formally deprecate util.pump() (Ben Noordhuis)
 +
 +* windows: make active and closing handle state independent (Bert Belder)
 +
 +* windows: report spawn errors to the exit callback (Bert Belder)
 +
 +* windows: signal handling support with uv_signal_t (Bert Belder)
 +
 +
 +2012.07.20, Version 0.9.0 (Unstable), f9b237f478c372fd55e4590d7399dcd8f25f3603
 +
 +* punycode: update to v1.1.1 (Mathias Bynens)
 +
 +* c-ares: upgrade to 1.9.0 (Saúl Ibarra Corretgé)
 +
 +* dns: ignore rogue DNS servers reported by windows (Saúl Ibarra Corretgé)
 +
 +* unix: speed up uv_async_send() (Ben Noordhuis)
 +
 +* darwin: get cpu model correctly on mac (Xidorn Quan)
 +
 +* nextTick: Handle tick callbacks before any other I/O (isaacs)
 +
 +* Enable color customization of `util.inspect` (Pavel Lang)
 +
 +* tls: Speed and memory improvements (Fedor Indutny)
 +
 +* readline: Use one history item for reentered line (Vladimir Beloborodov)
 +
 +* Fix #3521 Make process.env more like a regular Object (isaacs)
 +
 +
- 2012.10.12, Version 0.8.12 (Stable)
++2012.12.13, Version 0.8.16 (Stable), 1c9c6277d5cfcaaac8569c0c8f7daa64292048a9
+ * npm: Upgrade to 1.1.69
+ * fs: fix WriteStream/ReadStream fd leaks (Ben Noordhuis)
+ * crypto: fix leak in GetPeerCertificate (Fedor Indutny)
+ * buffer: Don't double-negate numeric buffer arg (Trevor Norris)
+ * net: More accurate IP address validation and IPv6 dotted notation. (Joshua Erickson)
+ 2012.11.26, Version 0.8.15 (Stable), fdf91afb494a7a2fff2913d817f589c191a2c88f
+ * npm: Upgrade to 1.1.66 (isaacs)
+ * linux: use /proc/cpuinfo for CPU frequency (Ben Noordhuis)
+ * windows: map WSAESHUTDOWN to UV_EPIPE (Ben Noordhuis)
+ * windows: map ERROR_GEN_FAILURE to UV_EIO (Bert Belder)
+ * unix: do not set environ unless one is provided (Charlie McConnell)
+ * domains: don't crash if domain is set to null (Bert Belder)
+ * windows: fix the x64 debug build (Bert Belder)
+ * net, tls: fix connect() resource leak (Ben Noordhuis)
+ 2012.10.25, Version 0.8.14 (Stable), b00527fcf05c3d9f/b5d5d790f9472906a59fe218
+ * events: Don't clobber pre-existing _events obj in EE ctor (isaacs)
+ 2012.10.25, Version 0.8.13 (Stable), ff4c974873f9a7cc6a5b042eb9b6389bb8dde6d6
+ * V8: Upgrade to 3.11.10.25
+ * npm: Upgrade to 1.1.65
+ * url: parse hostnames that start with - or _ (Ben Noordhuis)
+ * repl: Fix Windows 8 terminal issue (Bert Belder)
+ * typed arrays: use signed char for signed int8s (Aaron Jacobs)
+ * crypto: fix bugs in DiffieHellman (Ben Noordhuis)
+ * configure: turn on VFPv3 on ARMv7 (Ben Noordhuis)
+ * Re-enable OpenSSL UI for entering passphrases via tty (Ben Noordhuis)
+ * repl: ensure each REPL instance gets its own "context" (Nathan Rajlich)
+ 2012.10.12, Version 0.8.12 (Stable), 38c72d4e29574dec5205bcf23c2a85efe65331a4
  
  * npm: Upgrade to 1.1.63
  
Simple merge
Simple merge
Simple merge
diff --cc lib/buffer.js
Simple merge
diff --cc lib/events.js
Simple merge
diff --cc lib/fs.js
Simple merge
diff --cc lib/net.js
Simple merge
diff --cc lib/tls.js
Simple merge
@@@ -774,27 -738,10 +774,34 @@@ assert.equal(b.toString(), 'xxx')
  // issue GH-3416
  Buffer(Buffer(0), 0, 0);
  
 +[ 'hex',
 +  'utf8',
 +  'utf-8',
 +  'ascii',
 +  'binary',
 +  'base64',
 +  'ucs2',
 +  'ucs-2',
 +  'utf16le',
 +  'utf-16le' ].forEach(function(enc) {
 +    assert.equal(Buffer.isEncoding(enc), true);
 +  });
 +
 +[ 'utf9',
 +  'utf-7',
 +  'Unicode-FTW',
 +  'new gnu gun'  ].forEach(function(enc) {
 +    assert.equal(Buffer.isEncoding(enc), false);
 +  });
 +
 +
 +// GH-3905
 +assert.equal(JSON.stringify(Buffer('test')), '[116,101,115,116]');
++
+ // issue GH-4331
+ assert.throws(function() {
+   new Buffer(0xFFFFFFFF);
+ }, RangeError);
+ assert.throws(function() {
+   new Buffer(0xFFFFFFFFF);
+ }, TypeError);
index af725be,0000000..92a5bef
mode 100644,000000..100644
--- /dev/null
@@@ -1,61 -1,0 +1,61 @@@
- assert(typeof e._events == 'undefined');
 +
 +// 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 events = require('events');
 +
 +var EventEmitter = require('events').EventEmitter;
 +var assert = require('assert');
 +
 +var e = new EventEmitter;
 +var fl;  // foo listeners
 +
 +fl = e.listeners('foo');
 +assert(Array.isArray(fl));
 +assert(fl.length === 0);
++assert.equal(e._events, null);
 +
 +e.on('foo', assert.fail);
 +fl = e.listeners('foo');
 +assert(e._events.foo === assert.fail);
 +assert(Array.isArray(fl));
 +assert(fl.length === 1);
 +assert(fl[0] === assert.fail);
 +
 +e.listeners('bar');
 +assert(!e._events.hasOwnProperty('bar'));
 +
 +e.on('foo', assert.ok);
 +fl = e.listeners('foo');
 +
 +assert(Array.isArray(e._events.foo));
 +assert(e._events.foo.length === 2);
 +assert(e._events.foo[0] === assert.fail);
 +assert(e._events.foo[1] === assert.ok);
 +
 +assert(Array.isArray(fl));
 +assert(fl.length === 2);
 +assert(fl[0] === assert.fail);
 +assert(fl[1] === assert.ok);
 +
 +console.log('ok');
index bcb9ba1,0000000..a504797
mode 100644,000000..100644
--- /dev/null
@@@ -1,30 -1,0 +1,30 @@@
- assert.equal(typeof e._events, 'undefined');
 +// 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 events = require('events');
 +
 +var e = new events.EventEmitter;
 +
- assert.equal(typeof e._events, 'undefined');
++assert.strictEqual(e._events, null);
 +e.setMaxListeners(5);
++assert.strictEqual(e._events, null);
@@@ -122,6 -198,12 +122,11 @@@ def files(action)
    # with dtrace support now (oracle's "unbreakable" linux)
    action(['src/node.d'], 'lib/dtrace/')
  
 -  if 'true' == variables.get('node_install_waf'): waf_files(action)
+   if 'freebsd' in sys.platform:
+     action(['doc/node.1'], 'man/man1/')
+   else:
+     action(['doc/node.1'], 'share/man/man1/')
    if 'true' == variables.get('node_install_npm'): npm_files(action)
  
  def run(args):