Node.js v4.4.0 Release Brief - NodeSource

The NodeSource Blog

You have reached the beginning of time!

Node.js v4.4.0 Release Brief

This LTS release is the result of a build-up of regular maintenance commits, as well as a select few additive features deemed important enough to bring into LTS.

There is a semver-minor version number increment (the y in x.y.z) due to the additions in this release. While these semver-minor increments are possible under the LTS plan, the project is attempting to keep them to a minimum, batching multiple changes where possible, such as in this release. Note that there will be no future v4.3.x releases, all future releases numbers will be above v4.4.0.

This release contains two new command-line flags (--perf_basic_prof_only_functions from #3609 and --prof-process from #4021), better support for HTTP idle connections (#4482), some minor performance improvements, and the usual slew of bug fixes.

As with all releases, minor and patch version upgrades (the y and z in x.y.z) should be drop-in replacements for previous versions.

Overview

Of a total of 217 commits:

7 commits were tagged as semver-minor, adding new functionality and justifying the jump to v4.4.0:

  • [faf606fb7d] - (SEMVER-MINOR) buffer: allow encoding param to collapse (Trevor Norris) #4803
  • [288f4c2206] - (SEMVER-MINOR) buffer: properly retrieve binary length of needle (Trevor Norris) #4803
  • [c0db8df184] - (SEMVER-MINOR) deps: backport 9da3ab6 from V8 upstream (Ali Ijaz Sheikh) #3609
  • [ebb9f0dc11] - (SEMVER-MINOR) http: handle errors on idle sockets (José F. Romaniello) #4482
  • [aa8a10c8c3] - (SEMVER-MINOR) src: add BE support to StringBytes::Encode() (Bryon Leung) #3410
  • [c5bf35a543] - (SEMVER-MINOR) tls: add options argument to createSecurePair (Коренберг Марк) #2441
  • [0164e12a6c] - (SEMVER-MINOR) tools: add --prof-process flag to node binary (Matt Loring) #4021

The remaining significant commits are as follows:

  • [2bae6d8caf] - benchmark: add a constant declaration for net (Minwoo Jung) #3950
  • [12a8427bab] - buffer: refactor redeclared variables (Rich Trott) #4886
  • [a8e776fa06] - build: treat aarch64 as arm64 (Johan Bergström) #5191
  • [fcb8d3eddb] - build: add a help message and removed a TODO. (Ojas Shirekar) #5080
  • [78962b32bf] - build: remove redundant TODO in configure (Ojas Shirekar) #5080
  • [7c34eb6986] - build: remove Makefile.build (Ojas Shirekar) #5080
  • [c0facfbfe6] - build: fix build when python path contains spaces (Felix Becker) #4841
  • [d6894f8ea3] - child_process: (internal) call postSend on error (Fedor Indutny) #4752
  • [ab787ad0ab] - child_process: fix data loss with readable event (Brian White) #5036
  • [3a4d6ad205] - cluster: dont rely on this in fork (Igor Klopov) #5216
  • [78ddd9bc80] - console: apply null as this for util.format (Jackson Tian) #5222
  • [b7c2b23d55] - crypto: have fixed NodeBIOs return EOF (Adam Langley) #5105
  • [b3050a5c2f] - crypto: fix memory leak in LoadPKCS12 (Fedor Indutny) #5109
  • [689e1faaf1] - crypto: add pfx certs as CA certs too (Fedor Indutny) #5109
  • [488821e611] - crypto: use SSL_CTX_clear_extra_chain_certs. (Adam Langley) #4919
  • [e896c6bbbf] - crypto: fix build when OCSP-stapling not provided (Adam Langley) #4914
  • [9c3302bb97] - crypto: use a const SSL_CIPHER (Adam Langley) #4913
  • [dca103877f] - debugger: assert test before accessing this.binding (Prince J Wesley) #5145
  • [42346c13e1] - dgram: scope redeclared variables (Rich Trott) #4940
  • [d4f0f3fa0d] - dns: throw a TypeError in lookupService with invalid port (Evan Lucas) #4839
  • [1f8144200f] - fs: refactor redeclared variables (Rich Trott) #4959
  • [bee86bbb12] - http: remove reference to onParserExecute (Tom Atkinson) #4773
  • [def3bb2882] - http: do not emit upgrade on advertisement (Fedor Indutny) #4337
  • [51941a1aa5] - https: evict cached sessions on error (Fedor Indutny) #4982
  • [86907c3e79] - installer: install the tick processor (Matt Loring) #3032
  • [d3e8e21b1f] - lib: remove string\decoder.js var redeclarations (Rich Trott) #4978
  • [4079b5e858] - lib: scope loop variables (Rich Trott) #4965
  • [cf3a4030e8] - lib: use arrow functions instead of bind() (Minwoo Jung) #3622
  • [61570cc052] - lib,test: remove extra semicolons (Michaël Zasso) #2205
  • [298541792c] - module: refactor redeclared variable (Rich Trott) #4962
  • [d9bf6e0b79] - net: use _server for internal book-keeping (Fedor Indutny) #5262
  • [46b6191ac5] - net: refactor redeclared variables (Rich Trott) #4963
  • [6062b1c342] - net: move isLegalPort to internal/net (Evan Lucas) #4882
  • [ab5c01b7a8] - node: set process._eventsCount to 0 on startup (Evan Lucas) #5208
  • [d7e9bb7bde] - process: support symbol events (cjihrig) #4798
  • [76b6a61297] - querystring: improve parse() performance (Brian White) #4675
  • [ff7577214c] - repl: remove variable redeclaration (Rich Trott) #4977
  • [3ca6d750b9] - src: force line buffering for stderr (Rich Trott) #3701
  • [a1e0710cb1] - src: clean up usage of <i>proto</i> (Jackson Tian) #5069
  • [1878cd5905] - src: remove no longer relevant comments (Chris911) #4843
  • [39b2503650] - src: remove __builtin_bswap16 call (Ben Noordhuis) #4290
  • [37ff7c5e57] - src: remove unused BITS_PER_LONG macro (Ben Noordhuis) #4290
  • [28b9ca8f14] - src,test,tools: modify for more stringent linting (Rich Trott) #5214
  • [1c70ecb116] - stream: refactor redeclared variables (Rich Trott) #4816
  • [89aeab901a] - streams: 5% throughput gain when sending small chunks (Matteo Collina) #4354
  • [f71be242ca] - tls: nullify .ssl on handle close (Fedor Indutny) #5168
  • [67be41ae31] - tls: scope loop vars with let (Rich Trott) #4853
  • [03944fe3e8] - tls_wrap: reach error reporting for UV_EPROTO (Fedor Indutny) #4885
  • [df1fb155ac] - tools: run tick processor without forking (Matt Loring) #4224
  • [b4e783357c] - url: change scoping of variables with let (Kári Tristan Helgason) #4867

Notable Changes

The semver-minor changes are as follows:
  • v8: Introduced a new --perf_basic_prof_only_functions flag (backported) (Ali Ijaz Sheikh) #3609.
  • http: A new feature in the http[s] agent that catches errors on keepAlive'd (idle) connections (José F. Romaniello) #4482.
  • src: Better support for Big-Endian systems (Bryon Leung) #3410.
  • tls: A new feature that allows you to pass common SSL options to tls.createSecurePair() (Коренберг Марк) #2441.
  • tools A new --prof-process flag which will execute the tick processor on the provided isolate files (Matt Loring) #4021.
Notable patch changes include:
  • build: Support for python path that includes spaces. This should be of particular interest to our Windows users who may have python living in c:/Program Files (Felix Becker) #4841.
  • https: A potential fix for #3692 http[s] client requests throwing EPROTO (Fedor Indutny) #4982.
  • installer: Better readable profiling information from isolate tick logs (Matt Loring) #3032.
  • npm: upgrade to 2.14.20 (Kat Marchán) #5510.
  • process: Added support for symbols in event emitters. (cjihrig) #4798
    • Symbols didn't exist when it was written ¯\</i>(ツ)_/¯.
  • querystring: parse() is now 13-22% faster! (Brian White) #4675
  • streams: Performance improvements for moving small buffers that shows a 5% throughput gain. (Matteo Collina) #4354
    • IoT projects have been seen to be as much as 10% faster with this change!

Git Diffstats

(Showing the delta between v4.3.2 and v4.4.0, ignoring deps/npm.)

Without deps, docs, benchmarks, or tests:

 .eslintignore                          |   3 +
 .eslintrc                              |  97 +++---
 LICENSE                                |   2 +-
 Makefile                               |   6 +-
 Makefile.build                         | 499 -------------------------------
 configure                              |   8 +-
 lib/_debug_agent.js                    |   2 +-
 lib/_debugger.js                       |  20 +-
 lib/_http_client.js                    |  10 +
 lib/_http_common.js                    |  22 ++
 lib/_stream_readable.js                |  12 +-
 lib/_stream_writable.js                |  63 +++-
 lib/_tls_common.js                     |   8 +-
 lib/_tls_legacy.js                     |  17 +-
 lib/_tls_wrap.js                       |  23 +-
 lib/buffer.js                          |  35 ++-
 lib/cluster.js                         |  12 +-
 lib/console.js                         |   8 +-
 lib/dgram.js                           |   8 +-
 lib/dns.js                             |   3 +
 lib/events.js                          |   2 +-
 lib/fs.js                              |  18 +-
 lib/https.js                           |  16 +
 lib/internal/child_process.js          |  20 +-
 lib/internal/net.js                    |  11 +
 lib/internal/v8_prof_polyfill.js       | 102 +++++++
 lib/internal/v8_prof_processor.js      |  29 ++
 lib/module.js                          |   5 +-
 lib/net.js                             |  52 ++--
 lib/path.js                            |   4 +-
 lib/querystring.js                     |  30 +-
 lib/repl.js                            |   2 +-
 lib/string_decoder.js                  |   6 +-
 lib/timers.js                          |   2 +-
 lib/url.js                             |  30 +-
 lib/util.js                            |   4 +-
 node.gyp                               |  15 +-
 src/debug-agent.cc                     |   1 -
 src/debug-agent.h                      |   1 -
 src/node.cc                            |  14 +-
 src/node.js                            |  12 +-
 src/node_buffer.cc                     |  13 +-
 src/node_crypto.cc                     |  61 ++--
 src/node_crypto_bio.cc                 |  16 +
 src/node_crypto_bio.h                  |   4 +
 src/node_internals.h                   |   6 -
 src/node_main.cc                       |   1 +
 src/node_version.h                     |   4 +-
 src/stream_base.h                      |  11 +-
 src/string_bytes.cc                    |  16 +-
 src/tls_wrap.cc                        |  22 +-
 src/tls_wrap.h                         |   2 +-
 src/util-inl.h                         |   7 +
 src/util.h                             |   2 +
 tools/doc/addon-verify.js              |  26 +-
 tools/doc/generate.js                  |  10 +-
 tools/doc/html.js                      |  71 ++++-
 tools/doc/json.js                      |  35 +--
 tools/doc/preprocess.js                |   6 +-
 tools/doc/type-parser.js               |  59 ++++
 tools/eslint-rules/new-with-error.js   |   5 -
 tools/eslint-rules/require-buffer.js   |  19 +-
 tools/eslint-rules/required-modules.js |   5 -
 tools/install.py                       |   1 +
 tools/js2c.py                          |   2 +-
 tools/msvs/nodevars.bat                |   2 +-
 tools/v8-prof/polyfill.js              |  93 ------
 tools/v8-prof/tick-processor.js        |  51 ----
 vcbuild.bat                            |   2 +-
 69 files changed, 798 insertions(+), 988 deletions(-)

Deps only:

 deps/v8/src/flag-definitions.h | 3 +++
 deps/v8/src/isolate.cc         | 4 ++++
 deps/v8/src/log.cc             | 6 ++++++
 3 files changed, 13 insertions(+)

Docs only:

 CHANGELOG.md                    |  263 ++++++-
 COLLABORATOR_GUIDE.md           |   16 +-
 CONTRIBUTING.md                 |   31 +-
 GOVERNANCE.md                   |   85 +-
 README.md                       |   28 +-
 WORKING_GROUPS.md               |   16 +-
 doc/api/addons.markdown         | 1476 ++++++++++++++++++++---------------
 doc/api/assert.markdown         |  426 +++++-----
 doc/api/buffer.markdown         | 1541 +++++++++++++++++++++++--------------
 doc/api/child_process.markdown  | 1248 +++++++++++++++++-------------
 doc/api/cluster.markdown        |  420 +++++-----
 doc/api/console.markdown        |  204 ++---
 doc/api/crypto.markdown         | 1452 +++++++++++++++++++++++-----------
 doc/api/debugger.markdown       |  154 ++--
 doc/api/dgram.markdown          |  175 +++--
 doc/api/dns.markdown            |  103 +--
 doc/api/documentation.markdown  |   16 +
 doc/api/domain.markdown         |   78 +-
 doc/api/errors.markdown         |  225 +++---
 doc/api/events.markdown         |  276 ++++---
 doc/api/fs.markdown             |  276 ++++---
 doc/api/globals.markdown        |   20 +-
 doc/api/http.markdown           |  485 +++++++-----
 doc/api/https.markdown          |  167 ++--
 doc/api/modules.markdown        |  271 ++++---
 doc/api/net.markdown            |  201 +++--
 doc/api/os.markdown             |  183 ++---
 doc/api/path.markdown           |  263 ++++---
 doc/api/process.markdown        |  656 +++++++++-------
 doc/api/punycode.markdown       |   46 +-
 doc/api/querystring.markdown    |   52 +-
 doc/api/readline.markdown       |  195 +++--
 doc/api/repl.markdown           |  206 ++---
 doc/api/stream.markdown         |  690 +++++++++--------
 doc/api/string_decoder.markdown |   14 +-
 doc/api/synopsis.markdown       |   20 +-
 doc/api/tls.markdown            |  419 +++++-----
 doc/api/tty.markdown            |   20 +-
 doc/api/url.markdown            |   12 +-
 doc/api/util.markdown           |  447 ++++++-----
 doc/api/v8.markdown             |    4 +-
 doc/api/vm.markdown             |  221 +++---
 doc/api/zlib.markdown           |  162 ++--
 doc/api_assets/style.css        |  246 +++---
 doc/node.1                      |    2 +
 doc/template.html               |   12 +-
 tools/doc/README.md             |   25 -
 47 files changed, 8013 insertions(+), 5535 deletions(-)

Tests & Benchmarks only:

   1.2% benchmark/net/
   0.1% benchmark/querystring/
   0.1% benchmark/
   0.0% test/debugger/
   3.1% test/fixtures/keys/
   0.3% test/fixtures/
   0.0% test/gc/
  90.2% test/parallel/
   0.3% test/pummel/
   4.0% test/sequential/
   0.2% test/
 148 files changed, 2739 insertions(+), 2091 deletions(-)

Most active commit

Of the 217 commits, 66ffc71 was the most active:
(Excluding docs, npm, eslint, and tests.)

commit 66ffc71b55bf9f4e23a60570aced43abd9ed7b86
Author: Rich Trott <rtrott@gmail.com>
Date:   Tue Jan 26 16:47:10 2016 -0800

    test,buffer: refactor redeclarations

    Many variables in the buffer tests are redeclared. Change them so that
    they are scoped appropriately.

    PR-URL: https://github.com/nodejs/node/pull/4893
    Reviewed-By: Roman Reiss <me@silverwind.io>
    Reviewed-By: James M Snell <jasnell@gmail.com>

 test/parallel/test-buffer-indexof.js  |  145 +++--
 test/parallel/test-buffer-iterator.js |    2 +-
 test/parallel/test-buffer.js          | 1059 +++++++++++++++++--------------
 3 files changed, 652 insertions(+), 554 deletions(-)

We will be sure to let you know when a release contains a critical update and a recommendation to upgrade. You should upgrade if you can, but this release is not critical unless you are experiencing one of the issues identified in the list above.

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

Start for Free