The Nodesource Blog

#shoptalk Subscribe

Node.js v4.2.2 Release Brief

At the good pace of three week’s time since Node v4.2 went into Long Term Support mode, we have our first set of patch fixes for the LTS release line. All of these fixes have already been released in v5.0.0 for a week to ensure their stability.

As with all releases within major version lines, minor and patch upgrades should be drop-in replacements for previous versions. Rebuilding add-ons should not be necessary. Please see Dan Shaw’s SemVer blog post for more info.

Code Change Stats

Of a total of 62 commits:

  • 14 were documentation-only commits.
  • 29 only modify tests.
  • 3 patches were backported onto V8:
    • [a6469e901a] - Fix perf-basic-prof filename truncation issue (010897c from V8 upstream) (Ali Ijaz Sheikh) #3520
    • [cadee67c25] - Fix crash during the scavenge of ArrayBuffer (8d6a228 from V8 upstream) (Fedor Indutny) #3549
    • [0b32bbbf69] - Fix builtin code size on PPC (d3a1fa0 from V8 upstream) (Michael Dawson) #3474

The remaining significant commits are as follows:

  • [1d0f2cbf87] - buffer: fix value check for writeUInt{B,L}E (Trevor Norris) #3500
  • [2a45b72b4a] - buffer: don't CHECK on zero-sized realloc (Ben Noordhuis) #3499
  • [dc655e1dd2] - build: rectify --link-module help text (P.S.V.R) #3379
  • [46c8c94055] - fs: reduced duplicate code in fs.write() (ronkorving) #2947
  • [0427cdf094] - http: fix stalled pipeline bug (Fedor Indutny) #3342
  • [2109708186] - lib: fix cluster handle leak (Rich Trott) #3510
  • [f49c7c6955] - lib: avoid REPL exit on completion error (Rich Trott) #3358
  • [8a2c4aeeaa] - repl: handle comments properly (Sakthipriyan Vairamani) #3515
  • [a04408acce] - repl: limit persistent history correctly on load (Jeremiah Senkpiel) #2356
  • [5d1f1c5fa8] - src: wrap source before doing syntax check (Evan Lucas) #3587
  • [3bafe1a59b] - src: fix race condition in debug signal on exit (Ben Noordhuis) #3528
  • [fe01d0df7a] - src: fix exception message encoding on Windows (Brian White) #3288
  • [4bac5d9ddf] - stream: avoid unnecessary concat of a single buffer. (Calvin Metcalf) #3300
  • [117fb47a16] - stream: fix signature of _write() in a comment (Fábio Santos) #3248
  • [8d78d687d5] - timers: reuse timer in setTimeout().unref() (Fedor Indutny) #3407
  • [e69c869399] - tls: TLSSocket options default isServer false (Yuval Brik) #2614

Notable Changes

  • buffer:
    • Fixed value checks for writeUInt{B,L}E (Trevor Norris) #3500.
    • Don't CHECK on zero-sized realloc (Ben Noordhuis) #3499.
  • cluster: Fixed a cluster handle leak (Rich Trott) #3510.
  • fs: Reduced duplicate code in fs.write() (ronkorving) #2947.
  • http: Fixed a bug where pipelined http requests would stall (Fedor Indutny) #3342.
  • repl:
    • Avoid REPL exit on completion error (Rich Trott) #3358.
    • Now handles comments properly (Sakthipriyan Vairamani) #3515.
    • Limit persistent history size correctly on load (Jeremiah Senkpiel) #2356.
  • src:
    • Fixed a race condition in debug signal on exit (Ben Noordhuis) #3528.
    • Fix exception message encoding on Windows (Brian White) #3288.
  • stream: Avoid unnecessary concat of a single buffer (Calvin Metcalf) #3300.
  • timers: Attempt to reuse the timer handle for setTimeout().unref() (Fedor Indutny) #3407.
    • This fixes a long-standing known issue where unrefed timers would previously hold beforeExit open.
  • tls: Ensure TLSSocket’s isServer option defaults to false (Yuval Brik) #2614.

Git Diffstats

(Showing the delta between v4.2.1 and v4.2.2, ignoring deps/npm.)

