You have reached the beginning of time!

Node.js v4.1.0 Release Summary and Stats

9 days after Node.js v4.0.0 was released, we now have v4.1.0. This update contains fixes, performance improvements, documentation updates and some minor feature additions. Because it's a v4 release, it should be a drop-in replacement for v4.0.0 and rebuilding add-ons should not be necessary.

Code Change Stats

Of a total of 53 commits:

  • 17 were documentation-only commits.
  • 9 only modified tests and 5 only affect internal-only tooling.
  • 7 of the commits consist of 3 dependency updates + floating patches:
    • libuv @ 1.7.4
    • v8 @ 4.5.103.33 (+ 3 floating upstreamed patches)
    • npm @ 2.14.3 (Patched with node-gyp @ 3.0.3)
  • One fixes a link in the .msi installer.

3 commits were tagged as semver-minor, justifying the jump to 4.1

  • [43397b204e] - (SEMVER-MINOR) build: Updates to enable AIX support (Michael Dawson) #2364
  • [2b6aa9415f] - (SEMVER-MINOR) fs: implemented WriteStream#writev (Ron Korving) #2167
  • [f931b9dd95] - (SEMVER-MINOR) timer: ref/unref return self (Sam Roberts) #2905

The remaining significant commits are as follows:

  • [9683e5df51] - bindings: close after reading module struct (Fedor Indutny) #2792
  • [4b4cfa2d44] - buffer: always allocate typed arrays outside heap (Trevor Norris) #2893
  • [7df018a29b] - buffer: construct Uint8Array in JS (Trevor Norris) #2866
  • [6108ea9bb4] - fs: consider NaN/Infinity in toUnixTimestamp (Yazhong Liu) #2387
  • [431bf74c55] - http: default Agent.getName to 'localhost' (Malcolm Ahoy) #2825
  • [ea15d71c16] - http_server: fix resume after socket close (Fedor Indutny) #2824
  • [8e5843405b] - src: null env_ field from constructor (Trevor Norris) #2913
  • [0a5f80a11f] - src: use subarray() in Buffer#slice() for speedup (Karl Skomski) #2777
  • [57707e2490] - src: use ZCtxt as a source for v8::Isolates (Roman Klauke) #2547
  • [b0df2273ab] - src: fix v8::CpuProfiler idle sampling (Oleksandr Chekhovskyi) #2324
  • [eaa8e60b91] - streams: refactor LazyTransform to internal/ (Brendan Ashworth) #2566

