Skip to content

Update Node.js to v14

Warren Gifford requested to merge renovate/node-14.x into master

Created by: renovate[bot]

This PR contains the following updates:

Package Update New value References Sourcegraph
node major 14.2.0 source code search for "node"

Release Notes

nodejs/node

v14.2.0

Compare Source

Notable Changes
Track function calls with assert.CallTracker (experimental)

assert.CallTracker is a new experimental API that allows to track and later verify the number of times a function was called. This works by creating a CallTracker object and using its calls method to create wrapper functions that will count each time they are called. Then the verify method can be used to assert that the expected number of calls happened:

const assert = require('assert');

const tracker = new assert.CallTracker();

function func() {}
// callsfunc() must be called exactly twice before tracker.verify().
const callsfunc = tracker.calls(func, 2);
callsfunc();
callsfunc();

function otherFunc() {}
// The second parameter defaults to `1`.
const callsotherFunc = tracker.calls(otherFunc);
callsotherFunc();

// Calls tracker.verify() and verifies if all tracker.calls() functions have
// been called the right number of times.
process.on('exit', () => {
  tracker.verify();
});

Additionally, tracker.report() will return an array which contains information about the errors, if there are any:

const assert = require('assert');

const tracker = new assert.CallTracker();

function func() {}
const callsfunc = tracker.calls(func);

console.log(tracker.report());
/*
[
  {
    message: 'Expected the func function to be executed 1 time(s) but was executed 0 time(s).',
    actual: 0,
    expected: 1,
    operator: 'func',
    stack: Error
        ...
  }
]
*/

Contributed by ConorDavenport - #​31982.

Console groupIndentation option

The Console constructor (require('console').Console) now supports different group indentations.

This is useful in case you want different grouping width than 2 spaces.

const { Console } = require('console');
const customConsole = new Console({
  stdout: process.stdout,
  stderr: process.stderr,
  groupIndentation: 10
});

customConsole.log('foo');
// 'foo'
customConsole.group();
customConsole.log('foo');
//           'foo'

Contributed by rickyes - #​32964.

Commits
Semver-minor commits
  • [c87ed21fdf] - (SEMVER-MINOR) assert: port common.mustCall() to assert (ConorDavenport) #​31982
  • [c49e3ea20c] - (SEMVER-MINOR) console: support console constructor groupIndentation option (rickyes) #​32964
  • [bc9e413dae] - (SEMVER-MINOR) worker: add stack size resource limit option (Anna Henningsen) #​33085
Semver-patch commits
Documentation commits
Other commits

v14.1.0

Compare Source

Notable Changes
  • deps: upgrade openssl sources to 1.1.1g (Hassaan Pasha) #​32971
  • doc: add juanarbol as collaborator (Juan José Arboleda) #​32906
  • http: doc deprecate abort and improve docs (Robert Nagy) #​32807
  • module: do not warn when accessing __esModule of unfinished exports (Anna Henningsen) #​33048
  • n-api: detect deadlocks in thread-safe function (Gabriel Schulhof) #​32860
  • src: deprecate embedder APIs with replacements (Anna Henningsen) #​32858
  • stream:
    • don't emit end after close (Robert Nagy) #​33076
    • don't wait for close on legacy streams (Robert Nagy) #​33058
    • pipeline should only destroy un-finished streams (Robert Nagy) #​32968
  • vm: add importModuleDynamically option to compileFunction (Gus Caplan) #​32985
Commits

v14.0.0

Compare Source

Notable Changes
Deprecations
  • (SEMVER-MAJOR) crypto: move pbkdf2 without digest to EOL (James M Snell) #​31166
  • (SEMVER-MAJOR) fs: deprecate closing FileHandle on garbage collection (James M Snell) #​28396
  • (SEMVER-MAJOR) http: move OutboundMessage.prototype.flush to EOL (James M Snell) #​31164
  • (SEMVER-MAJOR) lib: move GLOBAL and root aliases to EOL (James M Snell) #​31167
  • (SEMVER-MAJOR) os: move tmpDir() to EOL (James M Snell) #​31169
  • (SEMVER-MAJOR) src: remove deprecated wasm type check (Clemens Backes) #​32116
  • (SEMVER-MAJOR) stream: move _writableState.buffer to EOL (James M Snell) #​31165
  • (SEMVER-MINOR) doc: deprecate process.mainModule (Antoine du HAMEL) #​32232
  • (SEMVER-MINOR) doc: deprecate process.umask() with no arguments (Colin Ihrig) #​32499
