Node.js v4.2.1 Release Summary and Stats - NodeSource

The NodeSource Blog

You have reached the beginning of time!

Node.js v4.2.1 Release Summary and Stats

Closely tracking the Long Term Support plan, 4.2.0 and 4.2.1 have been released this week as LTS. This means the 4.x release line has moved into LTS-mode and will no longer receive new features or minor version bumps unless necessary for security. These are v4 releases and as such should be a drop-in replacements for previous v4.x releases. Rebuilding add-ons should not be necessary.

NOTICE: v4.2.1 has been released to fix two critical regressions in v4.2.0. It is highly suggested you use v4.2.1 instead of v4.2.0. This blog post covers both releases.

In-line with the LTS plan, Node.js collaborators chose “Argon” as the codename for v4 LTS from the Periodic Table of Elements, in alphabetical order by the first letter. The new process.release.lts property in node contains the string ”Argon” for easily checking if the current node is an LTS version. This property will be undefined in regular Stable releases.

Additionally the 4.2.0 and 4.2.1 updates also come with the features and numerous minor fixes listed below.

Code Change Stats

Of a total of 62 commits:

  • 13 were documentation-only commits.
  • 13 only modify tests and 3 only affect internal-only tooling.
  • 2 of the commits consist of 2 dependency updates:

7 commits were tagged as semver-minor, justifying the jump to v4.2.0:

  • [8b50e95f06] - (SEMVER-MINOR) deps: backport 1ee712a from V8 upstream (Julien Gilli) #3036
  • [4a35ba4966] - (SEMVER-MINOR) fs: include filename in watch errors (charlierudolph) #2748
  • [9d65528b01] - (SEMVER-MINOR) node: add -c|--check CLI arg to syntax check script (Dave Eddy) #2411
  • [42b936e78d] - (SEMVER-MINOR) src: add process.release.lts property (Rod Vagg) #3212
  • [d99336a391] - (SEMVER-MINOR) src: replace naive search in Buffer::IndexOf (Karl Skomski) #2539
  • [546e8333ba] - (SEMVER-MINOR) src: fix --abort-on-uncaught-exception (Jeremy Whitlock) #3036
  • [7271cb047c] - (SEMVER-MINOR) src: add process.versions.icu (Evan Lucas) #3102

The remaining significant commits are as follows:

  • [8383c4fe00] - assert: support arrow functions in .throws() (Ben Noordhuis) #3276
  • [3eaa593a32] - async_wrap: correctly pass parent to init callback (Trevor Norris) #3216
  • [b3cbd13340] - buffer: fix assertion error in WeakCallback (Fedor Indutny) #3329
  • [54795620f6] - buffer: don't abort on prototype getters (Trevor Norris) #3302
  • [660f7591c8] - buffer: FreeCallback should be tied to ArrayBuffer (Fedor Indutny) #3198
  • [651a5b51eb] - buffer: only check if instance is Uint8Array (Trevor Norris) #3080
  • [d5a1b1ad7c] - buffer: clean up usage of proto (Trevor Norris) #3080
  • [9136359d57] - build: make icu download path customizable (Johan Bergström) #3200
  • [b3c5ad10a8] - build: add --with-arm-fpu option (Jérémy Lal) #3228
  • [f00f3268e4] - build: intl: avoid 'duplicate main()' on ICU 56 (Steven R. Loomis) #3066
  • [2ddbbfd164] - http: cork/uncork before flushing pipelined res (Fedor Indutny) #3172
  • [f638402e2f] - http: add comment about outputSize in res/server (Fedor Indutny) #3128
  • [1850879b0e] - js_stream: prevent abort if isalive doesn't exist (Trevor Norris) #3282
  • [c245a199a7] - lib: fix undefined timeout regression (Ryan Graham) #3331
  • [63644dd1cd] - lib: remove redundant code, add tests in timers.js (Rich Trott) #3143
  • [74f443583c] - module: use UNC paths when loading native addons (Justin Chase) #2965
  • [01cb3fc36b] - net: don't throw on bytesWritten access (Trevor Norris) #3305
  • [589287b2e3] - src: convert BE-utf16-string to LE before search (Karl Skomski) #3295
  • [2314378f06] - src: fix u-a-free if uv returns err in ASYNC_CALL (Karl Skomski) #3049
  • [7b9f78acb2] - stream: avoid pause with unpipe in buffered write (Brian White) #2325
  • [af10df6108] - tls: use parent handle's close callback (Fedor Indutny) #2991
  • [e0fffca836] - util: fix for inspecting promises (Evan Lucas) #3221
  • [8dfdee3733] - util: correctly inspect Map/Set Iterators (Evan Lucas) #3119
  • [b5c51fdba0] - util: fix check for Array constructor (Evan Lucas) #3119

Notable Changes (extended)

The first Node.js LTS release! See https://github.com/nodejs/LTS/ for details of the LTS process.

