Skip to content

Commit 16e00a1

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 4ebb88f commit 16e00a1

20 files changed

+840
-41
lines changed

doc/api/buffer.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -3283,7 +3283,9 @@ accessed using `require('buffer')`.
32833283

32843284
### `buffer.atob(data)`
32853285
<!-- YAML
3286-
added: v15.13.0
3286+
added:
3287+
- v15.13.0
3288+
- v14.17.0
32873289
-->
32883290

32893291
> Stability: 3 - Legacy. Use `Buffer.from(data, 'base64')` instead.
@@ -3304,7 +3306,9 @@ and binary data should be performed using `Buffer.from(str, 'base64')` and
33043306

33053307
### `buffer.btoa(data)`
33063308
<!-- YAML
3307-
added: v15.13.0
3309+
added:
3310+
- v15.13.0
3311+
- v14.17.0
33083312
-->
33093313

33103314
> Stability: 3 - Legacy. Use `buf.toString('base64')` instead.

doc/api/child_process.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ controller.abort();
271271
<!-- YAML
272272
added: v0.1.91
273273
changes:
274-
- version: v15.4.0
274+
- version:
275+
- v15.4.0
276+
- v14.17.0
275277
pr-url: https://github.com/nodejs/node/pull/36308
276278
description: AbortSignal support was added.
277279
- version: v8.8.0
@@ -380,7 +382,9 @@ changes:
380382
- version: v15.11.0
381383
pr-url: https://github.com/nodejs/node/pull/37325
382384
description: killSignal for AbortSignal was added.
383-
- version: v15.6.0
385+
- version:
386+
- v15.6.0
387+
- v14.17.0
384388
pr-url: https://github.com/nodejs/node/pull/36603
385389
description: AbortSignal support was added.
386390
- version:
@@ -489,7 +493,9 @@ changes:
489493
- version: v15.11.0
490494
pr-url: https://github.com/nodejs/node/pull/37325
491495
description: killSignal for AbortSignal was added.
492-
- version: v15.5.0
496+
- version:
497+
- v15.5.0
498+
- v14.17.0
493499
pr-url: https://github.com/nodejs/node/pull/36432
494500
description: AbortSignal support was added.
495501
- version:
@@ -1160,7 +1166,9 @@ See [Advanced serialization][] for more details.
11601166

11611167
### Event: `'spawn'`
11621168
<!-- YAML
1163-
added: v15.1.0
1169+
added:
1170+
- v15.1.0
1171+
- v14.17.0
11641172
-->
11651173

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

doc/api/cli.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ modifying the stack trace.
210210

211211
### `--experimental-abortcontroller`
212212
<!-- YAML
213-
added: v15.0.0
213+
added:
214+
- v15.0.0
215+
- v14.17.0
214216
changes:
215217
- version: v15.0.0
216218
pr-url: https://github.com/nodejs/node/pull/33527

doc/api/crypto.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4707,7 +4707,9 @@ console.log(`The dice rolled: ${n}`);
47074707

47084708
### `crypto.randomUUID([options])`
47094709
<!-- YAML
4710-
added: v15.6.0
4710+
added:
4711+
- v15.6.0
4712+
- v14.17.0
47114713
-->
47124714

47134715
* `options` {Object}

doc/api/deprecations.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,9 @@ future release.
21762176
### DEP0116: Legacy URL API
21772177
<!-- YAML
21782178
changes:
2179-
- version: v15.13.0
2179+
- version:
2180+
- v15.13.0
2181+
- v14.17.0
21802182
pr-url: https://github.com/nodejs/node/pull/37784
21812183
description: Deprecation revoked. Status changed to "Legacy".
21822184
- version: v11.0.0

doc/api/dns.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ callbacks will be called with an error with code `ECANCELLED`.
119119

120120
### `resolver.setLocalAddress([ipv4][, ipv6])`
121121
<!-- YAML
122-
added: v15.1.0
122+
added:
123+
- v15.1.0
124+
- v14.17.0
123125
-->
124126

125127
* `ipv4` {string} A string representation of an IPv4 address.
@@ -439,7 +441,9 @@ will contain an array of canonical name records available for the `hostname`
439441

440442
## `dns.resolveCaa(hostname, callback)`
441443
<!-- YAML
442-
added: v15.0.0
444+
added:
445+
- v15.0.0
446+
- v14.17.0
443447
-->
444448

445449
* `hostname` {string}
@@ -732,7 +736,9 @@ The following methods from the `dnsPromises` API are available:
732736

733737
### `resolver.cancel()`
734738
<!-- YAML
735-
added: v15.3.0
739+
added:
740+
- v15.3.0
741+
- v14.17.0
736742
-->
737743