ECMAScript Modules - Experimental Warning Removal
  • module: remove experimental modules warning (Guy Bedford) #​31974

In Node.js 13 we removed the need to include the --experimental-modules flag, but when running EcmaScript Modules in Node.js, this would still result in a warning ExperimentalWarning: The ESM module loader is experimental.

As of Node.js 14 there is no longer this warning when using ESM in Node.js. However, the ESM implementation in Node.js remains experimental. As per our stability index: “The feature is not subject to Semantic Versioning rules. Non-backward compatible changes or removal may occur in any future release.” Users should be cautious when using the feature in production environments.

Please keep in mind that the implementation of ESM in Node.js differs from the developer experience you might be familiar with. Most transpilation workflows support features such as optional file extensions or JSON modules that the Node.js ESM implementation does not support. It is highly likely that modules from transpiled environments will require a certain degree of refactoring to work in Node.js. It is worth mentioning that many of our design decisions were made with two primary goals. Spec compliance and Web Compatibility. It is our belief that the current implementation offers a future proof model to authoring ESM modules that paves the path to Universal JavaScript. Please read more in our documentation.

The ESM implementation in Node.js is still experimental but we do believe that we are getting very close to being able to call ESM in Node.js “stable”. Removing the warning is a huge step in that direction.

New V8 ArrayBuffer API
  • src: migrate to new V8 ArrayBuffer API (Thang Tran) #​30782

Multiple ArrayBuffers pointing to the same base address are no longer allowed by V8. This may impact native addons.

Toolchain and Compiler Upgrades
  • (SEMVER-MAJOR) build: update macos deployment target to 10.13 for 14.x (AshCripps) #​32454
  • (SEMVER-MAJOR) doc: update cross compiler machine for Linux armv7 (Richard Lau) #​32812
  • (SEMVER-MAJOR) doc: update Centos/RHEL releases use devtoolset-8 (Richard Lau) #​32812
  • (SEMVER-MAJOR) doc: remove SmartOS from official binaries (Richard Lau) #​32812
  • (SEMVER-MAJOR) win: block running on EOL Windows versions (João Reis) #​31954

It is expected that there will be an ABI mismatch on ARM between the Node.js binary and native addons. Native addons are only broken if they interact with std::shared_ptr. This is expected to be fixed in a later version of Node.js 14. - #​30786

Update to V8 8.1
  • (SEMVER-MAJOR) deps: update V8 to 8.1.307.20 (Matheus Marchini) #​32116
Other Notable Changes:
  • cli, report: move --report-on-fatalerror to stable (Colin Ihrig) #​32496
  • deps: upgrade to libuv 1.37.0 (Colin Ihrig) #​32866
  • fs: add fs/promises alias module (Gus Caplan) #​31553
