The NodeSource Blog

Node.js 7.8.0 Release Brief

This Week’s Current release comes with an expedited fix for a crypto-related memory leak.

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 66 commits:

  • 14 were documentation-only commits.
  • 18 only modify tests.
  • 1 dependency was upgraded:
  • 1 patch was backported from upstream V8:

1 commit was tagged as semver-minor, adding new functionality and justifying the jump to v7.8.0:

  • [8ab26cf508] - readline: add option to stop duplicates in history (Danny Nemer) #2982

The remaining significant commits are as follows:

  • [51c8d8088a] - Partial revert "tls: keep track of stream that is closed" (Trevor Norris) #11947
  • [751c1153a4] - benchmark: check end() argument to be > 0 (Vse Mozhet Byt) #12030
  • [210250465a] - benchmark: update obsolete information pointer (Rich Trott) #12026
  • [7aeeee3276] - benchmark: repair the fs/readfile benchmark (Sorin Baltateanu) #7818
  • [90acb773be] - benchmark: allow multiple values for same config (Nikolai Vavilov) #11819
  • [2f4ad6fea2] - benchmark: harmonize progress bar + stderr output (Vse Mozhet Byt) #11925
  • [d62ddbe145] - benchmark: fix fs\bench-realpathSync.js (Vse Mozhet Byt) #11904
  • [85eb1bc0a9] - benchmark: remove v8ForceOptimization calls (Lucas Lago) #11908
  • [17d16e8f3d] - buffer: remove unneeded eslint-disable comment (Rich Trott) #11906
  • [fb41ee3983] - build: add lint option to vcbuild.bat help (Morgan Brenner) #11992
  • [3e4ecca0be] - build: don't create directory for NDK toolchain (TheBeastOfCaerbannog) #11916
  • [a64aa442c1] - crypto: fix memory leak if certificate is revoked (Tom Atkinson) #12089
  • [0f2642ee36] - errors: remove needless lazyAssert (DavidCai) #11891
  • [5bdd54925a] - lib: add comment to script eval _tickCallback (Gibson Fahnestock) #12050
  • [7347860966] - lib: clarify the usage of 'else' (Jackson Tian) #11148
  • [837ff4ba59] - lib: remove an unnecessary coverage check (Jeremiah Senkpiel) #12023
  • [6c803db7b9] - lib: fix event race condition with -e (Ben Noordhuis) #11958
  • [ac92d0249b] - net: refactor net module to module.exports (Claudio Rodriguez) #11698
  • [2462fd8009] - process: maintain constructor descriptor (Bryan English) #9306
  • [91a2700721] - readline: rename deDupeHistory option (Danny Nemer) #11950
  • [6a6c431eec] - src: use persistent strings from node::Environment (Ben Noordhuis) #11945
  • [d0c2d67083] - src: add native URL class (James M Snell) #11801
  • [019a20adb5] - src: make PercentDecode return void (Timothy Gu) #11922
  • [d6da1705cd] - src: ensure that fd 0-2 are valid on windows (Bartosz Sosnowski) #11863
  • [59f71f5661] - src, buffer: do not segfault on out-of-range index (Timothy Gu) #11927
  • [4051184106] - stream_base,tls_wrap: notify on destruct (Trevor Norris) #11947
  • [4b1b6b85a9] - timers: fix not to close reused timer handle (Shigeki Ohtsu) #11646
  • [fd93622f8a] - tls: fix SecurePair external memory reporting (Ben Noordhuis) #11896
  • [126dcb76af] - url: name anonymous functions in url (Pedro lima) #9225
  • [f6755182e5] - url: show input in parse error message (Joyee Cheung) #11934
  • [c51d925c84] - url: restrict setting protocol to "file" (Daijiro Wachi) #11887

Notable Changes

  • buffer: Fixed a segfault for out-of-range indexes. (Timothy Gu) #11927
  • crypto: Fixed a memory leak for revoked certificates. (Tom Atkinson) #12089
  • npm: Upgraded to 4.2.0 (Kat Marchán) #11389
  • readline: A removeHistoryDuplicates option has been added. (Danny Nemer) #2982
  • V8: Fixed an async/await desugaring bug. (Michaël Zasso) #12004

Git Diffstats

(Showing the delta between v7.7.4 and v7.8.0, ignoring deps/npm.)

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

 .mailmap                               |   2 +-
 android-configure                      |  25 +-
 lib/_tls_wrap.js                       |   6 -
 lib/buffer.js                          |   1 -
 lib/child_process.js                   |  12 +-
 lib/internal/bootstrap_node.js         |  16 +-
 lib/internal/errors.js                 |  11 +-
 lib/internal/process/write-coverage.js |   4 +-
 lib/internal/url.js                    |  31 +-
 lib/net.js                             |  66 ++--
 lib/readline.js                        |   9 +
 lib/timers.js                          |   8 +-
 lib/url.js                             |  10 +-
 src/node.cc                            |  13 +
 src/node_buffer.cc                     |  28 +-
 src/node_contextify.cc                 |   3 +-
 src/node_crypto.cc                     |  21 +-
 src/node_url.cc                        | 611 ++++++++++++++++---------------
 src/node_url.h                         | 112 +++++-
 src/node_version.h                     |   4 +-
 src/stream_base.h                      |   9 +-
 src/tls_wrap.cc                        |  16 +-
 src/tls_wrap.h                         |   4 +-
 vcbuild.bat                            |   2 +-
 24 files changed, 580 insertions(+), 444 deletions(-)