v4.2.1

  • Includes fixes for two regressions
    • Assertion error in WeakCallback - see #3329
    • Prevented some c++ add-ons from working correctly in v4.2.0.
    • Undefined timeout regression - see #3331
    • Timeouts with ](https://github.com/nodejs/node/commit/2ddbbfd164 timeouts did not work correctly in v4.2.0.

v4.2.0

  • icu: Updated to version 56 with significant performance improvements (Steven R. Loomis) #3281
    • Contains Unicode 8 & CLDR 28, ~2-3x number format perf, and ~20% improvement in Collator startup.
  • node:
    • Added new -c (or --check) command line argument for checking script syntax without executing the code (Dave Eddy) #2411
    • This handy new feature allows you to check if your code has correct JavaScript syntax without ever running the code.
    • Added process.versions.icu to hold the current ICU library version (Evan Lucas) #3102
    • Currently returns ](https://github.com/nodejs/node/commit/1850879b0e from the above ICU upgrade.
    • Added process.release.lts to hold the current LTS codename when the binary is from an active LTS release line (Rod Vagg) #3212
    • As stated above, v4.x lts is also known as ](https://github.com/nodejs/node/commit/c245a199a7.
  • npm: npm upgrade tp 2.14.7 LTS from 2.14.4, see release notes for full details (Kat Marchán) #3299

Git Diffstats

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

Without deps, docs, or tests:

 .mailmap                               |    3 +
 AUTHORS                                |   21 +
 LICENSE                                |   32 -
 Makefile                               |    6 +-
 benchmark/buffers/buffer-indexof.js    |   38 +
 benchmark/fixtures/alice.html          | 3865 ++++++++++++++++++++++++++++++
 configure                              |   34 +-
 lib/_http_outgoing.js                  |   11 +
 lib/_http_server.js                    |    4 +
 lib/_stream_readable.js                |   16 +-
 lib/_tls_wrap.js                       |    2 +-
 lib/assert.js                          |   14 +-
 lib/buffer.js                          |   57 +-
 lib/domain.js                          |   88 +-
 lib/fs.js                              |    8 +-
 lib/internal/module.js                 |   15 +
 lib/module.js                          |   20 +-
 lib/net.js                             |    3 +
 lib/timers.js                          |   22 +-
 lib/util.js                            |   47 +-
 node.gyp                               |    3 +
 src/async-wrap-inl.h                   |   33 +-
 src/async-wrap.cc                      |   36 +-
 src/async-wrap.h                       |    2 +-
 src/env-inl.h                          |   18 -
 src/env.h                              |   10 +-
 src/js_stream.cc                       |    5 +-
 src/node.cc                            |   83 +-
 src/node.js                            |   23 +-
 src/node_buffer.cc                     |  230 +-
 src/node_file.cc                       |    7 +-
 src/node_util.cc                       |   43 +
 src/node_version.h                     |    5 +-
 src/string_search.cc                   |   10 +
 src/string_search.h                    |  671 ++++++
 tools/doc/generate.js                  |    2 -
 tools/eslint-rules/require-buffer.js   |    6 +-
 tools/eslint-rules/required-modules.js |  104 +
 tools/icu/icu-generic.gyp              |    5 +-
 tools/test.py                          |    4 +
 vcbuild.bat                            |    7 +-
 41 files changed, 5311 insertions(+), 302 deletions(-)

Deps only:

 deps/v8/include/v8.h            | 13 +++++++++++++
 deps/v8/src/api.cc              |  7 +++++++
 deps/v8/src/isolate.cc          | 29 ++++++++++++++++++++++-------
 deps/v8/src/isolate.h           |  6 ++++++
 deps/v8/test/cctest/test-api.cc | 31 +++++++++++++++++++++++++++++++
 5 files changed, 79 insertions(+), 7 deletions(-)

Docs only:

 CHANGELOG.md                         | 109 ++++++++++++++++++++++++++++++++-
 CONTRIBUTING.md                      |   3 +
 README.md                            |   4 +-
 doc/api/addons.markdown              |   2 +-
 doc/api/assert.markdown              |   4 +-
 doc/api/buffer.markdown              |   2 +-
 doc/api/child_process.markdown       |  16 ++---
 doc/api/dns.markdown                 |  45 +++++++-------
 doc/api/events.markdown              |   2 +-
 doc/api/net.markdown                 |   2 +-
 doc/api/process.markdown             |   6 ++
 doc/api/tls.markdown                 |  10 +++
 doc/node.1                           |   4 +-
 doc/tsc-meetings/io.js/2015-03-04.md |   6 +-
 14 files changed, 173 insertions(+), 42 deletions(-)

Tests only:

(There have been lots of minor test changes this week, so much so that we have omitted the full list as it is quite long.)

 86 files changed, 1182 insertions(+), 339 deletions(-)

Most active commit

Of the 62 commits, d99336a was the most active (not counting npm updates).

commit d99336a39125e413ddfa292cd402070e6fc74660
Author: Karl Skomski <karl@skomski.com>
Date:   Thu Sep 3 10:10:30 2015 +0200

    src: replace naive search in Buffer::IndexOf

    Adds the string search implementation from v8
    which uses naive search if pattern length < 8
    or to a specific badness then uses Boyer-Moore-Horspool

    Added benchmark shows the expected improvements
    Added option to use ucs2 encoding with Buffer::IndexOf

    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    PR-URL: https://github.com/nodejs/node/pull/2539

 benchmark/buffers/buffer-indexof.js  |   38 +
 benchmark/fixtures/alice.html        | 3865 ++++++++++++++++++++++++++++++++
 lib/buffer.js                        |   45 +-
 node.gyp                             |    1 +
 src/node_buffer.cc                   |  178 +-
 src/string_search.cc                 |   10 +
 src/string_search.h                  |  671 ++++++
 test/parallel/test-buffer-indexof.js |  187 ++
 8 files changed, 4935 insertions(+), 60 deletions(-)

These quick patch releases will become routine though v4’s lifecycle, now extending into LTS. We expect releases in an LTS release line slow down as time goes on, especially when a new major stable version comes out or 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.

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

Start for Free