The Nodesource Blog

#shoptalk Subscribe

Node.js v4.6.2 Release Brief

This v4 LTS release is the result of a large buildup of regular maintenance commits. Contains a sizable amount of fixes and dependency patches.

As with all releases within major version lines, minor and patch upgrades should be drop-in replacements for previous versions.

Overview

Of a total of 220 commits:

The remaining significant commits are as follows:

  • [06a1c9bf80] - assert: remove code that is never reached (Rich Trott) #8132
  • [861e584d46] - async_wrap: add a missing case to test-async-wrap-throw-no-init (yorkie) #8198
  • [a3d08025fa] - benchmark: add benches for fs.stat & fs.statSync (Anna Henningsen) #8338
  • [408a585261] - buffer: fix fill with encoding in Buffer.alloc() (Teddy Katz) #9238
  • [17c4187949] - buffer: optimize hex_decode (Christopher Jeffrey) #7602
  • [50cfea0081] - build: run npm install for doc builds in tarball (Anna Henningsen) #8413
  • [c4be179064] - build: add missing files to zip and 7z packages (Richard Lau) #8069
  • [41e27f6a6a] - build: don't link against liblog on host system (Ben Noordhuis) #7762
  • [7766997f7e] - build: add conflict marker check during CI lint (Brian White) #7625
  • [2a66ddbcbb] - build: re-add --ninja option to configure (Ehsan Akhgari) #6780
  • [950cc1df83] - build: adding config.gypi dep to addons/.buildstamp (Daniel Bevenius) #7893
  • [e64063c344] - build: don't require processing docs for nightlies (Johan Bergström) #8325
  • [00ea7388cb] - build: fix dependencies on AIX (Michael Dawson) #8285
  • [8dfab3ad68] - build: fix dependencies on AIX (Michael Dawson) #8272
  • [1b5f35f1be] - build: turn on thin static archives (Ben Noordhuis) #7957
  • [c41efe4d68] - build: add node_module_version to config.gypi (Marcin Cieślak) #8171
  • [f556b43e3e] - build: add --enable-d8 configure option (Ben Noordhuis) #7538
  • [612dfeb647] - child_process: Check stderr before accessing it (Robert Chiras) #6877
  • [5ed5142158] - child_process: workaround fd passing issue on OS X (Santiago Gimeno) #7572
  • [227db0ab21] - cluster: remove bind() and self (cjihrig) #7710
  • [3003131e9a] - configure: reword help for --without-npm (BlackYoup) #7471
  • [2b933339d0] - debugger: use arrow function for lexical this (Guy Fraser) #7415
  • [0b87b1a095] - dns: tweak regex for IPv6 addresses (Luigi Pinca) #8665
  • [3d6f107a2f] - fs: fix handling of uv_stat_t fields (Anna Henningsen) #8515
  • [2e29b76666] - intl: Don't crash if v8BreakIterator not available (Steven R. Loomis) #4253
  • [f6e332da2d] - lib: implement consistent brace style (Rich Trott) #8348
  • [fe48415c60] - net: add length check when normalizing args (Brian White) #8112
  • [3906206ecc] - net: remove unnecessary variables (Brian White) #8112
  • [9f1b790f79] - net: make holding the buffer in memory more robust (Anna Henningsen) #8252
  • [b630be2309] - net: export isIPv4, isIPv6 directly from cares (Sakthipriyan Vairamani) #7481
  • [c235708bef] - readline: keypress trigger for escape character (Prince J Wesley) #7382
  • [8198dbc5a4] - repl: Enable tab completion for global properties (Lance Ball) #7369
  • [12300626d7] - src: no abort from getter if object isn't wrapped (Trevor Norris) #6184
  • [166a9b85d9] - src: always clear wrap before persistent Reset() (Trevor Norris) #6184
  • [b3149cee8c] - src: inherit first from AsyncWrap (Trevor Norris) #6184
  • [8b93fddd1b] - src: disable stdio buffering (Ben Noordhuis) #7610
  • [72be320962] - src: suppress coverity message (cjihrig) #7587
  • [6ba3ad5d34] - src: guard against overflow in ParseArrayIndex() (Ben Noordhuis) #7497
  • [e1f961d050] - src: move ParseArrayIndex() to src/node_buffer.cc (Ben Noordhuis) #7497
  • [57921ebec5] - src: remove unnecessary HandleScopes (Ben Noordhuis) #7711
  • [6838ad5f8e] - src: fix handle leak in UDPWrap::Instantiate() (Ben Noordhuis) #7711
  • [dadcf6b263] - src: fix handle leak in BuildStatsObject() (Ben Noordhuis) #7711
  • [7aa268922a] - src: fix handle leak in Buffer::New() (Ben Noordhuis) #7711
  • [606deecd16] - src: don't include a null character in the WriteConsoleW call (Nikolai Vavilov) #7764
  • [a5b6c2cdd7] - src: use RAII for mutexes and condition variables (Ben Noordhuis) #7334
  • [19d6f06058] - stream_base: always use Base template class (Trevor Norris) #6184
  • [c841b5a6b9] - tls: copy the Buffer object before using (Sakthipriyan Vairamani) #8055
  • [6076293d6c] - tls_wrap: do not abort on new TLSWrap() (Trevor Norris) #6184
  • [389a6d2cc2] - url: fix off-by-one error in loop handling dots (Luigi Pinca) #8420
  • [be9d9bd7c3] - url: fix inconsistent port in url.resolveObject (Ilkka Myller) #8214
  • [96cfa926bd] - url: url.format() encodes all # in search (Ilkka Myller) #8072
  • [f7796f23e3] - util: inspect boxed symbols like other primitives (Anna Henningsen) #7641
  • [410e083d7c] - win,build: forward release_urlbase to configure (João Reis) #8430
  • [26e73740e9] - win,build: exit when addons fail to build (João Reis) #8412
  • [30e751f38b] - win,build: skip finding VS when not needed (João Reis) #8412
  • [b3090f8e64] - win,build: fail on invalid option in vcbuild (João Reis) #8412
  • [1b5213bfc3] - win,msi: fix inclusion of translations (João Reis) #7798
  • [e8be413d0d] - win,msi: add zh-CN translations for the installer (Minqi Pan) #2569
  • [99f85b8340] - win,msi: Added Italian translation (Matteo Collina) #4647