738744
Cancel all outstanding DNS queries made by this resolver. The corresponding
@@ -960,7 +966,9 @@ Here is an example of the result object:
960966

961967
### `dnsPromises.resolveCaa(hostname)`
962968
<!-- YAML
963-
added: v15.0.0
969+
added:
970+
- v15.0.0
971+
- v14.17.0
964972
-->
965973

966974
* `hostname` {string}

doc/api/esm.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ added: v8.5.0
77
changes:
88
- version:
99
- v15.3.0
10+
- v14.17.0
1011
- v12.22.0
1112
pr-url: https://github.com/nodejs/node/pull/35781
1213
description: Stabilize modules implementation.

doc/api/events.md

+1
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ regular `'error'` listener is installed.
814814
<!-- YAML
815815
added:
816816
- v15.2.0
817+
- v14.17.0
817818
-->
818819
* `emitterOrTarget` {EventEmitter|EventTarget}
819820
* `eventName` {string|symbol}

doc/api/fs.md

+28-5
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,9 @@ See the POSIX chown(2) documentation for more detail.
17211721
<!-- YAML
17221722
added: v0.0.2
17231723
changes:
1724-
- version: v15.9.0
1724+
- version:
1725+
- v15.9.0
1726+
- v14.17.0
17251727
pr-url: https://github.com/nodejs/node/pull/37174
17261728
description: A default callback is now used if one is not provided.
17271729
- version: v10.0.0
@@ -2836,7 +2838,9 @@ changes:
28362838
pr-url: https://github.com/nodejs/node/pull/37460
28372839
description: The error returned may be an `AggregateError` if more than one
28382840
error is returned.
2839-
- version: v15.2.0
2841+
- version:
2842+
- v15.2.0
2843+
- v14.17.0
28402844
pr-url: https://github.com/nodejs/node/pull/35911
28412845
description: The options argument may include an AbortSignal to abort an
28422846
ongoing readFile request.
@@ -3554,7 +3558,9 @@ The `atime` and `mtime` arguments follow these rules:
35543558
<!-- YAML
35553559
added: v0.5.10
35563560
changes:
3557-
- version: v15.9.0
3561+
- version:
3562+
- v15.9.0
3563+
- v14.17.0
35583564
pr-url: https://github.com/nodejs/node/pull/37190
35593565
description: Added support for closing the watcher with an AbortSignal.
35603566
- version: v7.6.0
@@ -3883,7 +3889,9 @@ changes:
38833889
pr-url: https://github.com/nodejs/node/pull/37460
38843890
description: The error returned may be an `AggregateError` if more than one
38853891
error is returned.
3886-
- version: v15.2.0
3892+
- version:
3893+
- v15.2.0
3894+
- v14.17.0
38873895
pr-url: https://github.com/nodejs/node/pull/35993
38883896
description: The options argument may include an AbortSignal to abort an
38893897
ongoing writeFile request.
@@ -5924,7 +5932,22 @@ Emitted when the {fs.WriteStream}'s underlying file descriptor has been closed.
59245932
59255933
#### Event: `'open'`
59265934
<!-- YAML
5927-
added: v0.1.93
5935+
added:
5936+
- v10.0.0
5937+
- v0.1.93
5938+
changes:
5939+
- version: v14.17.0
5940+
pr-url: https://github.com/nodejs/node/pull/35993
5941+
description: The options argument may include an AbortSignal to abort an
5942+
ongoing writeFile request.
5943+
- version: v14.12.0
5944+
pr-url: https://github.com/nodejs/node/pull/34993
5945+
description: The `data` parameter will stringify an object with an
5946+
explicit `toString` function.
5947+
- version: v14.0.0
5948+
pr-url: https://github.com/nodejs/node/pull/31030
5949+
description: The `data` parameter won't coerce unsupported input to
5950+
strings anymore.
59285951
-->
59295952
59305953
* `fd` {integer} Integer file descriptor used by the {fs.WriteStream}.

doc/api/globals.md

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

2020
## Class: `AbortController`
2121
<!-- YAML
22-
added: v15.0.0
22+
added:
23+
- v15.0.0
24+
- v14.17.0
2325
changes:
2426
- version: v15.4.0
2527
pr-url: https://github.com/nodejs/node/pull/35949
@@ -44,22 +46,28 @@ console.log(ac.signal.aborted); // Prints True
4446

4547
### `abortController.abort()`
4648
<!-- YAML
47-
added: v15.0.0
49+
added:
50+
- v15.0.0
51+
- v14.17.0
4852
-->
4953