Deps only:

 deps/v8/include/v8-version.h                 |   2 +-
 deps/v8/src/parsing/parser-base.h            |  15 +-
 deps/v8/src/parsing/parser.cc                | 194 +++++++++++++++++++------
 deps/v8/src/parsing/parser.h                 |   9 +-
 deps/v8/test/mjsunit/regress/regress-5896.js |  14 ++
 5 files changed, 187 insertions(+), 47 deletions(-)

Docs only:

 CHANGELOG.md                                 |  3 +-
 README.md                                    |  6 +-
 doc/api/assert.md                            | 17 +-----
 doc/api/buffer.md                            |  4 ++
 doc/api/child_process.md                     |  6 +-
 doc/api/fs.md                                | 50 +++++++--------
 doc/api/http.md                              | 10 +--
 doc/api/https.md                             |  4 +-
 doc/api/modules.md                           |  8 ++-
 doc/api/process.md                           | 21 ++++---
 doc/api/readline.md                          |  3 +
 doc/api/stream.md                            |  2 +-
 doc/changelogs/CHANGELOG_V7.md               | 85 ++++++++++++++++++++++++++
 doc/guides/writing-and-running-benchmarks.md | 18 +++---
 14 files changed, 162 insertions(+), 75 deletions(-)

Tests & Benchmarks only:

 benchmark/_benchmark_progress.js                  |  2 +-
 benchmark/_http-benchmarkers.js                   |  8 ++-
 benchmark/common.js                               | 18 ++++--
 benchmark/fs/bench-realpathSync.js                |  2 +
 benchmark/fs/readfile.js                          |  5 +-
 benchmark/url/whatwg-url-idna.js                  |  2 -
 benchmark/vm/run-in-context.js                    |  2 -
 benchmark/vm/run-in-this-context.js               |  1 -
 test/common.js                                    | 22 -------
 test/fixtures/spawn_closed_stdio.py               |  8 +++
 test/fixtures/url-setter-tests.json               | 51 ++++++++++++++++-
 test/message/eval_messages.out                    | 53 +++++++++--------
 test/message/stdin_messages.out                   | 37 ++++++------
 test/parallel/parallel.status                     |  3 +
 test/parallel/test-buffer-includes.js             | 22 ++++---
 test/parallel/test-buffer-write-noassert.js       | 63 ++++++++++++++++++---
 .../test-child-process-exec-kill-throws.js        | 29 ++++++++++
 test/parallel/test-child-process-execfile.js      | 21 +++++++
 test/parallel/test-child-process-spawn-shell.js   |  2 +-
 .../test-child-process-spawnsync-shell.js         |  2 +-
 test/parallel/test-child-process-stdin.js         |  8 +--
 test/parallel/test-child-process-stdio-inherit.js |  4 +-
 test/parallel/test-child-process-stdio.js         |  3 +-
 test/parallel/test-cli-eval.js                    | 19 +++++++
 test/parallel/test-cluster-disconnect.js          | 35 +++---------
 test/parallel/test-fs-empty-readStream.js         | 13 +++--
 test/parallel/test-http-invalid-path-chars.js     | 20 +++++++
 test/parallel/test-mkdtemp-sync-prefix-check.js   | 13 +++++
 test/parallel/test-process-prototype.js           | 15 +++++
 test/parallel/test-readline-interface.js          | 61 ++++++++++++++++++++
 test/parallel/test-stdio-closed.js                | 14 ++++-
 test/parallel/test-timers-unrefed-in-callback.js  | 61 ++++++++++++++++++++
 test/parallel/test-tls-key-mismatch.js            |  4 +-
 test/parallel/test-tls-retain-handle-no-abort.js  | 42 ++++++++++++++
 test/parallel/test-tls-securepair-leak.js         | 29 ++++++++++
 test/parallel/test-tls-socket-close.js            | 49 ++++++++++------
 test/parallel/test-url-relative.js                |  3 +
 test/parallel/test-util-inspect-proxy.js          |  3 +-
 test/parallel/test-vm-cached-data.js              |  2 +-
 test/parallel/test-vm-function-declaration.js     |  6 +-
 test/parallel/test-whatwg-url-parsing.js          | 31 +++++++---
 test/sequential/test-benchmark-net.js             | 23 ++++++++
 42 files changed, 636 insertions(+), 175 deletions(-)

Most active commit

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

commit d0c2d67083dd3dbd9867220337b9ed810ced00cc
Author: James M Snell <jasnell@gmail.com>
Date:   Fri Mar 10 22:05:22 2017 -0800

    src: add native URL class

    Adds a URL native class for use within the node.js c/c++
    code. This is primarily intended to be used by the eventual
    ES6 modules implementation but can be used generally wherever
    URL parsing within the c/c++ may be necessary.

    ```c
    URL url1("http://example.org");
    URL url2("foo", "http://example.org/bar");
    URL url3("baz", &url2);
    ```

    While we're at it, reduce reliance on macros to simplify impl.

    PR-URL: https://github.com/nodejs/node/pull/11801
    Reviewed-By: Anna Henningsen <anna@addaleax.net>

 src/node_url.cc | 558 +++++++++++++++++++++++++++---------------------------
 src/node_url.h  |  91 ++++++++-
 2 files changed, 365 insertions(+), 284 deletions(-)

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