Notable Changes

  • build: It is now possible to build the documentation from the release tarball. (Anna Henningsen) #8413
  • buffer: Buffer.alloc() will no longer incorrectly return a zero filled buffer when an encoding is passed. (Teddy Katz) [#9238](https://github.com/nodejs/node/pull/9238
  • repl: Enabled tab completion for global properties. (Lance Ball) #7369
  • url: url.format() will now encode all #s in search. (Ilkka Myller) #8072

Git Diffstats

(Showing the delta between v4.6.1 and v4.6.2, ignoring deps/npm.)

Without deps, tools, docs, benchmarks, or tests:

 .eslintignore                 |   4 +-
 .eslintrc                     |   1 +
 .gitignore                    |   1 +
 .mailmap                      |  15 ++-
 .remarkrc                     |  35 +++++
 Makefile                      |  45 ++++++-
 common.gypi                   |  15 ++-
 configure                     |  21 ++-
 lib/_debug_agent.js           |  17 +--
 lib/_stream_readable.js       |   8 +-
 lib/assert.js                 |   6 +-
 lib/buffer.js                 |  18 ++-
 lib/child_process.js          |   4 +-
 lib/cluster.js                |  34 +++--
 lib/dns.js                    |   2 +-
 lib/internal/child_process.js |  41 ++++--
 lib/module.js                 |   3 +-
 lib/net.js                    |  28 ++--
 lib/readline.js               |  18 ++-
 lib/repl.js                   |  34 +++--
 lib/tls.js                    |   2 +-
 lib/url.js                    |  10 +-
 lib/util.js                   |   4 +
 node.gyp                      |   9 +-
 src/base-object-inl.h         |   4 +
 src/cares_wrap.cc             |   2 +
 src/debug-agent.cc            |  15 +--
 src/debug-agent.h             |   3 +-
 src/fs_event_wrap.cc          |   7 +-
 src/handle_wrap.cc            |  12 +-
 src/js_stream.cc              |  27 ++--
 src/js_stream.h               |   2 +-
 src/node.cc                   |  42 +++---
 src/node.js                   |  16 +++
 src/node_buffer.cc            |  31 ++++-
 src/node_contextify.cc        |  23 ++--
 src/node_crypto.cc            | 288 +++++++++++++++++++++++++---------------
 src/node_crypto.h             |   6 +-
 src/node_file.cc              |  34 +++--
 src/node_http_parser.cc       |  24 ++--
 src/node_internals.h          |  20 +--
 src/node_main.cc              |   5 +-
 src/node_mutex.h              | 187 ++++++++++++++++++++++++++
 src/node_stat_watcher.cc      |   6 +-
 src/node_version.h            |   2 +-
 src/node_wrap.h               |   2 +
 src/node_zlib.cc              |  15 ++-
 src/pipe_wrap.cc              |  18 ++-
 src/process_wrap.cc           |   7 +-
 src/req-wrap-inl.h            |   1 +
 src/signal_wrap.cc            |   6 +-
 src/stream_base-inl.h         |  26 +++-
 src/stream_base.cc            |   4 +-
 src/stream_wrap.cc            |   6 +-
 src/string_bytes.cc           |  37 ++++--
 src/tcp_wrap.cc               |  46 +++++--
 src/tls_wrap.cc               |  33 +++--
 src/tty_wrap.cc               |  10 +-
 src/udp_wrap.cc               |  31 +++--
 src/util.h                    |  14 ++
 vcbuild.bat                   |  26 +++-
 61 files changed, 1031 insertions(+), 382 deletions(-)

Tools only:

 tools/create_expfile.sh        |   6 ++-
 tools/license2rtf.js           | 108 +++++++++++++++++++--------------------
 tools/msvs/msi/i18n/it-it.wxl  |  38 ++++++++++++++
 tools/msvs/msi/i18n/zh-cn.wxl  |  38 ++++++++++++++
 tools/msvs/msi/nodemsi.wixproj |  12 ++++-
 tools/release.sh               |  15 ++++--
 tools/test.py                  |  27 +++++++---
 7 files changed, 176 insertions(+), 68 deletions(-)

Deps only:

 deps/openssl/masm_compile.gypi               | 44 --------------
 deps/openssl/openssl.gyp                     | 11 +++-
 deps/v8/include/v8-version.h                 |  2 +-
 deps/v8/src/heap/mark-compact.cc             |  7 +++
 deps/v8/src/heap/mark-compact.h              |  4 ++
 deps/v8/src/log.cc                           | 12 +---
 deps/v8/src/mirror-debugger.js               | 10 +++-
 deps/v8/src/objects.cc                       | 69 +++++++++++++++++++---
 deps/v8/src/objects.h                        |  3 +
 deps/v8/test/cctest/test-weakmaps.cc         |  2 +-
 deps/v8/test/cctest/test-weaksets.cc         |  4 +-
 deps/v8/test/mjsunit/debug-backtrace-text.js | 80 +++++++++++++++++---------
 tools/gyp/pylib/gyp/generator/make.py        |  7 ++-
 13 files changed, 157 insertions(+), 98 deletions(-)

Docs only:

 AUTHORS                                          | 113 ++++++-
 CHANGELOG.md                                     | 235 ++++++++++++++
 COLLABORATOR_GUIDE.md                            |  12 +-
 CONTRIBUTING.md                                  |  28 +-
 GOVERNANCE.md                                    |  87 +++--
 LICENSE                                          |  47 +--
 README.md                                        | 353 ++++++++++++++-------
 ROADMAP.md                                       |  10 +-
 doc/api/addons.md                                |   2 +-
 doc/api/assert.md                                |   4 +-
 doc/api/buffer.md                                |  11 +-
 doc/api/child_process.md                         |   4 +-
 doc/api/cluster.md                               |  95 +++++-
 doc/api/console.md                               |   4 +-
 doc/api/crypto.md                                | 215 ++++++++++++-
 doc/api/debugger.md                              |   2 +-
 doc/api/dgram.md                                 |  60 +++-
 doc/api/dns.md                                   |   2 +-
 doc/api/documentation.md                         |   2 +-
 doc/api/domain.md                                |   6 +-
 doc/api/events.md                                |  50 ++-
 doc/api/fs.md                                    | 176 +++++++++-
 doc/api/globals.md                               |  57 +++-
 doc/api/http.md                                  |  14 +-
 doc/api/https.md                                 |  10 +-
 doc/api/modules.md                               |  31 +-
 doc/api/net.md                                   |  21 +-
 doc/api/os.md                                    |   2 +-
 doc/api/path.md                                  |   2 +-
 doc/api/process.md                               |   4 +-
 doc/api/punycode.md                              |   2 +-
 doc/api/querystring.md                           |   2 +-
 doc/api/readline.md                              |   5 +-
 doc/api/repl.md                                  |   4 +-
 doc/api/stream.md                                |  11 +-
 doc/api/string_decoder.md                        |   2 +-
 doc/api/timers.md                                |   2 +-
 doc/api/tls.md                                   |   4 +-
 doc/api/tty.md                                   |   4 +-
 doc/api/url.md                                   |   2 +-
 doc/api/util.md                                  | 139 ++++++--
 doc/api/v8.md                                    |   2 +-
 doc/api/vm.md                                    |  10 +-
 doc/api/zlib.md                                  |   9 +-
 doc/ctc-meetings/2016-06-22.md                   | 151 +++++++++
 doc/ctc-meetings/2016-06-29.md                   | 187 +++++++++++
 doc/ctc-meetings/2016-07-06.md                   | 150 +++++++++
 doc/ctc-meetings/2016-07-13.md                   | 236 ++++++++++++++
 doc/ctc-meetings/2016-07-20.md                   | 202 ++++++++++++
 doc/ctc-meetings/2016-07-27.md                   | 237 ++++++++++++++
 doc/ctc-meetings/2016-08-03.md                   | 336 ++++++++++++++++++++
 doc/ctc-meetings/2016-08-10.md                   | 281 ++++++++++++++++
 doc/ctc-meetings/2016-08-17.md                   | 300 +++++++++++++++++
 doc/ctc-meetings/2016-08-24.md                   | 328 +++++++++++++++++++
 doc/ctc-meetings/2016-08-31.md                   | 315 ++++++++++++++++++
 doc/ctc-meetings/2016-09-07.md                   | 245 ++++++++++++++
 doc/ctc-meetings/2016-09-14.md                   | 153 +++++++++
 doc/ctc-meetings/2016-09-21.md                   | 218 +++++++++++++
 doc/guides/building-node-with-ninja.md           |  13 +-
 doc/node.1                                       |  63 +++-
 doc/onboarding.md                                | 177 ++++++-----
 doc/releases.md                                  |  21 +-
 doc/template.html                                |   2 +-
 doc/topics/the-event-loop-timers-and-nexttick.md | 172 +++++-----
 64 files changed, 5129 insertions(+), 515 deletions(-)

Tests & Benchmarks only:

   0.7% benchmark/buffers/
   1.2% benchmark/fs/
   0.7% test/fixtures/clustered-server/
   0.5% test/fixtures/
   0.8% test/internet/
  85.3% test/parallel/
   1.5% test/pseudo-tty/
   3.8% test/pummel/
   4.0% test/sequential/
   1.0% test/
 149 files changed, 1398 insertions(+), 505 deletions(-)

Most active commit

Of the 220 commits, 1230062 was the most active:
(Excluding docs, npm, eslint, and tests.)

commit 12300626d705d7e07f07bec5885d56518ccc97a3
Author: Trevor Norris <trev.norris@gmail.com>
Date:   Wed Apr 13 13:16:42 2016 -0600


    src: no abort from getter if object isn't wrapped

    v8::Object::GetAlignedPointerFromInternalField() returns a random value
    if Wrap() hasn't been run on the object handle. Causing v8 to abort if
    certain getters are accessed. It's possible to access these getters and
    functions during class construction through the AsyncWrap init()
    callback, and also possible in a subset of those scenarios while running
    the persistent handle visitor.

    Mitigate this issue by manually setting the internal aligned pointer
    field to nullptr in the BaseObject constructor and add necessary logic
    to return appropriate values when nullptr is encountered.

    PR-URL: https://github.com/nodejs/node/pull/6184
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>


 src/base-object-inl.h                      |   4 +
 src/fs_event_wrap.cc                       |   7 +-
 src/handle_wrap.cc                         |   9 +-
 src/js_stream.cc                           |  23 ++-
 src/node_contextify.cc                     |  23 +--
 src/node_crypto.cc                         | 265 ++++++++++++++++++---------
 src/node_http_parser.cc                    |  24 ++-
 src/node_internals.h                       |   2 +
 src/node_stat_watcher.cc                   |   6 +-
 src/node_wrap.h                            |   2 +
 src/node_zlib.cc                           |  15 +-
 src/pipe_wrap.cc                           |  18 +-
 src/process_wrap.cc                        |   7 +-
 src/signal_wrap.cc                         |   6 +-
 src/stream_base-inl.h                      |  16 +-
 src/stream_base.cc                         |   3 +-
 src/stream_wrap.cc                         |   6 +-
 src/tcp_wrap.cc                            |  46 ++++-
 src/tls_wrap.cc                            |  28 ++-
 src/tty_wrap.cc                            |  10 +-
 src/udp_wrap.cc                            |  29 ++-
 src/util.h                                 |  14 ++
 test/parallel/test-stream-base-no-abort.js |  58 ++++++
 23 files changed, 446 insertions(+), 175 deletions(-)

This is a regular and routine release for a Node.js LTS release line. 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.