Without deps, docs, benchmarks, or tests:

 configure               |   3 +-
 lib/_http_common.js     |   4 +
 lib/_http_outgoing.js   |  66 ++++++++---------
 lib/_http_server.js     |  39 ++++++++--
 lib/_stream_readable.js |   2 +
 lib/_stream_writable.js |   2 +-
 lib/_tls_wrap.js        |   7 +-
 lib/buffer.js           |  12 ++-
 lib/cluster.js          |   5 +-
 lib/fs.js               |  11 +--
 lib/internal/repl.js    |   4 +-
 lib/repl.js             | 185 ++++++++++++++++++++++++++--------------------
 lib/timers.js           |  29 ++++++--
 src/atomic-polyfill.h   |  18 +++++
 src/node.cc             | 113 +++++++++++++++++++++-------
 src/node.js             |   2 +
 src/node_buffer.cc      |  30 +++++---
 src/node_http_parser.cc |  17 +++--
 src/node_version.h      |   4 +-
 19 files changed, 361 insertions(+), 192 deletions(-)

Deps only:

 deps/v8/src/builtins.cc         |  3 ++
 deps/v8/src/heap/heap.cc        | 97 +++++++++++++++++++++++++--------------
 deps/v8/src/heap/heap.h         |  3 ++
 deps/v8/src/log.cc              | 12 +++--
 deps/v8/test/cctest/test-api.cc | 26 +++++++++++
 deps/v8/test/cctest/test-log.cc | 55 ++++++++++++++++++++++
 6 files changed, 157 insertions(+), 39 deletions(-)

Docs only:

 CHANGELOG.md                   | 127 ++++++++++++++++++++++++++++++++++-----
 doc/api/assert.markdown        |  20 ++++--
 doc/api/buffer.markdown        |  35 +++++++++--
 doc/api/child_process.markdown |  11 +++-
 doc/api/cluster.markdown       |   5 +-
 doc/api/crypto.markdown        |   4 +-
 doc/api/http.markdown          |   9 ++-
 doc/api/process.markdown       |  41 ++++++++++---
 doc/api/tls.markdown           |  32 ++++++----
 9 files changed, 225 insertions(+), 59 deletions(-)

Tests & Benchmarks only:

   0.4% test/addons/async-hello-world/
   0.2% test/addons/heap-profiler/
   6.4% test/addons/make-callback/
   0.0% test/fixtures/syntax/
   0.8% test/internet/
   0.1% test/message/
  77.4% test/parallel/
   0.2% test/pummel/
  12.0% test/sequential/
   1.9% test/
 96 files changed, 1040 insertions(+), 348 deletions(-)

Most active commit

Of the 62 commits, eb7c3fb was the most active (not counting npm updates):

commit eb7c3fb2f4512b828024651bd01c425055485043
Author: Rich Trott <rtrott@gmail.com>
Date:   Sun Oct 11 20:53:31 2015 -0700

    test: split up buffer tests for reliability

    The Pi 1's in CI don't always fail on the buffer.toString() tests. But
    they time out sometimes, so let's split the tests up so they don't.

    PR-URL: https://github.com/nodejs/node/pull/3323
    Reviewed By: Evan Lucas <evanlucas@me.com>
    Reviewed-By: Brian White <mscdex@mscdex.net>
    Reviewed By: Trevor Norris <trev.norris@gmail.com>

 ...-stringbytes-external-exceed-max-by-1-ascii.js | 23 +++++++++
 ...stringbytes-external-exceed-max-by-1-base64.js | 23 +++++++++
 ...stringbytes-external-exceed-max-by-1-binary.js | 31 ++++++++++++
 ...st-stringbytes-external-exceed-max-by-1-hex.js | 23 +++++++++
 ...t-stringbytes-external-exceed-max-by-1-utf8.js | 27 +++++++++++
 .../test-stringbytes-external-exceed-max-by-1.js  | 52 ---------------------
 6 files changed, 127 insertions(+), 52 deletions(-)

These relatively quick patch releases will become routine though v4’s LTS lifecycle. We expect releases in an LTS release line slow down as time goes on, especially towards the end of the LTS lifecycle. 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 issues identified and fixed above.