Skip to content

Conversation

@thi-bot
Copy link
Collaborator

@thi-bot thi-bot commented Oct 21, 2020

This PR contains the following updates:

Package Update Change
node major 14 -> 15

Release Notes

nodejs/node

v15.2.1

Compare Source

Notable changes

This is a security release.

Vulnerabilities fixed:

  • CVE-2020-8277: Denial of Service through DNS request (High). A Node.js application that allows an attacker to trigger a DNS request for a host of their choice could trigger a Denial of service by getting the application to resolve a DNS record with a larger number of responses.
Commits

v15.2.0

Compare Source

Notable changes
  • events:
    • getEventListeners static (Benjamin Gruenbaum) #​35991
  • fs:
    • support abortsignal in writeFile (Benjamin Gruenbaum) #​35993
    • add support for AbortSignal in readFile (Benjamin Gruenbaum) #​35911
  • stream:
    • fix thrown object reference (Gil Pedersen) #​36065
Commits

v15.1.0

Compare Source

Notable Changes
Diagnostics channel (experimental module)

diagnostics_channel is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes.

With diagnostics_channel, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with dc.channel(name) and call channel.publish(data) to send the data to any listeners to that channel.

const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};

Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using channel.subscribe(listener) to run a function whenever a message is published to that channel.

const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});

The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger #​34895.

New child process 'spawn' event

Instances of ChildProcess now emit a new 'spawn' event once the child process has spawned successfully.

If emitted, the 'spawn' event comes before all other events and before any data is received via stdout or stderr.

The 'spawn' event will fire regardless of whether an error occurs within the spawned process.
For example, if bash some-command spawns successfully, the 'spawn' event will fire, though bash may fail to spawn some-command.
This caveat also applies when using { shell: true }.

Contributed by Matthew Francis Brunetti #​35369.

Set the local address for DNS resolution

It is now possible to set the local IP address used by a Resolver instance to send its requests.
This allows programs to specify outbound interfaces when used on multi-homed
systems.

The resolver will use the v4 local address when making requests to IPv4 DNS servers, and the v6 local address when making requests to IPv6 DNS servers.

const { Resolver } = require('dns');

const resolver = new Resolver();

resolver.setLocalAddress('10.1.2.3');
// Equivalent to: resolver.setLocalAddress('10.1.2.3', '::0');

Contributed by Josh Dague #​34824.

Control V8 coverage at runtime

The v8 module includes two new methods to control the V8 coverage started by the NODE_V8_COVERAGE environment variable.

With v8.takeCoverage(), it is possible to write a coverage report to disk on demand. This can be done multiple times during the lifetime of the process, and the execution counter will be reset on each call.
When the process is about to exit, one last coverage will still be written to disk, unless v8.stopCoverage() was invoked before.

The v8.stopCoverage() method allows to stop the coverage collection, so that V8 can release the execution counters and optimize code.

Contributed by Joyee Cheung #​33807.

Analyze Worker's event loop utilization

Worker instances now have a performance property, with a single eventLoopUtilization method that can be used to gather information about the worker's event loop utilization between the 'online' and 'exit' events.

The method works the same way as perf_hooks eventLoopUtilization().

Contributed by Trevor Norris #​35664.

Take a V8 heap snapshot just before running out of memory (experimental)

With the new --heapsnapshot-near-heap-limit=max_count experimental command line flag, it is now possible to automatically generate a heap snapshot when the V8 heap usage is approaching the heap limit. count should be a non-negative integer (in which case Node.js will write no more than max_count snapshots to disk).

When generating snapshots, garbage collection may be triggered and bring the heap usage down, therefore multiple snapshots may be written to disk before the Node.js instance finally runs out of memory. These heap snapshots can be compared to determine what objects are being allocated during the time consecutive snapshots are taken.

Generating V8 snapshots takes time and memory (both memory managed by the V8 heap and native memory outside the V8 heap). The bigger the heap is, the more resources it needs. Node.js will adjust the V8 heap to accommondate the additional V8 heap memory overhead, and try its best to avoid using up all the memory avialable to the process.