Notable Changes (extended)

  • buffer: Buffers are now created in JavaScript, rather than C++. This increases the speed of buffer creation (Trevor Norris) #2866.

    • This shouldn’t effect extending or otherwise working with Buffers.
  • buffer: Buffer#slice() now uses Uint8Array#subarray() internally, increasing slice() performance (Karl Skomski) #2777.

  • fs: fs.WriteStream now implements _writev, allowing for super-fast bulk writes (Ron Korving) #2167.

    • `WriteStream.prototype._writev is now set to a function as can be seen in the source.
    • This allows for the WriteStream’s internal buffer to be bulk-written out to disk. (Faster than before by about an order of magnitude, depending on the use-case.)
  • fs: fs.utimes() now properly converts numeric strings, NaN, and Infinity (Yazhong Liu) #2387.

    • Non-finite numeric values (such as NaN or Infinity) now get interpreted as the current time (via Date.now()).
    • Numeric strings like ’123456789’ will now be converted into their numeric value (via +value).
  • http: default Agent.getName to 'localhost' (Malcolm Ahoy) #2825.

    • The commit message here is not exactly correct. The default was already ’localhost’, and this merely cleans up the default logic.
  • http: Fixed an issue with certain write() sizes causing errors when using http.request() (Fedor Indutny) #2824.

    • As reported in #2821, 4.0.0 would wrongly throw an internal error if a written data had a length of greater than 2^14 bytes but less than 2^16.
    • e.g. http.request(url).write(new Array(1639).join(‘0123456789’).end()
  • npm: Upgrade to version 2.14.3, see https://github.com/npm/npm/releases/tag/v2.14.4 for more details (Kat Marchán) #2822.

  • src: V8 cpu profiling no longer erroneously shows idle time (Oleksandr Chekhovskyi) #2324.

    • Debugging with v8 profiling tools such as node-inspector is now much more useful.
  • timers: #ref() and #unref() now return the timer they belong to (Sam Roberts) #2905.

  • v8: Lateral upgrade to 4.5.103.33 from 4.5.103.30, contains minor fixes (Ali Ijaz Sheikh) #2870.

    • This fixes a previously known bug where some computed object shorthand properties did not work correctly (#2507).
    • Previously [{ [prop]: val }] wrongly evaluated to [{}].

Git Diffstats

The delta between 4.0.0 and 4.1.0, ignoring dependencies, docs, and tests:

 .eslintrc                              | 13 +++---
 Makefile                               |  1 +
 common.gypi                            | 24 +++++++++--
 configure                              | 16 ++++---
 lib/_http_agent.js                     |  9 ++--
 lib/_http_server.js                    |  8 ++--
 lib/buffer.js                          | 63 ++++++++++++----------------
 lib/crypto.js                          | 32 +-------------
 lib/fs.js                              | 50 ++++++++++++++++++++++
 lib/internal/streams/lazy_transform.js | 39 +++++++++++++++++
 lib/timers.js                          |  3 ++
 node.gyp                               |  6 +++
 src/env-inl.h                          | 26 ++++++++++++
 src/env.h                              | 23 ++++++++++
 src/node.cc                            | 43 +++++++++++++++----
 src/node_buffer.cc                     | 76 +++++++---------------------------
 src/node_file.cc                       | 55 ++++++++++++++++++++++++
 src/node_internals.h                   | 20 ++++-----
 src/node_version.h                     |  4 +-
 src/node_zlib.cc                       |  7 ++--
 tools/js2c.py                          |  2 +-
 tools/msvs/msi/product.wxs             |  2 +-
 tools/test.py                          |  8 ++--
 tools/utils.py                         |  2 +
 tools/v8-prof/polyfill.js              |  1 +
 25 files changed, 351 insertions(+), 182 deletions(-)

Dependencies only:

 deps/cares/cares.gyp                               |   4 +
 deps/cares/common.gypi                             |   2 +-
 deps/cares/config/aix/ares_config.h                | 515 +++++++++++++++++++++
 deps/openssl/config/Makefile                       |   8 +-
 deps/openssl/config/archs/aix-gcc/opensslconf.h    | 261 +++++++++++
 deps/openssl/config/archs/aix64-gcc/opensslconf.h  | 261 +++++++++++
 deps/openssl/config/opensslconf.h                  |   9 +
 deps/openssl/openssl.gyp                           |   8 +
 deps/uv/AUTHORS                                    |   5 +
 deps/uv/CONTRIBUTING.md                            |   2 +-
 deps/uv/ChangeLog                                  |  31 ++
 deps/uv/appveyor.yml                               |   2 +-
 deps/uv/common.gypi                                |   2 +-
 deps/uv/configure.ac                               |   2 +-
 deps/uv/docs/src/dll.rst                           |   2 +-
 deps/uv/docs/src/request.rst                       |   2 +-
 deps/uv/docs/src/stream.rst                        |  24 +-
 deps/uv/docs/src/timer.rst                         |  10 +-
 deps/uv/include/uv-version.h                       |   2 +-
 deps/uv/include/uv-win.h                           |  12 +-
 deps/uv/src/unix/freebsd.c                         |  14 +-
 deps/uv/src/unix/fs.c                              |   9 +-
 deps/uv/src/unix/process.c                         |   7 +-
 deps/uv/src/win/thread.c                           |  92 ++--
 deps/uv/src/win/tty.c                              |  38 +-
 deps/uv/test/test-fs.c                             |  47 +-
 deps/uv/test/test-ipc.c                            |  25 +-
 deps/v8/build/features.gypi                        |   4 +-
 deps/v8/codereview.settings                        |   2 +-
 deps/v8/include/v8-version.h                       |   2 +-
 deps/v8/src/accessors.cc                           |  41 +-
 deps/v8/src/ast.cc                                 |   1 +
 deps/v8/src/heap/mark-compact.cc                   |  28 ++
 deps/v8/src/heap/objects-visiting-inl.h            |  11 +-
 deps/v8/src/heap/store-buffer.cc                   |  11 +
 deps/v8/src/objects-inl.h                          |  28 ++
 deps/v8/src/objects.cc                             |   4 +-
 deps/v8/src/objects.h                              |  17 +-
 deps/v8/src/v8natives.js                           |   4 +-
 deps/v8/test/cctest/test-api.cc                    |  22 +
 deps/v8/test/mjsunit/function-bind-name.js         |   7 +-
 .../mjsunit/harmony/computed-property-names.js     |  56 +++
 .../mjsunit/regress/regress-typedarray-length.js   |  37 ++
 43 files changed, 1512 insertions(+), 159 deletions(-)

Docs only:

 CONTRIBUTING.md                |  4 +--
 README.md                      |  9 ++---
 benchmark/README.md            | 12 +++----
 doc/api/assert.markdown        |  2 +-
 doc/api/buffer.markdown        |  4 +--
 doc/api/child_process.markdown | 23 ++++++++----
 doc/api/cluster.markdown       |  4 ++-
 doc/api/events.markdown        |  4 +--
 doc/api/fs.markdown            |  8 +++++
 doc/api/modules.markdown       |  2 +-
 doc/api/net.markdown           |  2 +-
 doc/api/process.markdown       | 82 +++++++++++++++++++++++++++++++-----------
 doc/api/repl.markdown          |  1 +
 doc/api/stream.markdown        |  4 +--
 doc/api/timers.markdown        |  4 +++
 15 files changed, 116 insertions(+), 49 deletions(-)

Tests only:

 test/common.js                                     |  10 +-
 test/disabled/GH-670.js                            |  39 ---
 .../internet/test-dgram-broadcast-multi-process.js |   2 +-
 .../internet/test-dgram-multicast-multi-process.js |   2 +-
 test/internet/test-dns-ipv4.js                     | 203 +++++++++++++
 test/internet/test-dns-ipv6.js                     | 219 ++++++++++++++
 test/internet/test-dns.js                          | 333 ---------------------
 test/parallel/parallel.status                      |   1 -
 test/parallel/test-buffer-slow.js                  |   2 +-
 test/parallel/test-buffer.js                       |  32 ++
 test/parallel/test-fs-readfile-pipe-large.js       |   4 +-
 test/parallel/test-fs-readfile-pipe.js             |   4 +-
 test/parallel/test-fs-readfilesync-pipe-large.js   |   4 +-
 test/parallel/test-fs-utimes.js                    |   8 +-
 test/parallel/test-http-regr-gh-2821.js            |  24 ++
 test/parallel/test-process-chdir.js                |  28 ++
 test/parallel/test-stringbytes-external.js         |   4 +-
 test/parallel/test-tick-processor.js               |  50 ++--
 test/parallel/test-timers-unref.js                 |   8 +
 test/sequential/test-chdir.js                      |  38 ---
 test/testpy/__init__.py                            |  22 +-
 21 files changed, 580 insertions(+), 457 deletions(-)

Most active commit

Of the 54 commits, (not counting npm updates), 43397b2 was the most active.

commit 43397b204e0f199866c67a30f44247b9667eed0b
Author: Michael Dawson <michael_dawson@ca.ibm.com>
Date:   Wed Aug 12 11:53:33 2015 -0400

    build: Updates to enable AIX support
    
    These are the core changes that allow AIX to compile.  There
    are still some test failures as there are some patches needed for
    libuv and npm that we'll need to contribute through those
    communities but this set allows node to be built on AIX and
    pass most of the core tests
    
    The change in js2c is because AIX does not support $ in
    identifier names.  See the discussion/agreement in
    https://github.com/nodejs/node/issues/2272
    
    PR-URL: https://github.com/nodejs/node/pull/2364
    Reviewed-By: Ben Noordhuis <ben@strongloop.com>
    Reviewed-By: Rod Vagg <r@va.gg>

 common.gypi                                       |  24 +-
 configure                                         |  16 +-
 deps/cares/cares.gyp                              |   4 +
 deps/cares/common.gypi                            |   2 +-
 deps/cares/config/aix/ares_config.h               | 515 ++++++++++++++++++++++
 deps/openssl/config/Makefile                      |   8 +-
 deps/openssl/config/archs/aix-gcc/opensslconf.h   | 261 +++++++++++
 deps/openssl/config/archs/aix64-gcc/opensslconf.h | 261 +++++++++++
 deps/openssl/config/opensslconf.h                 |   9 +
 deps/openssl/openssl.gyp                          |   8 +
 node.gyp                                          |   5 +
 src/node.cc                                       |   4 +
 test/common.js                                    |   1 +
 test/parallel/test-fs-readfile-pipe-large.js      |   4 +-
 test/parallel/test-fs-readfile-pipe.js            |   4 +-
 test/parallel/test-fs-readfilesync-pipe-large.js  |   4 +-
 tools/js2c.py                                     |   2 +-
 tools/utils.py                                    |   2 +
 18 files changed, 1113 insertions(+), 21 deletions(-)

Expect more frequent updates to Node following v4.0.0. There is a lot more effort being put into core than in the recent past and frequent releases mean that the work being done gets into your hands quicker. We will be sure to let you know when a release contains a critical update and a recommendation to upgrade. Of course, we'd love you to upgrade, but this release is not critical unless you are experiencing one of the bugs identified and fixed above—the HTTP bug is likely to have impacted a decent number of people.

The NodeSource platform offers a high-definition view of the performance, security and behavior of Node.js applications and functions.

Start for Free