Skip to content

Commit aa15690

Browse files
committed
2021-05-11, Version 14.17.0 'Fermium' (LTS)
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 aa15690

22 files changed

+751
-52
lines changed

doc/api/buffer.md

+2-2
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

+4-4
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+4-4
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

+1-1
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

+2-2
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

+6-6
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.

doc/api/globals.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ accessible.
1919

2020
## Class: `AbortController`
2121
<!--YAML
22-
added: REPLACEME
22+
added: v14.17.0
2323
-->
2424

2525
> Stability: 1 - Experimental
@@ -44,22 +44,22 @@ console.log(ac.signal.aborted); // Prints True
4444

4545
### `abortController.abort()`
4646
<!-- YAML
47-
added: REPLACEME
47+
added: v14.17.0
4848
-->
4949

5050
Triggers the abort signal, causing the `abortController.signal` to emit
5151
the `'abort'` event.
5252

5353
### `abortController.signal`
5454
<!-- YAML
55-
added: REPLACEME
55+
added: v14.17.0
5656
-->
5757

5858
* Type: {AbortSignal}
5959

6060
### Class: `AbortSignal`
6161
<!-- YAML
62-
added: REPLACEME
62+
added: v14.17.0
6363
-->
6464

6565
* Extends: {EventTarget}
@@ -69,7 +69,7 @@ The `AbortSignal` is used to notify observers when the
6969

7070
#### Static method: `AbortSignal.abort()`
7171
<!-- YAML
72-
added: REPLACEME
72+
added: v14.17.0
7373
-->
7474

7575
* Returns: {AbortSignal}
@@ -78,7 +78,7 @@ Returns a new already aborted `AbortSignal`.
7878

7979
#### Event: `'abort'`
8080
<!-- YAML
81-
added: REPLACEME
81+
added: v14.17.0
8282
-->
8383

8484
The `'abort'` event is emitted when the `abortController.abort()` method
@@ -112,14 +112,14 @@ result in memory leaks.
112112

113113
#### `abortSignal.aborted`
114114
<!-- YAML
115-
added: REPLACEME
115+
added: v14.17.0
116116
-->
117117

118118
* Type: {boolean} True after the `AbortController` has been aborted.
119119

120120
#### `abortSignal.onabort`
121121
<!-- YAML
122-
added: REPLACEME
122+
added: v14.17.0
123123
-->
124124

125125
* Type: {Function}

doc/api/http.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ http.get({
113113
<!-- YAML
114114
added: v0.3.4
115115
changes:
116-
- version: REPLACEME
116+
- version: v14.17.0
117117
pr-url: https://github.com/nodejs/node/pull/36685
118118
description: Change the default scheduling from 'fifo' to 'lifo'.
119119
- version: v14.5.0
@@ -758,7 +758,7 @@ const cookie = request.getHeader('Cookie');
758758

759759
### `request.getRawHeaderNames()`
760760
<!-- YAML
761-
added: REPLACEME
761+
added: v14.17.0
762762
-->
763763

764764
* Returns: {string[]}
@@ -2364,7 +2364,7 @@ This can be overridden for servers and client requests by passing the
23642364
<!-- YAML
23652365
added: v0.3.6
23662366
changes:
2367-
- version: REPLACEME
2367+
- version: v14.17.0
23682368
pr-url: https://github.com/nodejs/node/pull/36048
23692369
description: It is possible to abort a request with an AbortSignal.
23702370
- version:

doc/api/http2.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- YAML
33
added: v8.4.0
44
changes:
5-
- version: REPLACEME
5+
- version: v14.17.0
66
pr-url: https://github.com/nodejs/node/pull/36070
77
description: It is possible to abort a request with an AbortSignal.
88
- version: v10.10.0
@@ -1880,7 +1880,7 @@ value only affects new connections to the server, not any existing connections.
18801880

18811881
#### `server.updateSettings([settings])`
18821882
<!-- YAML
1883-
added: REPLACEME
1883+
added: v14.17.0
18841884
-->
18851885

18861886
* `settings` {HTTP/2 Settings Object}
@@ -2074,7 +2074,7 @@ value only affects new connections to the server, not any existing connections.
20742074

20752075
#### `server.updateSettings([settings])`
20762076
<!-- YAML
2077-
added: REPLACEME
2077+
added: v14.17.0
20782078
-->
20792079

20802080
* `settings` {HTTP/2 Settings Object}

doc/api/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ filename.
891891

892892
### `module.isPreloading`
893893
<!-- YAML
894-
added: REPLACEME
894+
added: v14.17.0
895895
-->
896896

897897
* Type: {boolean} `true` if the module is running during the Node.js preload

doc/api/process.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ Additional documentation is available in the [report documentation][].
19861986
added: v11.12.0
19871987
changes:
19881988
- version:
1989-
- REPLACEME
1989+
- v14.17.0
19901990
pr-url: https://github.com/nodejs/node/pull/35654
19911991
description: This API is no longer experimental.
19921992
-->

doc/api/readline.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ whenever `rl.prompt()` is called.
285285

286286
### `rl.getPrompt()`
287287
<!-- YAML
288-
added: REPLACEME
288+
added: v14.17.0
289289
-->
290290

291291
* Returns: {string} the current prompt string

doc/api/stream.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ the status of the `highWaterMark`.
576576

577577
##### `writable.writableNeedDrain`
578578
<!-- YAML
579-
added: REPLACEME
579+
added: v14.17.0
580580
-->
581581

582582
* {boolean}

0 commit comments

Comments
 (0)