Skip to content

Commit d132e9d

Browse files
committed
2021-05-11, Version 14.17.0 'Fermium' (LTS), @danielleadams
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. The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0 to enable testing it at a larger scale. 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. ```js 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. ```js 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). UUID support in the crypto module: The new `crypto.randomUUID()` method now allows to generate random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings: ```js const { randomUUID } = require('crypto'); console.log(randomUUID()); // 'aa7c91a1-f8fc-4339-b9db-f93fc7233429' ``` Contributed by James M Snell (#36729). Experimental support for `AbortController` and `AbortSignal`: Node.js 14.17.0 adds experimental partial support for `AbortController` and `AbortSignal`. Both constructors can be enabled globally using the `--experimental-abortcontroller` flag. Additionally, several Node.js APIs have been updated to support `AbortSignal` for cancellation. It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives should be compatible. `AbortSignal` support was added to the following methods: * `child_process.exec` * `child_process.execFile` * `child_process.fork` * `child_process.spawn` * `dgram.createSocket` * `events.on` * `events.once` * `fs.readFile` * `fs.watch` * `fs.writeFile` * `http.request` * `https.request` * `http2Session.request` * The promisified variants of `setImmediate` and `setTimeout` Other notable changes: * doc: * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784) * add legacy status to stability index (James M Snell) (#37784) * upgrade stability status of report API (Gireesh Punathil) (#35654) * deps: * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051) * update ICU to 68.1 (Michaël Zasso) (#36187) * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360) * http: * add http.ClientRequest.getRawHeaderNames() (simov) (#37660) * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895) * util: * add getSystemErrorMap() impl (eladkeyshawn) (#38101) PR-URL: #38507
1 parent f755fc4 commit d132e9d

22 files changed

+751
-52
lines changed

doc/api/buffer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,7 +3114,7 @@ accessed using `require('buffer')`.
31143114

31153115
### `buffer.atob(data)`
31163116
<!-- YAML
3117-
added: REPLACEME
3117+
added: v14.17.0
31183118
-->
31193119

31203120
* `data` {any} The Base64-encoded input string.
@@ -3133,7 +3133,7 @@ and binary data should be performed using `Buffer.from(str, 'base64')` and
31333133

31343134
### `buffer.btoa(data)`
31353135
<!-- YAML
3136-
added: REPLACEME
3136+
added: v14.17.0
31373137
-->
31383138

31393139
* `data` {any} An ASCII (Latin1) string.

doc/api/child_process.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ lsExample();
250250
<!-- YAML
251251
added: v0.1.91
252252
changes:
253-
- version: REPLACEME
253+
- version: v14.17.0
254254
pr-url: https://github.com/nodejs/node/pull/36308
255255
description: AbortSignal support was added.
256256
- version: v8.8.0
@@ -351,7 +351,7 @@ controller.abort();
351351
<!-- YAML
352352
added: v0.5.0
353353
changes:
354-
- version: REPLACEME
354+
- version: v14.17.0
355355
pr-url: https://github.com/nodejs/node/pull/36603
356356
description: AbortSignal support was added.
357357
- version:
@@ -431,7 +431,7 @@ The `signal` option works exactly the same way it does in
431431
<!-- YAML
432432
added: v0.1.90
433433
changes:
434-
- version: REPLACEME
434+
- version: v14.17.0
435435
pr-url: https://github.com/nodejs/node/pull/36432
436436
description: AbortSignal support was added.
437437
- version:
@@ -1086,7 +1086,7 @@ See [Advanced serialization][] for more details.
10861086

10871087
### Event: `'spawn'`
10881088
<!-- YAML
1089-
added: REPLACEME
1089+
added: v14.17.0
10901090
-->
10911091

10921092
The `'spawn'` event is emitted once the child process has spawned successfully.

doc/api/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Currently, overriding `Error.prepareStackTrace` is ignored when the
199199

200200
### `--experimental-abortcontroller`
201201
<!-- YAML
202-
added: REPLACEME
202+
added: v14.17.0
203203
-->
204204

205205
Enable experimental `AbortController` and `AbortSignal` support.

doc/api/crypto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2843,7 +2843,7 @@ console.log(`The dice rolled: ${n}`);
28432843

28442844
### `crypto.randomUUID([options])`
28452845
<!-- YAML
2846-
added: REPLACEME
2846+
added: v14.17.0
28472847
-->
28482848

28492849
* `options` {Object}

doc/api/deprecations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ future release.
21482148
### DEP0116: Legacy URL API
21492149
<!-- YAML
21502150
changes:
2151-
- version: REPLACEME
2151+
- version: v14.17.0
21522152
pr-url: https://github.com/nodejs/node/pull/37784
21532153
description: Deprecation revoked. Status changed to "Legacy".
21542154
- version: v11.0.0

doc/api/diagnostics_channel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Diagnostics Channel
22

3-
<!--introduced_in=REPLACEME-->
3+
<!--introduced_in=v14.17.0-->
44

55
> Stability: 1 - Experimental
66

doc/api/dns.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ callbacks will be called with an error with code `ECANCELLED`.
119119

120120
### `resolver.setLocalAddress([ipv4][, ipv6])`
121121
<!-- YAML
122-
added: REPLACEME
122+
added: v14.17.0
123123
-->
124124

125125
* `ipv4` {string} A string representation of an IPv4 address.
@@ -437,7 +437,7 @@ will contain an array of canonical name records available for the `hostname`
437437

438438
## `dns.resolveCaa(hostname, callback)`
439439
<!-- YAML
440-
added: REPLACEME
440+
added: v14.17.0
441441
-->
442442

443443
* `hostname` {string}
@@ -718,7 +718,7 @@ The following methods from the `dnsPromises` API are available:
718718

719719
### `resolver.cancel()`
720720
<!-- YAML
721-
added: REPLACEME
721+
added: v14.17.0
722722
-->
723723

724724
Cancel all outstanding DNS queries made by this resolver. The corresponding
@@ -946,7 +946,7 @@ Here is an example of the result object:
946946

947947
### `dnsPromises.resolveCaa(hostname)`
948948
<!-- YAML
949-
added: REPLACEME
949+
added: v14.17.0
950950
-->
951951

952952
* `hostname` {string}

doc/api/esm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
added: v8.5.0
77
changes:
88
- version:
9-
- REPLACEME
9+
- v14.17.0
1010
pr-url: https://github.com/nodejs/node/pull/35781
1111
description: Stabilize modules implementation.
1212
- version:

doc/api/events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ regular `'error'` listener is installed.
385385

386386
### `EventEmitter.setMaxListeners(n[, ...eventTargets])`
387387
<!-- YAML
388-
added: REPLACEME
388+
added: v14.17.0
389389
-->
390390

391391
* `n` {number} A non-negative number. The maximum number of listeners per
@@ -855,7 +855,7 @@ class MyClass extends EventEmitter {
855855
## `events.getEventListeners(emitterOrTarget, eventName)`
856856
<!-- YAML
857857
added:
858-
- REPLACEME
858+
- v14.17.0
859859
-->
860860
* `emitterOrTarget` {EventEmitter|EventTarget}
861861
* `eventName` {string|symbol}

doc/api/fs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ See also: chown(2).
16121612
<!-- YAML
16131613
added: v0.0.2
16141614
changes:
1615-
- version: REPLACEME
1615+
- version: v14.17.0
16161616
pr-url: https://github.com/nodejs/node/pull/37174
16171617
description: A default callback is now used if one is not provided.
16181618
- version: v10.0.0
@@ -3031,7 +3031,7 @@ If `options.withFileTypes` is set to `true`, the result will contain
30313031
<!-- YAML
30323032
added: v0.1.29
30333033
changes:
3034-
- version: REPLACEME
3034+
- version: v14.17.0
30353035
pr-url: https://github.com/nodejs/node/pull/35911
30363036
description: The options argument may include an AbortSignal to abort an
30373037
ongoing readFile request.
@@ -4083,7 +4083,7 @@ this API: [`fs.utimes()`][].
40834083
<!-- YAML
40844084
added: v0.5.10
40854085
changes:
4086-
- version: REPLACEME
4086+
- version: v14.17.0
40874087
pr-url: https://github.com/nodejs/node/pull/37190
40884088
description: Added support for closing the watcher with an AbortSignal.
40894089
- version: v7.6.0
@@ -4405,7 +4405,7 @@ details.
44054405
<!-- YAML
44064406
added: v0.1.29
44074407
changes:
4408-
- version: REPLACEME
4408+
- version: v14.17.0
44094409
pr-url: https://github.com/nodejs/node/pull/35993
44104410
description: The options argument may include an AbortSignal to abort an
44114411
ongoing writeFile request.
@@ -5491,7 +5491,7 @@ print('./').catch(console.error);
54915491
<!-- YAML
54925492
added: v10.0.0
54935493
changes:
5494-
- version: REPLACEME
5494+
- version: v14.17.0
54955495
pr-url: https://github.com/nodejs/node/pull/35911
54965496
description: The options argument may include an AbortSignal to abort an
54975497
ongoing readFile request.
@@ -5741,7 +5741,7 @@ The `atime` and `mtime` arguments follow these rules:
57415741
<!-- YAML
57425742
added: v10.0.0
57435743
changes:
5744-
- version: REPLACEME
5744+
- version: v14.17.0
57455745
pr-url: https://github.com/nodejs/node/pull/35993
57465746
description: The options argument may include an AbortSignal to abort an
57475747
ongoing writeFile request.

0 commit comments

Comments
 (0)