Semver-Major Commits
  • [5360dd151d] - (SEMVER-MAJOR) assert: handle (deep) equal(NaN, NaN) as being identical (Ruben Bridgewater) #​30766

  • [a621608f12] - (SEMVER-MAJOR) build: update macos deployment target to 10.13 for 14.x (AshCripps) #​32454

  • [e65bed1b7e] - (SEMVER-MAJOR) child_process: create proper public API for channel (Anna Henningsen) #​30165

  • [1b9a62cff4] - (SEMVER-MAJOR) crypto: make DH error messages consistent (Tobias Nießen) #​31873

  • [bffa5044c5] - (SEMVER-MAJOR) crypto: move pbkdf2 without digest to EOL (James M Snell) #​31166

  • [10f5fa7513] - (SEMVER-MAJOR) crypto: forbid setting the PBKDF2 iter count to 0 (Tobias Nießen) #​30578

  • [2883c855e0] - (SEMVER-MAJOR) deps: update V8 to 8.1.307.20 (Matheus Marchini) #​32116

  • [1b2e2944bc] - (SEMVER-MAJOR) dgram: don't hide implicit bind errors (Colin Ihrig) #​31958

  • [1a1ce93317] - (SEMVER-MAJOR) doc: update cross compiler machine for Linux armv7 (Richard Lau) #​32812

  • [dad96e4fc1] - (SEMVER-MAJOR) doc: update Centos/RHEL releases use devtoolset-8 (Richard Lau) #​32812

  • [5317202aa1] - (SEMVER-MAJOR) doc: remove SmartOS from official binaries (Richard Lau) #​32812

  • [75ee5b2622] - (SEMVER-MAJOR) doc: deprecate process.umask() with no arguments (Colin Ihrig) #​32499

  • [afe353061b] - (SEMVER-MAJOR) doc: fs.write is not longer coercing strings (Juan José Arboleda) #​31030

  • [a45c1aa39f] - (SEMVER-MAJOR) doc: fix mode and flags being mistaken in fs (Ruben Bridgewater) #​27044

  • [331d636240] - (SEMVER-MAJOR) errors: remove unused ERR_SOCKET_CANNOT_SEND error (Colin Ihrig) #​31958

  • [b8e41774d4] - (SEMVER-MAJOR) fs: add fs/promises alias module (Gus Caplan) #​31553

  • [fb6df3bfac] - (SEMVER-MAJOR) fs: validate the input data to be of expected types (Ruben Bridgewater) #​31030

  • [2d8febceef] - (SEMVER-MAJOR) fs: deprecate closing FileHandle on garbage collection (James M Snell) #​28396

  • [67e067eb06] - (SEMVER-MAJOR) fs: watch signals for recursive incompatibility (Eran Levin) #​29947

  • [f0d2df41f8] - (SEMVER-MAJOR) fs: change streams to always emit close by default (Robert Nagy) #​31408

  • [a13500f503] - (SEMVER-MAJOR) fs: improve mode and flags validation (Ruben Bridgewater) #​27044

  • [535e9571f5] - (SEMVER-MAJOR) fs: make FSStatWatcher.start private (Lucas Holmquist) #​29971

  • [c1b2f6afbe] - (SEMVER-MAJOR) http: detach socket from IncomingMessage on keep-alive (Robert Nagy) #​32153

  • [173d044d09] - (SEMVER-MAJOR) http: align OutgoingMessage and ClientRequest destroy (Robert Nagy) #​32148

  • [d3715c76b5] - (SEMVER-MAJOR) http: move OutboundMessage.prototype.flush to EOL (James M Snell) #​31164

  • [c776a37791] - (SEMVER-MAJOR) http: end with data can cause write after end (Robert Nagy) #​28666

  • [ff2ed3ec85] - (SEMVER-MAJOR) http: remove unused hasItems() from freelist (Rich Trott) #​30744

  • [d247a8e1dc] - (SEMVER-MAJOR) http: emit close on socket re-use (Robert Nagy) #​28685

  • [6f0ec79e42] - (SEMVER-MAJOR) http,stream: make virtual methods throw an error (Luigi Pinca) #​31912

  • [ec0dd6fa1c] - (SEMVER-MAJOR) lib: move GLOBAL and root aliases to EOL (James M Snell) #​31167

  • [d7452b7140] - (SEMVER-MAJOR) module: warn on using unfinished circular dependency (Anna Henningsen) #​29935

  • [eeccd52b4e] - (SEMVER-MAJOR) net: make readable/writable start as true (Robert Nagy) #​32272

  • [ab4115f17c] - (SEMVER-MAJOR) os: move tmpDir() to EOL (James M Snell) #​31169

  • [8c18e91c8a] - (SEMVER-MAJOR) process: remove undocumented now argument from emitWarning() (Rich Trott) #​31643

  • [84c426cb60] - (SEMVER-MAJOR) repl: properly handle repl.repl (Ruben Bridgewater) #​30981

  • [4f523c2c1a] - (SEMVER-MAJOR) src: migrate to new V8 ArrayBuffer API (Thang Tran) #​30782

  • [c712fb7cd6] - (SEMVER-MAJOR) src: add abstract IsolatePlatformDelegate (Marcel Laverdet) #​30324

  • [1428a92492] - (SEMVER-MAJOR) stream: make pipeline try to wait for 'close' (Robert Nagy) #​32158

  • [388cef61e8] - (SEMVER-MAJOR) stream: align stream.Duplex with net.Socket (Robert Nagy) #​32139

  • [7cafd5f3a9] - (SEMVER-MAJOR) stream: fix finished w/ 'close' before 'end' (Robert Nagy) #​31545

  • [311e12b962] - (SEMVER-MAJOR) stream: fix multiple destroy calls (Robert Nagy) #​29197

  • [1f209129c7] - (SEMVER-MAJOR) stream: throw invalid argument errors (Robert Nagy) #​31831

  • [d016b9d708] - (SEMVER-MAJOR) stream: finished callback for closed streams (Robert Nagy) #​31509

  • [e559842188] - (SEMVER-MAJOR) stream: make readable & writable computed (Robert Nagy) #​31197

  • [907c07fa85] - (SEMVER-MAJOR) stream: move _writableState.buffer to EOL (James M Snell) #​31165

  • [66f4e4edcb] - (SEMVER-MAJOR) stream: do not emit 'end' after 'error' (Robert Nagy) #​31182

  • [75b30c606c] - (SEMVER-MAJOR) stream: emit 'error' asynchronously (Robert Nagy) #​29744

  • [4bec6d13f9] - (SEMVER-MAJOR) stream: enable autoDestroy by default (Robert Nagy) #​30623

  • [20d009d2fd] - (SEMVER-MAJOR) stream: pipe should not swallow error (Robert Nagy) #​30993

  • [67ed526ab0] - (SEMVER-MAJOR) stream: error state cleanup (Robert Nagy) #​30851

  • [e902fadc5e] - (SEMVER-MAJOR) stream: do not throw multiple callback errors in writable (Robert Nagy) #​30614

  • [e13a37e49d] - (SEMVER-MAJOR) stream: ensure finish is emitted in next tick (Robert Nagy) #​30733

  • [9d09969f4c] - (SEMVER-MAJOR) stream: always invoke end callback (Robert Nagy) #​29747

  • [0f78dcc86d] - (SEMVER-MAJOR) util: escape C1 control characters and switch to hex format (Ruben Bridgewater) #​29826

  • [cb8898c48f] - (SEMVER-MAJOR) win: block running on EOL Windows versions (João Reis) #​31954

  • [a9401439c7] - (SEMVER-MAJOR) zlib: align with streams (Robert Nagy) #​32220

