From 6738e685921efd82b2ce73280d26e9fda4ab85c2 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 21 Dec 2012 12:37:39 -0800 Subject: [PATCH 1/7] blog: Post about v0.9.4 --- doc/blog/release/v0.9.4.md | 97 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 doc/blog/release/v0.9.4.md diff --git a/doc/blog/release/v0.9.4.md b/doc/blog/release/v0.9.4.md new file mode 100644 index 00000000000..edefe0dd39e --- /dev/null +++ b/doc/blog/release/v0.9.4.md @@ -0,0 +1,97 @@ +date: Fri Dec 21 12:30:15 PST 2012 +version: 0.9.4 +category: release +slug: node-v0-9-4-unstable +title: Node v0.9.4 (Unstable) + +2012.12.21, Version 0.9.4 (Unstable) + +* streams: Update all streaming interfaces to use new classes (isaacs) + +* node: remove idle gc (Ben Noordhuis) + +* http: protect against response splitting attacks (Bert Belder) + +* fs: Raise error when null bytes detected in paths (isaacs) + +* fs: fix 'object is not a function' callback errors (Ben Noordhuis) + +* fs: add autoClose=true option to fs.createReadStream (Farid Neshat) + +* process: add getgroups(), setgroups(), initgroups() (Ben Noordhuis) + +* openssl: optimized asm code on x86 and x64 (Bert Belder) + +* crypto: fix leak in GetPeerCertificate (Fedor Indutny) + +* add systemtap support (Jan Wynholds) + +* windows: add ETW and PerfCounters support (Scott Blomquist) + +* windows: fix normalization of UNC paths (Bert Belder) + +* crypto: fix ssl error handling (Sergey Kholodilov) + +* node: remove eio-emul.h (Ben Noordhuis) + +* os: add os.endianness() function (Nathan Rajlich) + +* readline: don't emit "line" events with a trailing 'n' char (Nathan Rajlich) + +* build: add configure option to generate xcode build files (Timothy J Fontaine) + +* build: allow linking against system libuv, cares, http_parser (Stephen Gallagher) + +* typed arrays: add slice() support to ArrayBuffer (Anthony Pesch) + +* debugger: exit and kill child on SIGTERM or SIGHUP (Fedor Indutny) + +* url: url.format escapes delimiters in path and query (J. Lee Coltrane) + + +Source Code: http://nodejs.org/dist/v0.9.4/node-v0.9.4.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.9.4/node-v0.9.4.pkg + +Windows Installer: http://nodejs.org/dist/v0.9.4/node-v0.9.4-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.9.4/x64/node-v0.9.4-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.9.4/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.9.4/node-v0.9.4-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.9.4/node-v0.9.4-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.9.4/node-v0.9.4-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.9.4/node-v0.9.4-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.9.4/ + +Website: http://nodejs.org/docs/v0.9.4/ + +Documentation: http://nodejs.org/docs/v0.9.4/api/ + +Shasums: + +``` +7919d5fa63583c9a38a8ade1e977809b53476f7f node-v0.9.4-darwin-x64.tar.gz +82eb2f39c61b14be8a9d2c1b6ba624030ab3ddbe node-v0.9.4-darwin-x86.tar.gz +34cd2f6bed15d4d7d28944575b7098f4500651e2 node-v0.9.4-linux-x64.tar.gz +bf5da5432a5d80343e1d53c57b242283be11c97f node-v0.9.4-linux-x86.tar.gz +6eebcf27a545d598c0ffa8056d7d5c83add5746c node-v0.9.4-sunos-x64.tar.gz +1c2e28389b34a0e51f5ad2a1c09677f2941765b1 node-v0.9.4-sunos-x86.tar.gz +4d7b4dfd150f17dac787400e74fc469b3432f3a2 node-v0.9.4-x86.msi +20ceaafeb6d4ecf5d2f37d3d825d47cc81927dd6 node-v0.9.4.pkg +30b3f8dee0b2ace3d83c200eeffc6f450d3b4366 node-v0.9.4.tar.gz +a5b4304f4a50ac3385577f7833890ca6f44301c0 node.exe +5b960053a6bddfd10cf6408ea1581b7237512248 node.exp +f1aaac71a21e7a0c884211957e5d79bed1deb1d3 node.lib +73016ab15ee7ee6f6363391d3e41a698ed764e65 node.pdb +5a624fc9a5dac85a6f00945ccc2d31d9b8a51499 x64/node-v0.9.4-x64.msi +fe738e969f9b050b7b1675ecf3cda567021e121b x64/node.exe +d32c7ea441ad0d24cd2fd2b4932d2924a95f25ec x64/node.exp +753f7fadc501a1b86d94af23710137f6e93c5cff x64/node.lib +a707ef46e6483f40a30c85c037eeadbf9e5923b8 x64/node.pdb +``` From 54740c8b247c9ce50a4400142004fd05ec098e21 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 26 Dec 2012 15:26:53 -0800 Subject: [PATCH 2/7] lint --- lib/http.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/http.js b/lib/http.js index d322ab25534..f5418b00f7c 100644 --- a/lib/http.js +++ b/lib/http.js @@ -816,13 +816,13 @@ OutgoingMessage.prototype.end = function(data, encoding) { var data_len = data.length; var trailer_len = this._trailer.length; - var len = header_len - + chunk_size_len - + 2 // '\r\n'.length - + data_len - + 5 // '\r\n0\r\n'.length - + trailer_len - + 2; // '\r\n'.length + var len = header_len + + chunk_size_len + + 2 + // '\r\n'.length + data_len + + 5 + // '\r\n0\r\n'.length + trailer_len + + 2; // '\r\n'.length var buf = new Buffer(len); var off = 0; From c2e71dd51d8db42ab19cd9e5243af9a121ba0247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Fri, 21 Dec 2012 02:56:47 +0100 Subject: [PATCH 3/7] build: allow to specify custom tags When building custom `node` versions (e.g., floating features/fixes from different versions) it's often useful to specify a custom tag which easily identifies build when invoking `node -v`. Introduce a way to specify this tag in `node_version.h` file or by running `./configure --tag=""`. Insert it right after the patch version (and before `-pre`, if build is not a release). --- configure | 10 ++++++++++ node.gyp | 1 + src/node_version.h | 11 +++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 7211682ac11..aa8c99846e5 100755 --- a/configure +++ b/configure @@ -182,6 +182,11 @@ parser.add_option("--unsafe-optimizations", dest="unsafe_optimizations", help=optparse.SUPPRESS_HELP) +parser.add_option("--tag", + action="store", + dest="tag", + help="Custom build tag") + (options, args) = parser.parse_args() @@ -394,6 +399,11 @@ def configure_node(o): else: o['variables']['node_use_etw'] = 'false' + if options.tag: + o['variables']['node_tag'] = '-' + options.tag + else: + o['variables']['node_tag'] = '' + def configure_libz(o): o['variables']['node_shared_zlib'] = b(options.shared_zlib) diff --git a/node.gyp b/node.gyp index 82af2fe7ca8..2473879a1f9 100644 --- a/node.gyp +++ b/node.gyp @@ -130,6 +130,7 @@ 'NODE_WANT_INTERNALS=1', 'ARCH="<(target_arch)"', 'PLATFORM="<(OS)"', + 'NODE_TAG="<(node_tag)"', ], 'conditions': [ diff --git a/src/node_version.h b/src/node_version.h index 7ba88b33a69..c611332e4b8 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -25,6 +25,11 @@ #define NODE_MAJOR_VERSION 0 #define NODE_MINOR_VERSION 8 #define NODE_PATCH_VERSION 17 + +#ifndef NODE_TAG +# define NODE_TAG "" +#endif + #define NODE_VERSION_IS_RELEASE 0 #ifndef NODE_STRINGIFY @@ -35,11 +40,13 @@ #if NODE_VERSION_IS_RELEASE # define NODE_VERSION_STRING NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \ NODE_STRINGIFY(NODE_MINOR_VERSION) "." \ - NODE_STRINGIFY(NODE_PATCH_VERSION) + NODE_STRINGIFY(NODE_PATCH_VERSION) \ + NODE_TAG #else # define NODE_VERSION_STRING NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \ NODE_STRINGIFY(NODE_MINOR_VERSION) "." \ - NODE_STRINGIFY(NODE_PATCH_VERSION) "-pre" + NODE_STRINGIFY(NODE_PATCH_VERSION) \ + NODE_TAG "-pre" #endif #define NODE_VERSION "v" NODE_VERSION_STRING From a7cc53067d6113decc6755971358de2cb71e9cda Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 29 Dec 2012 17:34:41 +0100 Subject: [PATCH 4/7] deps: upgrade libuv to 4997738 --- deps/uv/src/unix/core.c | 7 +- deps/uv/src/unix/sunos.c | 2 +- deps/uv/src/win/error.c | 2 + deps/uv/src/win/util.c | 270 +++++++++++++++++++++++------------ deps/uv/test/test-fs-event.c | 30 ++++ deps/uv/test/test-list.h | 2 + 6 files changed, 217 insertions(+), 96 deletions(-) diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c index 9f20d04b29f..f3636e285a5 100644 --- a/deps/uv/src/unix/core.c +++ b/deps/uv/src/unix/core.c @@ -291,7 +291,12 @@ static int uv_getaddrinfo_done(eio_req* req_) { uv_getaddrinfo_t* req = req_->data; struct addrinfo *res = req->res; #if __sun - size_t hostlen = strlen(req->hostname); + size_t hostlen; + + if (req->hostname) + hostlen = strlen(req->hostname); + else + hostlen = 0; #endif req->res = NULL; diff --git a/deps/uv/src/unix/sunos.c b/deps/uv/src/unix/sunos.c index b49e4483118..0dbbe72aa5e 100644 --- a/deps/uv/src/unix/sunos.c +++ b/deps/uv/src/unix/sunos.c @@ -218,7 +218,7 @@ int uv_fs_event_init(uv_loop_t* loop, void uv__fs_event_close(uv_fs_event_t* handle) { - if (handle->fd == PORT_FIRED) { + if (handle->fd == PORT_FIRED || handle->fd == PORT_LOADED) { port_dissociate(handle->loop->fs_fd, PORT_SOURCE_FILE, (uintptr_t)&handle->fo); } handle->fd = PORT_DELETED; diff --git a/deps/uv/src/win/error.c b/deps/uv/src/win/error.c index 1d2d2513f52..ba33963004b 100644 --- a/deps/uv/src/win/error.c +++ b/deps/uv/src/win/error.c @@ -108,6 +108,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case WSAECONNRESET: return UV_ECONNRESET; case ERROR_ALREADY_EXISTS: return UV_EEXIST; case ERROR_FILE_EXISTS: return UV_EEXIST; + case ERROR_BUFFER_OVERFLOW: return UV_EFAULT; case WSAEFAULT: return UV_EFAULT; case ERROR_HOST_UNREACHABLE: return UV_EHOSTUNREACH; case WSAEHOSTUNREACH: return UV_EHOSTUNREACH; @@ -124,6 +125,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case ERROR_NETWORK_UNREACHABLE: return UV_ENETUNREACH; case WSAENETUNREACH: return UV_ENETUNREACH; case WSAENOBUFS: return UV_ENOBUFS; + case ERROR_NOT_ENOUGH_MEMORY: return UV_ENOMEM; case ERROR_OUTOFMEMORY: return UV_ENOMEM; case ERROR_CANNOT_MAKE: return UV_ENOSPC; case ERROR_DISK_FULL: return UV_ENOSPC; diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c index 49a3adc7089..2461adc4370 100644 --- a/deps/uv/src/win/util.c +++ b/deps/uv/src/win/util.c @@ -740,109 +740,201 @@ void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { } -uv_err_t uv_interface_addresses(uv_interface_address_t** addresses, - int* count) { - unsigned long size = 0; - IP_ADAPTER_ADDRESSES* adapter_addresses; - IP_ADAPTER_ADDRESSES* adapter_address; - uv_interface_address_t* address; - struct sockaddr* sock_addr; - int length; - char* name; - /* Use IP_ADAPTER_UNICAST_ADDRESS_XP to retain backwards compatibility */ - /* with Windows XP */ - IP_ADAPTER_UNICAST_ADDRESS_XP* unicast_address; +uv_err_t uv_interface_addresses(uv_interface_address_t** addresses_ptr, + int* count_ptr) { + IP_ADAPTER_ADDRESSES* win_address_buf; + ULONG win_address_buf_size; + IP_ADAPTER_ADDRESSES* win_address; - if (GetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &size) - != ERROR_BUFFER_OVERFLOW) { - return uv__new_sys_error(GetLastError()); - } + uv_interface_address_t* uv_address_buf; + char* name_buf; + size_t uv_address_buf_size; + uv_interface_address_t* uv_address; - adapter_addresses = (IP_ADAPTER_ADDRESSES*)malloc(size); - if (!adapter_addresses) { - uv_fatal_error(ERROR_OUTOFMEMORY, "malloc"); - } + int count; - if (GetAdaptersAddresses(AF_UNSPEC, 0, NULL, adapter_addresses, &size) - != ERROR_SUCCESS) { - return uv__new_sys_error(GetLastError()); - } + /* Fetch the size of the adapters reported by windows, and then get the */ + /* list itself. */ + win_address_buf_size = 0; + win_address_buf = NULL; - /* Count the number of interfaces */ - *count = 0; + for (;;) { + ULONG r; - for (adapter_address = adapter_addresses; - adapter_address != NULL; - adapter_address = adapter_address->Next) { + /* If win_address_buf is 0, then GetAdaptersAddresses will fail with */ + /* ERROR_BUFFER_OVERFLOW, and the required buffer size will be stored in */ + /* win_address_buf_size. */ + r = GetAdaptersAddresses(AF_UNSPEC, + 0, + NULL, + win_address_buf, + &win_address_buf_size); - if (adapter_address->OperStatus != IfOperStatusUp) - continue; + if (r == ERROR_SUCCESS) + break; - unicast_address = (IP_ADAPTER_UNICAST_ADDRESS_XP*) - adapter_address->FirstUnicastAddress; + free(win_address_buf); - while (unicast_address) { - (*count)++; - unicast_address = unicast_address->Next; + switch (r) { + case ERROR_BUFFER_OVERFLOW: + /* This happens when win_address_buf is NULL or too small to hold */ + /* all adapters. */ + win_address_buf = malloc(win_address_buf_size); + if (win_address_buf == NULL) + return uv__new_artificial_error(UV_ENOMEM); + + continue; + + case ERROR_NO_DATA: { + /* No adapters were found. */ + uv_address_buf = malloc(1); + if (uv_address_buf == NULL) + return uv__new_artificial_error(UV_ENOMEM); + + *count_ptr = 0; + *addresses_ptr = uv_address_buf; + + return uv_ok_; + } + + case ERROR_ADDRESS_NOT_ASSOCIATED: + return uv__new_artificial_error(UV_EAGAIN); + + case ERROR_INVALID_PARAMETER: + /* MSDN says: + * "This error is returned for any of the following conditions: the + * SizePointer parameter is NULL, the Address parameter is not + * AF_INET, AF_INET6, or AF_UNSPEC, or the address information for + * the parameters requested is greater than ULONG_MAX." + * Since the first two conditions are not met, it must be that the + * adapter data is too big. + */ + return uv__new_artificial_error(UV_ENOBUFS); + + default: + /* Other (unspecified) errors can happen, but we don't have any */ + /* special meaning for them. */ + assert(r != ERROR_SUCCESS); + return uv__new_sys_error(r); } } - *addresses = (uv_interface_address_t*) - malloc(*count * sizeof(uv_interface_address_t)); - if (!(*addresses)) { - uv_fatal_error(ERROR_OUTOFMEMORY, "malloc"); - } + /* Count the number of enabled interfaces and compute how much space is */ + /* needed to store their info. */ + count = 0; + uv_address_buf_size = 0; - address = *addresses; + for (win_address = win_address_buf; + win_address != NULL; + win_address = win_address->Next) { + /* Use IP_ADAPTER_UNICAST_ADDRESS_XP to retain backwards compatibility */ + /* with Windows XP */ + IP_ADAPTER_UNICAST_ADDRESS_XP* unicast_address; + int name_size; - for (adapter_address = adapter_addresses; - adapter_address != NULL; - adapter_address = adapter_address->Next) { - - if (adapter_address->OperStatus != IfOperStatusUp) + /* Interfaces that are not 'up' should not be reported. Also skip */ + /* interfaces that have no associated unicast address, as to avoid */ + /* allocating space for the name for this interface. */ + if (win_address->OperStatus != IfOperStatusUp || + win_address->FirstUnicastAddress == NULL) continue; - name = NULL; - unicast_address = (IP_ADAPTER_UNICAST_ADDRESS_XP*) - adapter_address->FirstUnicastAddress; + /* Compute the size of the interface name. */ + name_size = WideCharToMultiByte(CP_UTF8, + 0, + win_address->FriendlyName, + -1, + NULL, + 0, + NULL, + FALSE); + if (name_size <= 0) { + free(win_address_buf); + return uv__new_sys_error(GetLastError()); + } + uv_address_buf_size += name_size; - while (unicast_address) { - sock_addr = unicast_address->Address.lpSockaddr; - if (sock_addr->sa_family == AF_INET6) { - address->address.address6 = *((struct sockaddr_in6 *)sock_addr); - } else { - address->address.address4 = *((struct sockaddr_in *)sock_addr); - } - - address->is_internal = - adapter_address->IfType == IF_TYPE_SOFTWARE_LOOPBACK ? 1 : 0; - - if (!name) { - /* Convert FriendlyName to utf8 */ - length = uv_utf16_to_utf8(adapter_address->FriendlyName, -1, NULL, 0); - if (length) { - name = (char*)malloc(length); - if (!name) { - uv_fatal_error(ERROR_OUTOFMEMORY, "malloc"); - } - - if (!uv_utf16_to_utf8(adapter_address->FriendlyName, -1, name, - length)) { - free(name); - name = NULL; - } - } - } - - assert(name); - address->name = name; - - unicast_address = unicast_address->Next; - address++; + /* Count the number of addresses associated with this interface, and */ + /* compute the size. */ + for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS_XP*) + win_address->FirstUnicastAddress; + unicast_address != NULL; + unicast_address = unicast_address->Next) { + count++; + uv_address_buf_size += sizeof(uv_interface_address_t); } } - free(adapter_addresses); + /* Allocate space to store interface data plus adapter names. */ + uv_address_buf = malloc(uv_address_buf_size); + if (uv_address_buf == NULL) { + free(win_address_buf); + return uv__new_artificial_error(UV_ENOMEM); + } + + /* Compute the start of the uv_interface_address_t array, and the place in */ + /* the buffer where the interface names will be stored. */ + uv_address = uv_address_buf; + name_buf = (char*) (uv_address_buf + count); + + /* Fill out the output buffer. */ + for (win_address = win_address_buf; + win_address != NULL; + win_address = win_address->Next) { + IP_ADAPTER_UNICAST_ADDRESS_XP* unicast_address; + int name_size; + size_t max_name_size; + + if (win_address->OperStatus != IfOperStatusUp || + win_address->FirstUnicastAddress == NULL) + continue; + + /* Convert the interface name to UTF8. */ + max_name_size = (char*) uv_address_buf + uv_address_buf_size - name_buf; + if (max_name_size > (size_t) INT_MAX) + max_name_size = INT_MAX; + name_size = WideCharToMultiByte(CP_UTF8, + 0, + win_address->FriendlyName, + -1, + name_buf, + (int) max_name_size, + NULL, + FALSE); + if (name_size <= 0) { + free(win_address_buf); + free(uv_address_buf); + return uv__new_sys_error(GetLastError()); + } + + /* Add an uv_interface_address_t element for every unicast address. */ + for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS_XP*) + win_address->FirstUnicastAddress; + unicast_address != NULL; + unicast_address = unicast_address->Next) { + struct sockaddr* sa; + + uv_address->name = name_buf; + + sa = unicast_address->Address.lpSockaddr; + if (sa->sa_family == AF_INET6) + uv_address->address.address6 = *((struct sockaddr_in6 *) sa); + else + uv_address->address.address4 = *((struct sockaddr_in *) sa); + + uv_address->is_internal = + (win_address->IfType == IF_TYPE_SOFTWARE_LOOPBACK); + + uv_address++; + } + + name_buf += name_size; + } + + free(win_address_buf); + + *addresses_ptr = uv_address_buf; + *count_ptr = count; return uv_ok_; } @@ -850,15 +942,5 @@ uv_err_t uv_interface_addresses(uv_interface_address_t** addresses, void uv_free_interface_addresses(uv_interface_address_t* addresses, int count) { - int i; - char* freed_name = NULL; - - for (i = 0; i < count; i++) { - if (freed_name != addresses[i].name) { - freed_name = addresses[i].name; - free(freed_name); - } - } - free(addresses); } diff --git a/deps/uv/test/test-fs-event.c b/deps/uv/test/test-fs-event.c index 4d4cfbc31b1..47a53bd3ba7 100644 --- a/deps/uv/test/test-fs-event.c +++ b/deps/uv/test/test-fs-event.c @@ -294,6 +294,36 @@ TEST_IMPL(fs_event_watch_file_current_dir) { return 0; } +TEST_IMPL(fs_event_no_callback_after_close) { + uv_loop_t* loop = uv_default_loop(); + int r; + + /* Setup */ + remove("watch_dir/file1"); + remove("watch_dir/"); + create_dir(loop, "watch_dir"); + create_file(loop, "watch_dir/file1"); + + r = uv_fs_event_init(loop, + &fs_event, + "watch_dir/file1", + fs_event_cb_file, + 0); + ASSERT(r != -1); + + uv_close((uv_handle_t*)&fs_event, close_cb); + touch_file(loop, "watch_dir/file1"); + uv_run(loop); + + ASSERT(fs_event_cb_called == 0); + ASSERT(close_cb_called == 1); + + /* Cleanup */ + remove("watch_dir/file1"); + remove("watch_dir/"); + + return 0; +} TEST_IMPL(fs_event_no_callback_on_close) { uv_fs_t fs_req; diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h index d37725885c2..27e9d91c94a 100644 --- a/deps/uv/test/test-list.h +++ b/deps/uv/test/test-list.h @@ -161,6 +161,7 @@ TEST_DECLARE (fs_event_watch_dir) TEST_DECLARE (fs_event_watch_file) TEST_DECLARE (fs_event_watch_file_twice) TEST_DECLARE (fs_event_watch_file_current_dir) +TEST_DECLARE (fs_event_no_callback_after_close) TEST_DECLARE (fs_event_no_callback_on_close) TEST_DECLARE (fs_event_immediate_close) TEST_DECLARE (fs_event_close_with_pending_event) @@ -401,6 +402,7 @@ TASK_LIST_START TEST_ENTRY (fs_event_watch_file) TEST_ENTRY (fs_event_watch_file_twice) TEST_ENTRY (fs_event_watch_file_current_dir) + TEST_ENTRY (fs_event_no_callback_after_close) TEST_ENTRY (fs_event_no_callback_on_close) TEST_ENTRY (fs_event_immediate_close) TEST_ENTRY (fs_event_close_with_pending_event) From 44ceb5d8f5df92a49c0d25ff3438228d7003712c Mon Sep 17 00:00:00 2001 From: isaacs Date: Sat, 29 Dec 2012 17:26:32 -0800 Subject: [PATCH 5/7] blog: Post for v0.9.5 --- doc/blog/release/v0.9.5.md | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 doc/blog/release/v0.9.5.md diff --git a/doc/blog/release/v0.9.5.md b/doc/blog/release/v0.9.5.md new file mode 100644 index 00000000000..53632205a44 --- /dev/null +++ b/doc/blog/release/v0.9.5.md @@ -0,0 +1,82 @@ +category: release +version: 0.9.5 +date: Sun Dec 30 01:19:51 UTC 2012 +slug: node-v0-9-5-unstable +title: Node v0.9.5 (Unstable) + +2012.12.30, Version 0.9.5 (Unstable) + +* assert: improve support for new execution contexts (lukebayes) + +* domain: use camelCase instead of snake_case (isaacs) + +* domain: Do not use uncaughtException handler (isaacs) + +* fs: make 'end' work with ReadStream without 'start' (Ben Noordhuis) + +* https: optimize createConnection() (Ryunosuke SATO) + +* buffer: speed up base64 encoding by 20% (Ben Noordhuis) + +* doc: Colorize API stabilitity index headers in docs (Luke Arduini) + +* net: socket.readyState corrections (bentaber) + +* http: Performance enhancements for http under streams2 (isaacs) + +* stream: fix to emit end event on http.ClientResponse (Shigeki Ohtsu) + +* stream: fix event handler leak in readstream pipe and unpipe (Andreas Madsen) + +* build: Support ./configure --tag switch (Maciej MaƂecki) + +* repl: don't touch `require.cache` (Nathan Rajlich) + +* node: Emit 'exit' event when exiting for an uncaught exception (isaacs) + + +Source Code: http://nodejs.org/dist/v0.9.5/node-v0.9.5.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.9.5/node-v0.9.5.pkg + +Windows Installer: http://nodejs.org/dist/v0.9.5/node-v0.9.5-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.9.5/x64/node-v0.9.5-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.9.5/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.9.5/node-v0.9.5-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.9.5/node-v0.9.5-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.9.5/node-v0.9.5-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.9.5/node-v0.9.5-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.9.5/ + +Website: http://nodejs.org/docs/v0.9.5/ + +Documentation: http://nodejs.org/docs/v0.9.5/api/ + +Shasums: + +``` +d44535e086c3f0fe47152b9323189c18a488d995 node-v0.9.5-darwin-x64.tar.gz +b588332e38e3ddd0424b18d14a3c6c65c5cad6f6 node-v0.9.5-darwin-x86.tar.gz +17b07641b59bc56582e68db6bd52c1b41bb06a5e node-v0.9.5-linux-x64.tar.gz +89656e3dc094a6fa4244a03ac85e9b08b7443a50 node-v0.9.5-linux-x86.tar.gz +bf84b80ea80b4cb20767d4b3f276979f0f3d8866 node-v0.9.5-sunos-x64.tar.gz +4f98560e55db63f323b6f75b22538d96b199892c node-v0.9.5-sunos-x86.tar.gz +7ed38be34e5377f45e8906c4d887de262c1925e2 node-v0.9.5-x86.msi +a1f1322fcaa5535ae830f3242bcdd213388357cc node-v0.9.5.tar.gz +94c22b744945e9bc8b3f9fd31991cb6b87f727ce node.exe +e809779c8071abf05650fbb47e207140829dc62c node.exp +cec09944297546185070c809a78931839e3c2695 node.lib +5a3a4f3de4b8bf4209ecc2e6d40418d6a7e8fcac node.pdb +55c986c14a72081757002f8df43272b20f024c57 x64/node-v0.9.5-x64.msi +55514dd925a9b24cb3925f89facbec5efb2a99aa x64/node.exe +920e2d3319eac8a3356023a1cb8c61f139f80398 x64/node.exp +e072006328dacce920e4951596e457e58e6310d0 x64/node.lib +633816d865155148129ca21399e411f1240b2cce x64/node.pdb +``` From acc085e13183d7d3760cca818a6496b8b625bf36 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 31 Dec 2012 00:36:47 +0100 Subject: [PATCH 6/7] doc: add CONTRIBUTING.md --- CONTRIBUTING.md | 145 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..eecd1e6ca78 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,145 @@ +# CONTRIBUTING + +The node.js project welcomes new contributors. This document will guide you +through the process. + + +### FORK + +Fork the project [on GitHub](https://github.com/joyent/node) and check out +your copy. + +``` +$ git clone git@github.com:username/node.git +$ cd node +$ git remote add upstream git://github.com/joyent/node.git +``` + +Now decide if you want your feature or bug fix to go into the master branch +or the stable branch. As a rule of thumb, bug fixes go into the stable branch +while new features go into the master branch. + +The stable branch is effectively frozen; patches that change the node.js +API/ABI or affect the run-time behavior of applications get rejected. + +The rules for the master branch are less strict; consult the +[stability index page][] for details. + +In a nutshell, modules are at varying levels of API stability. Bug fixes are +always welcome but API or behavioral changes to modules at stability level 3 +and up are off-limits. + +Node.js has several bundled dependencies in the deps/ directory that are not +part of the project proper. Any changes to files in that directory or its +subdirectories should be sent to their respective projects. Do not send +that patch to us, we cannot accept it. + +In case of doubt, open an issue in the [issue tracker][], post your question +to the [node.js mailing list][] or contact one of the [project maintainers][] +on [IRC][]. + +Especially do so if you plan to work on something big. Nothing is more +frustrating than seeing your hard work go to waste because your vision +does not align with that of a project maintainer. + + +### BRANCH + +Okay, so you have decided on the proper branch. Create a feature branch +and start hacking: + +``` +$ git checkout -b my-feature-branch -t origin/v0.8 +``` + +(Where v0.8 is the latest stable branch as of this writing.) + + +### COMMIT + +Make sure git knows your name and email address: + +``` +$ git config --global user.name "J. Random User" +$ git config --global user.email "j.random.user@example.com" +``` + +Writing good commit logs is important. A commit log should describe what +changed and why. Follow these guidelines when writing one: + +1. The first line should be 50 characters or less and contain a short + description of the change. +2. Keep the second line blank. +3. Wrap all other lines at 72 columns. + +A good commit log looks like this: + +``` +Header line: explaining the commit in one line + +Body of commit message is a few lines of text, explaining things +in more detail, possibly giving some background about the issue +being fixed, etc etc. + +The body of the commit message can be several paragraphs, and +please do proper word-wrap and keep columns shorter than about +72 characters or so. That way `git log` will show things +nicely even when it is indented. +``` + +The header line should be meaningful; it is what other people see when they +run `git shortlog` or `git log --oneline`. + +Have a look at `git log` for inspiration. + + +### REBASE + +Use `git rebase` (not `git merge`) to sync your work from time to time. + +``` +$ git fetch upstream +$ git rebase upstream/v0.8 # or upstream/master +``` + + +### TEST + +Bug fixes and features should come with tests. Add your tests in the +test/simple/ directory. Look at other tests to see how they should be +structured (license boilerplate, common includes, etc.). + +``` +$ make jslint test +``` + +Make sure the linter is happy and that all tests pass. Please, do not submit +patches that fail either check. + + +### PUSH + +``` +$ git push origin my-feature-branch +``` + +Go to https://github.com/username/node and select your feature branch. Click +the 'Pull Request' button and fill out the form. + +Pull requests are usually reviewed within a few days. If there are comments +to address, apply your changes in a separate commit and push that to your +feature branch. Post a comment in the pull request afterwards; GitHub does +not send out notifications when you add commits. + + +### CONTRIBUTOR LICENSE AGREEMENT + +Please visit http://nodejs.org/cla.html and sign the Contributor License +Agreement. You only need to do that once. + + +[stability index page]: https://github.com/joyent/node/blob/master/doc/api/documentation.markdown +[issue tracker]: https://github.com/joyent/node/issues +[node.js mailing list]: http://groups.google.com/group/nodejs +[IRC]: http://webchat.freenode.net/?channels=node.js +[project maintainers]: https://github.com/joyent/node/wiki/Project-Organization From 50e88d0b66adda159739c6f1a875c255924e108d Mon Sep 17 00:00:00 2001 From: Tim Bradshaw Date: Thu, 20 Dec 2012 22:29:45 +0000 Subject: [PATCH 7/7] os: change CPU time from Integer to Number CPU time values must be Numbers, not Integers, as they can be too large for Integers on 32 bit platforms. --- src/node_os.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node_os.cc b/src/node_os.cc index c09458e60d4..f823ed454ea 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -116,15 +116,15 @@ static Handle GetCPUInfo(const Arguments& args) { for (i = 0; i < count; i++) { Local times_info = Object::New(); times_info->Set(String::New("user"), - Integer::New(cpu_infos[i].cpu_times.user)); + Number::New(cpu_infos[i].cpu_times.user)); times_info->Set(String::New("nice"), - Integer::New(cpu_infos[i].cpu_times.nice)); + Number::New(cpu_infos[i].cpu_times.nice)); times_info->Set(String::New("sys"), - Integer::New(cpu_infos[i].cpu_times.sys)); + Number::New(cpu_infos[i].cpu_times.sys)); times_info->Set(String::New("idle"), - Integer::New(cpu_infos[i].cpu_times.idle)); + Number::New(cpu_infos[i].cpu_times.idle)); times_info->Set(String::New("irq"), - Integer::New(cpu_infos[i].cpu_times.irq)); + Number::New(cpu_infos[i].cpu_times.irq)); Local cpu_info = Object::New(); cpu_info->Set(String::New("model"), String::New(cpu_infos[i].model));