$ node --max-old-space-size=100 --heapsnapshot-near-heap-limit=3 index.js
Wrote snapshot to Heap.20200430.100036.49580.0.001.heapsnapshot
Wrote snapshot to Heap.20200430.100037.49580.0.002.heapsnapshot
Wrote snapshot to Heap.20200430.100038.49580.0.003.heapsnapshot

<--- Last few GCs --->

[49580:0x110000000]     4826 ms: Mark-sweep 130.6 (147.8) -> 130.5 (147.8) MB, 27.4 / 0.0 ms  (average mu = 0.126, current mu = 0.034) allocation failure scavenge might not succeed
[49580:0x110000000]     4845 ms: Mark-sweep 130.6 (147.8) -> 130.6 (147.8) MB, 18.8 / 0.0 ms  (average mu = 0.088, current mu = 0.031) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
....

Contributed by Joyee Cheung #​33010.

Commits
Semver-minor commits
  • [8169902b40] - (SEMVER-MINOR) child_process: add ChildProcess 'spawn' event (Matthew Francis Brunetti) #​35369
  • [548f91af2c] - (SEMVER-MINOR) dns: add setLocalAddress to Resolver (Josh Dague) #​34824
  • [f861733bac] - (SEMVER-MINOR) http: report request start and end with diagnostics_channel (Stephen Belanger) #​34895
  • [883ed4b7f1] - (SEMVER-MINOR) http2: add updateSettings to both http2 servers (Vincent Boivin) #​35383
  • [b38a43d5d9] - (SEMVER-MINOR) lib: create diagnostics_channel module (Stephen Belanger) #​34895
  • [a7f37bc725] - (SEMVER-MINOR) src: add --heapsnapshot-near-heap-limit option (Joyee Cheung) #​33010
  • [7bfa872013] - (SEMVER-MINOR) v8: implement v8.stopCoverage() (Joyee Cheung) #​33807
  • [15ffed5319] - (SEMVER-MINOR) v8: implement v8.takeCoverage() (Joyee Cheung) #​33807
  • [221e28311f] - (SEMVER-MINOR) worker: add eventLoopUtilization() (Trevor Norris) #​35664
Semver-patch commits
Documentation commits
Other commits

v15.0.1

Compare Source

Notable changes
  • crypto: fix regression on randomFillSync (James M Snell) #​35723
  • deps: upgrade npm to 7.0.3 (Ruy Adorno) #​35724
  • doc: add release key for Danielle Adams (Danielle Adams) #​35545
Commits

v15.0.0

Compare Source

Notable Changes
Deprecations and Removals
  • [a11788736a] - (SEMVER-MAJOR) build: remove --build-v8-with-gn configure option (Yang Guo) #​27576
  • [89428c7a2d] - (SEMVER-MAJOR) build: drop support for VS2017 (Michaël Zasso) #​33694
  • [c25cf34ac1] - (SEMVER-MAJOR) doc: move DEP0018 to End-of-Life (Rich Trott) #​35316
  • [2002d90abd] - (SEMVER-MAJOR) fs: deprecation warning on recursive rmdir (Ian Sutherland) #​35562
  • [eee522ac29] - (SEMVER-MAJOR) lib: add EventTarget-related browser globals (Anna Henningsen) #​35496
  • [41796ebd30] - (SEMVER-MAJOR) net: remove long deprecated server.connections property (James M Snell) #​33647
  • [a416692e93] - (SEMVER-MAJOR) repl: remove deprecated repl.memory function (Ruben Bridgewater) #​33286
  • [f217b2dfb0] - (SEMVER-MAJOR) repl: remove deprecated repl.turnOffEditorMode() function (Ruben Bridgewater) #​33286
  • [a1bcad8dc0] - (SEMVER-MAJOR) repl: remove deprecated repl.parseREPLKeyword() function (Ruben Bridgewater) #​33286
  • [4ace010b53] - (SEMVER-MAJOR) repl: remove deprecated bufferedCommand property (Ruben Bridgewater) #​33286
  • [37524307fe] - (SEMVER-MAJOR) repl: remove deprecated .rli (Ruben Bridgewater) #​33286
  • [a85ce885bd] - (SEMVER-MAJOR) src: remove deprecated node debug command (James M Snell) #​33648
  • [a8904e8eee] - (SEMVER-MAJOR) timers: introduce timers/promises (James M Snell) #​33950
  • [1211b9a72f] - (SEMVER-MAJOR) util: change default value of maxStringLength to 10000 (unknown) #​32744
  • [ca8f3ef2e5] - (SEMVER-MAJOR) wasi: drop --experimental-wasm-bigint requirement (Colin Ihrig) #​35415