Semver-Minor Commits
  • [63f0dd1ab9] - (SEMVER-MINOR) async_hooks: merge run and exit methods (Andrey Pechkurov) #​31950
  • [a683e87cd0] - (SEMVER-MINOR) async_hooks: prevent sync methods of async storage exiting outer context (Stephen Belanger) #​31950
  • [f571b294f5] - (SEMVER-MINOR) doc: deprecate process.mainModule (Antoine du HAMEL) #​32232
  • [e04f599258] - (SEMVER-MINOR) doc: add basic embedding example documentation (Anna Henningsen) #​30467
  • [e93503be83] - (SEMVER-MINOR) embedding: provide hook for custom process.exit() behaviour (Anna Henningsen) #​32531
  • [a8cf886de7] - (SEMVER-MINOR) src: shutdown platform from FreePlatform() (Anna Henningsen) #​30467
  • [0e576740dc] - (SEMVER-MINOR) src: fix what a dispose without checking (Jichan) #​30467
  • [887b6a143b] - (SEMVER-MINOR) src: allow non-Node.js TracingControllers (Anna Henningsen) #​30467
  • [7e0264d932] - (SEMVER-MINOR) src: add ability to look up platform based on Environment\* (Anna Henningsen) #​30467
  • [d7f11077f1] - (SEMVER-MINOR) src: make InitializeNodeWithArgs() official public API (Anna Henningsen) #​30467
  • [821e21de8c] - (SEMVER-MINOR) src: add unique_ptr equivalent of CreatePlatform (Anna Henningsen) #​30467
  • [7dead8440c] - (SEMVER-MINOR) src: add LoadEnvironment() variant taking a string (Anna Henningsen) #​30467
  • [c44edec4da] - (SEMVER-MINOR) src: provide a variant of LoadEnvironment taking a callback (Anna Henningsen) #​30467
  • [a9fb51f9be] - (SEMVER-MINOR) src: align worker and main thread code with embedder API (Anna Henningsen) #​30467
  • [084c379648] - (SEMVER-MINOR) src: associate is_main_thread() with worker_context() (Anna Henningsen) #​30467
  • [64c01222d9] - (SEMVER-MINOR) src: move worker_context from Environment to IsolateData (Anna Henningsen) #​30467
  • [288382a4ce] - (SEMVER-MINOR) src: fix memory leak in CreateEnvironment when bootstrap fails (Anna Henningsen) #​30467
  • [d7bc5816a5] - (SEMVER-MINOR) src: make FreeEnvironment() perform all necessary cleanup (Anna Henningsen) #​30467
  • [43d32b073f] - (SEMVER-MINOR) src,test: add full-featured embedder API test (Anna Henningsen) #​30467
  • [2061c33670] - (SEMVER-MINOR) test: add extended embedder cctest (Anna Henningsen) #​30467
  • [2561484dcb] - (SEMVER-MINOR) test: re-enable cctest that was commented out (Anna Henningsen) #​30467
Semver-Patch Commits

Renovate configuration

📅 Schedule: "on the 1st through 7th day of the month" in timezone America/Los_Angeles.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

Merge request reports

Loading