5054
Triggers the abort signal, causing the `abortController.signal` to emit
5155
the `'abort'` event.
5256

5357
### `abortController.signal`
5458
<!-- YAML
55-
added: v15.0.0
59+
added:
60+
- v15.0.0
61+
- v14.17.0
5662
-->
5763

5864
* Type: {AbortSignal}
5965

6066
### Class: `AbortSignal`
6167
<!-- YAML
62-
added: v15.0.0
68+
added:
69+
- v15.0.0
70+
- v14.17.0
6371
-->
6472

6573
* Extends: {EventTarget}
@@ -69,7 +77,9 @@ The `AbortSignal` is used to notify observers when the
6977

7078
#### Static method: `AbortSignal.abort()`
7179
<!-- YAML
72-
added: v15.12.0
80+
added:
81+
- v15.12.0
82+
- v14.17.0
7383
-->
7484

7585
* Returns: {AbortSignal}
@@ -78,7 +88,9 @@ Returns a new already aborted `AbortSignal`.
7888

7989
#### Event: `'abort'`
8090
<!-- YAML
81-
added: v15.0.0
91+
added:
92+
- v15.0.0
93+
- v14.17.0
8294
-->
8395

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

113125
#### `abortSignal.aborted`
114126
<!-- YAML
115-
added: v15.0.0
127+
added:
128+
- v15.0.0
129+
- v14.17.0
116130
-->
117131

118132
* Type: {boolean} True after the `AbortController` has been aborted.
119133

120134
#### `abortSignal.onabort`
121135
<!-- YAML
122-
added: v15.0.0
136+
added:
137+
- v15.0.0
138+
- v14.17.0
123139
-->
124140

125141
* Type: {Function}

doc/api/http.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ http.get({
113113
<!-- YAML
114114
added: v0.3.4
115115
changes:
116-
- version: v15.6.0
116+
- version:
117+
- v15.6.0
118+
- v14.17.0
117119
pr-url: https://github.com/nodejs/node/pull/36685
118120
description: Change the default scheduling from 'fifo' to 'lifo'.
119121
- version:
@@ -779,7 +781,9 @@ const cookie = request.getHeader('Cookie');
779781

780782
### `request.getRawHeaderNames()`
781783
<!-- YAML
782-
added: v15.13.0
784+
added:
785+
- v15.13.0
786+
- v14.17.0
783787
-->
784788

785789
* Returns: {string[]}
@@ -2797,7 +2801,9 @@ This can be overridden for servers and client requests by passing the
27972801
<!-- YAML
27982802
added: v0.3.6
27992803
changes:
2800-
- version: v15.3.0
2804+
- version:
2805+
- v15.3.0
2806+
- v14.17.0
28012807
pr-url: https://github.com/nodejs/node/pull/36048
28022808
description: It is possible to abort a request with an AbortSignal.
28032809
- version:

doc/api/http2.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<!-- YAML
33
added: v8.4.0
44
changes:
5-
- version: v15.3.0
5+
- version:
6+
- v15.3.0
7+
- v14.17.0
68
pr-url: https://github.com/nodejs/node/pull/36070
79
description: It is possible to abort a request with an AbortSignal.
810
- version: v15.0.0
@@ -1928,7 +1930,9 @@ value only affects new connections to the server, not any existing connections.
19281930

19291931
#### `server.updateSettings([settings])`
19301932
<!-- YAML
1931-
added: v15.1.0
1933+
added:
1934+
- v15.1.0
1935+
- v14.17.0
19321936
-->
19331937

19341938
* `settings` {HTTP/2 Settings Object}
@@ -2130,7 +2134,9 @@ value only affects new connections to the server, not any existing connections.
21302134

21312135
#### `server.updateSettings([settings])`
21322136
<!-- YAML
2133-
added: v15.1.0
2137+
added:
2138+
- v15.1.0
2139+
- v14.17.0
21342140
-->
21352141

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

doc/api/modules.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,9 @@ filename.
913913

914914
### `module.isPreloading`
915915
<!-- YAML
916-
added: v15.4.0
916+
added:
917+
- v15.4.0
918+
- v14.17.0
917919
-->
918920

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

doc/api/process.md

+1
Original file line numberDiff line numberDiff line change
@@ -2030,6 +2030,7 @@ added: v11.12.0
20302030
changes:
20312031
- version:
20322032
- v15.0.0
2033+
- v14.17.0
20332034
pr-url: https://github.com/nodejs/node/pull/35654
20342035
description: This API is no longer experimental.
20352036
-->

0 commit comments

Comments
 (0)