npm 7 - #​35631

Node.js 15 comes with a new major release of npm, npm 7. npm 7 comes with many new features - including npm workspaces and a new package-lock.json format. npm 7 also includes yarn.lock file support. One of the big changes in npm 7 is that peer dependencies are now installed by default.

Throw On Unhandled Rejections - #​33021

As of Node.js 15, the default mode for unhandledRejection is changed to throw (from warn). In throw mode, if an unhandledRejection hook is not set, the unhandledRejection is raised as an uncaught exception. Users that have an unhandledRejection hook should see no change in behavior, and it’s still possible to switch modes using the --unhandled-rejections=mode process flag.

QUIC - #​32379

Node.js 15 comes with experimental support QUIC, which can be enabled by compiling Node.js with the --experimental-quic configuration flag. The Node.js QUIC implementation is exposed by the core net module.

V8 8.6 - #​35415

The V8 JavaScript engine has been updated to V8 8.6 (V8 8.4 is the latest available in Node.js 14). Along with performance tweaks and improvements the V8 update also brings the following language features:

  • Promise.any() (from V8 8.5)
  • AggregateError (from V8 8.5)
  • String.prototype.replaceAll() (from V8 8.5)
  • Logical assignment operators &&=, ||=, and ??= (from V8 8.5)
Other Notable Changes
  • [50228cf6ff] - (SEMVER-MAJOR) assert: add assert/strict alias module (ExE Boss) #​34001
  • [039cd00a9a] - (SEMVER-MAJOR) dns: add dns/promises alias (shisama) #​32953
  • [54b36e401d] - (SEMVER-MAJOR) fs: reimplement read and write streams using stream.construct (Robert Nagy) #​29656
  • [f5c0e282cc] - (SEMVER-MAJOR) http2: allow Host in HTTP/2 requests (Alba Mendez) #​34664
  • [eee522ac29] - (SEMVER-MAJOR) lib: add EventTarget-related browser globals (Anna Henningsen) #​35496
  • [a8b26d72c5] - (SEMVER-MAJOR) lib: unflag AbortController (James M Snell) #​33527
  • [74ca960aac] - (SEMVER-MAJOR) lib: initial experimental AbortController implementation (James M Snell) #​33527
  • [efefdd668d] - (SEMVER-MAJOR) net: autoDestroy Socket (Robert Nagy) #​31806
  • [0fb91acedf] - (SEMVER-MAJOR) src: disallow JS execution inside FreeEnvironment (Anna Henningsen) #​33874
  • [21782277c2] - (SEMVER-MAJOR) src: use node:moduleName as builtin module filename (Michaël Zasso) #​35498
  • [fb8cc72e73] - (SEMVER-MAJOR) stream: construct (Robert Nagy) #​29656
  • [705d888387] - (SEMVER-MAJOR) worker: make MessageEvent class more Web-compatible (Anna Henningsen) #​35496
Semver-Major Commits

Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 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 Renovate Bot.

@thi-bot thi-bot added the enhancement New feature or request label Oct 21, 2020
@thi-bot thi-bot force-pushed the renovate/node-15.x branch 2 times, most recently from 71eb841 to 58d1d4e Compare October 25, 2020 15:09
@thi-bot thi-bot force-pushed the renovate/node-15.x branch 3 times, most recently from 99f02dc to a2bf5b8 Compare November 6, 2020 16:02
@thi-bot thi-bot force-pushed the renovate/node-15.x branch 2 times, most recently from 0b12b2b to 4ca1f06 Compare November 16, 2020 16:31
| datasource  | package     | from     | to      |
| ----------- | ----------- | -------- | ------- |
| github-tags | nodejs/node | v14.15.1 | v15.2.1 |
@thibaudcolas thibaudcolas deleted the renovate/node-15.x branch November 23, 2020 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants