Skip to content

Commit 2455b26

Browse files
committed
2022-02-08, Version 16.14.0 'Gallium' (LTS)
Notable changes: Importing JSON modules now requires experimental import assertions syntax This release adds experimental support for the import assertions stage 3 proposal. To keep Node.js ESM implementation as compatible as possible with the HTML spec, import assertions are now required to import JSON modules (still behind the `--experimental-json-modules` CLI flag): ```mjs import info from './package.json' assert { type: 'json' }; ``` Or use dynamic import: ```mjs const info = await import('./package.json', { assert: { type: 'json' } }); ``` Contributed by Antoine du Hamel and Geoffrey Booth #40250 Other notable changes: * async_hooks: * (SEMVER-MINOR) expose async_wrap providers (Rafael Gonzaga) #40760 * child_process: * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) #41225 * doc: * add @Mesteery to collaborators (Mestery) #41543 * add @bnb as a collaborator (Tierney Cyren) #41100 * esm: * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) #41267 * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) #41246 * events: * (SEMVER-MINOR) propagate weak option for kNewListener (James M Snell) #40899 * fs: * (SEMVER-MINOR) accept URL as argument for `fs.rm` and `fs.rmSync` (Antoine du Hamel) #41132 * lib: * (SEMVER-MINOR) make AbortSignal cloneable/transferable (James M Snell) #41050 * (SEMVER-MINOR) add AbortSignal.timeout (James M Snell) #40899 * (SEMVER-MINOR) add reason to AbortSignal (James M Snell) #40807 * (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) #40433 * (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) #40433 * loader: * (SEMVER-MINOR) return package format from defaultResolve if known (Gabriel Bota) #40980 * perf_hooks: * (SEMVER-MINOR) multiple fixes for Histogram (James M Snell) #41153 * process: * (SEMVER-MINOR) add `getActiveResourcesInfo()` (Darshan Sen) #40813 * src: * (SEMVER-MINOR) add x509.fingerprint512 to crypto module (3nprob) #39809 * (SEMVER-MINOR) add flags for controlling process behavior (Cheng Zhao) #40339 * stream: * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum) #41354 * (SEMVER-MINOR) add isReadable helper (Robert Nagy) #41199 * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum) #40815 * deprecate thenable support (Antoine du Hamel) #40860 * util: * (SEMVER-MINOR) pass through the inspect function to custom inspect functions (Ruben Bridgewater) #41019 * (SEMVER-MINOR) add numericSeparator to util.inspect (Ruben Bridgewater) #41003 * (SEMVER-MINOR) always visualize cause property in errors during inspection (Ruben Bridgewater) #41002 * timers: * (SEMVER-MINOR) add experimental scheduler api (James M Snell) #40909 * v8: * (SEMVER-MINOR) multi-tenant promise hook api (Stephen Belanger) #39283 PR-URL: #41804
1 parent 08be585 commit 2455b26

20 files changed

+593
-45
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ release.
4242
<a href="doc/changelogs/CHANGELOG_V17.md#17.0.0">17.0.0</a><br/>
4343
</td>
4444
<td valign="top">
45-
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.13.2">16.13.2</a></b><br/>
45+
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.14.0">16.14.0</a></b><br/>
46+
<a href="doc/changelogs/CHANGELOG_V16.md#16.13.2">16.13.2</a><br/>
4647
<a href="doc/changelogs/CHANGELOG_V16.md#16.13.1">16.13.1</a><br/>
4748
<a href="doc/changelogs/CHANGELOG_V16.md#16.13.0">16.13.0</a><br/>
4849
<a href="doc/changelogs/CHANGELOG_V16.md#16.12.0">16.12.0</a><br/>

doc/api/async_hooks.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,9 @@ the section on [promise execution tracking][].
769769
### `async_hooks.asyncWrapProviders`
770770
771771
<!-- YAML
772-
added: v17.2.0
772+
added:
773+
- v17.2.0
774+
- v16.14.0
773775
-->
774776
775777
* Returns: A map of provider types to the corresponding numeric id.

doc/api/child_process.md

+1
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ added: v0.5.0
393393
changes:
394394
- version:
395395
- v17.4.0
396+
- v16.14.0
396397
pr-url: https://github.com/nodejs/node/pull/41225
397398
description: The `modulePath` parameter can be a WHATWG `URL` object using
398399
`file:` protocol.

doc/api/crypto.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2615,7 +2615,9 @@ The SHA-256 fingerprint of this certificate.
26152615
### `x509.fingerprint512`
26162616

26172617
<!-- YAML
2618-
added: v17.2.0
2618+
added:
2619+
- v17.2.0
2620+
- v16.14.0
26192621
-->
26202622

26212623
* Type: {string}

doc/api/deprecations.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3016,7 +3016,9 @@ it was an aborted or graceful destroy.
30163016

30173017
<!-- YAML
30183018
changes:
3019-
- version: v17.2.0
3019+
- version:
3020+
- v17.2.0
3021+
- v16.14.0
30203022
pr-url: https://github.com/nodejs/node/pull/40860
30213023
description: Documentation-only deprecation.
30223024
-->

doc/api/diagnostics_channel.md

+1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ added:
267267
changes:
268268
- version:
269269
- v17.1.0
270+
- v16.14.0
270271
- v14.19.0
271272
pr-url: https://github.com/nodejs/node/pull/40433
272273
description: Added return value. Added to channels without subscribers.

doc/api/errors.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,9 @@ An attempt was made to construct an object using a non-public constructor.
16991699
### `ERR_IMPORT_ASSERTION_TYPE_FAILED`
17001700

17011701
<!-- YAML
1702-
added: v17.1.0
1702+
added:
1703+
- v17.1.0
1704+
- v16.14.0
17031705
-->
17041706

17051707
An import assertion has failed, preventing the specified module to be imported.
@@ -1709,7 +1711,9 @@ An import assertion has failed, preventing the specified module to be imported.
17091711
### `ERR_IMPORT_ASSERTION_TYPE_MISSING`
17101712

17111713
<!-- YAML
1712-
added: v17.1.0
1714+
added:
1715+
- v17.1.0
1716+
- v16.14.0
17131717
-->
17141718

17151719
An import assertion is missing, preventing the specified module to be imported.
@@ -1719,7 +1723,9 @@ An import assertion is missing, preventing the specified module to be imported.
17191723
### `ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED`
17201724

17211725
<!-- YAML
1722-
added: v17.1.0
1726+
added:
1727+
- v17.1.0
1728+
- v16.14.0
17231729
-->
17241730

17251731
An import assertion is not supported by this version of Node.js.

doc/api/esm.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<!-- YAML
88
added: v8.5.0
99
changes:
10-
- version: v17.1.0
10+
- version:
11+
- v17.1.0
12+
- v16.14.0
1113
pr-url: https://github.com/nodejs/node/pull/40250
1214
description: Add support for import assertions.
1315
- version:
@@ -226,7 +228,9 @@ import fs from 'node:fs/promises';
226228
## Import assertions
227229

228230
<!-- YAML
229-
added: v17.1.0
231+
added:
232+
- v17.1.0
233+
- v16.14.0
230234
-->
231235

232236
> Stability: 1 - Experimental
@@ -624,7 +628,9 @@ won't apply to `require` calls; those still follow [CommonJS][] rules.
624628
625629
<!-- YAML
626630
changes:
627-
- version: v17.1.0
631+
- version:
632+
- v17.1.0
633+
- v16.14.0
628634
pr-url: https://github.com/nodejs/node/pull/40250
629635
description: Add support for import assertions.
630636
-->

doc/api/events.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,9 @@ added:
740740
- v13.4.0
741741
- v12.16.0
742742
changes:
743-
- version: v17.4.0
743+
- version:
744+
- v17.4.0
745+
- v16.14.0
744746
pr-url: https://github.com/nodejs/node/pull/41267
745747
description: No longer experimental.
746748
-->
@@ -1029,7 +1031,9 @@ added:
10291031
- v13.4.0
10301032
- v12.16.0
10311033
changes:
1032-
- version: v17.4.0
1034+
- version:
1035+
- v17.4.0
1036+
- v16.14.0
10331037
pr-url: https://github.com/nodejs/node/pull/41267
10341038
description: No longer experimental.
10351039
-->
@@ -1045,7 +1049,9 @@ added:
10451049
- v13.4.0
10461050
- v12.16.0
10471051
changes:
1048-
- version: v17.4.0
1052+
- version:
1053+
- v17.4.0
1054+
- v16.14.0
10491055
pr-url: https://github.com/nodejs/node/pull/41267
10501056
description: No longer experimental.
10511057
-->
@@ -1173,7 +1179,9 @@ setMaxListeners(5, target, emitter);
11731179
## Class: `events.EventEmitterAsyncResource extends EventEmitter`
11741180

11751181
<!-- YAML
1176-
added: v17.4.0
1182+
added:
1183+
- v17.4.0
1184+
- v16.14.0
11771185
-->
11781186

11791187
Integrates `EventEmitter` with {AsyncResource} for `EventEmitter`s that

doc/api/fs.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -3749,7 +3749,9 @@ with options `{ recursive: true, force: true }`.
37493749
<!-- YAML
37503750
added: v14.14.0
37513751
changes:
3752-
- version: v17.3.0
3752+
- version:
3753+
- v17.3.0
3754+
- v16.14.0
37533755
pr-url: https://github.com/nodejs/node/pull/41132
37543756
description: The `path` parameter can be a WHATWG `URL` object using `file:`
37553757
protocol.
@@ -5544,7 +5546,9 @@ with options `{ recursive: true, force: true }`.
55445546
<!-- YAML
55455547
added: v14.14.0
55465548
changes:
5547-
- version: v17.3.0
5549+
- version:
5550+
- v17.3.0
5551+
- v16.14.0
55485552
pr-url: https://github.com/nodejs/node/pull/41132
55495553
description: The `path` parameter can be a WHATWG `URL` object using `file:`
55505554
protocol.

doc/api/globals.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ added:
5353
- v15.0.0
5454
- v14.17.0
5555
changes:
56-
- version: v17.2.0
56+
- version:
57+
- v17.2.0
58+
- v16.14.0
5759
pr-url: https://github.com/nodejs/node/pull/40807
5860
description: Added the new optional reason argument.
5961
-->
@@ -94,7 +96,9 @@ added:
9496
- v15.12.0
9597
- v14.17.0
9698
changes:
97-
- version: v17.2.0
99+
- version:
100+
- v17.2.0
101+
- v16.14.0
98102
pr-url: https://github.com/nodejs/node/pull/40807
99103
description: Added the new optional reason argument.
100104
-->
@@ -107,7 +111,9 @@ Returns a new already aborted `AbortSignal`.
107111
#### Static method: `AbortSignal.timeout(delay)`
108112

109113
<!-- YAML
110-
added: v17.3.0
114+
added:
115+
- v17.3.0
116+
- v16.14.0
111117
-->
112118

113119
* `delay` {number} The number of milliseconds to wait before triggering
@@ -178,7 +184,9 @@ when the `abortController.abort()` function has been called.
178184
#### `abortSignal.reason`
179185

180186
<!-- YAML
181-
added: v17.2.0
187+
added:
188+
- v17.2.0
189+
- v16.14.0
182190
-->
183191

184192
* Type: {any}

doc/api/n-api.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,9 @@ This API throws a JavaScript `RangeError` with the text provided.
11821182
#### `node_api_throw_syntax_error`
11831183

11841184
<!-- YAML
1185-
added: v17.2.0
1185+
added:
1186+
- v17.2.0
1187+
- v16.14.0
11861188
-->
11871189

11881190
````c
@@ -1298,7 +1300,9 @@ This API returns a JavaScript `RangeError` with the text provided.
12981300
#### `node_api_create_syntax_error`
12991301
13001302
<!-- YAML
1301-
added: v17.2.0
1303+
added:
1304+
- v17.2.0
1305+
- v16.14.0
13021306
-->
13031307
13041308
```c

doc/api/perf_hooks.md

+24-8
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,9 @@ added: v11.10.0
880880
### `histogram.count`
881881

882882
<!-- YAML
883-
added: v17.4.0
883+
added:
884+
- v17.4.0
885+
- v16.14.0
884886
-->
885887

886888
* {number}
@@ -890,7 +892,9 @@ The number of samples recorded by the histogram.
890892
### `histogram.countBigInt`
891893

892894
<!-- YAML
893-
added: v17.4.0
895+
added:
896+
- v17.4.0
897+
- v16.14.0
894898
-->
895899

896900
* {bigint}
@@ -911,7 +915,9 @@ loop delay threshold.
911915
### `histogram.exceedsBigInt`
912916

913917
<!-- YAML
914-
added: v17.4.0
918+
added:
919+
- v17.4.0
920+
- v16.14.0
915921
-->
916922

917923
* {bigint}
@@ -932,7 +938,9 @@ The maximum recorded event loop delay.
932938
### `histogram.maxBigInt`
933939

934940
<!-- YAML
935-
added: v17.4.0
941+
added:
942+
- v17.4.0
943+
- v16.14.0
936944
-->
937945

938946
* {bigint}
@@ -962,7 +970,9 @@ The minimum recorded event loop delay.
962970
### `histogram.minBigInt`
963971

964972
<!-- YAML
965-
added: v17.4.0
973+
added:
974+
- v17.4.0
975+
- v16.14.0
966976
-->
967977

968978
* {bigint}
@@ -983,7 +993,9 @@ Returns the value at the given percentile.
983993
### `histogram.percentileBigInt(percentile)`
984994

985995
<!-- YAML
986-
added: v17.4.0
996+
added:
997+
- v17.4.0
998+
- v16.14.0
987999
-->
9881000

9891001
* `percentile` {number} A percentile value in the range (0, 100).
@@ -1004,7 +1016,9 @@ Returns a `Map` object detailing the accumulated percentile distribution.
10041016
### `histogram.percentilesBigInt`
10051017

10061018
<!-- YAML
1007-
added: v17.4.0
1019+
added:
1020+
- v17.4.0
1021+
- v16.14.0
10081022
-->
10091023

10101024
* {Map}
@@ -1072,7 +1086,9 @@ added:
10721086
### `histogram.add(other)`
10731087

10741088
<!-- YAML
1075-
added: v17.4.0
1089+
added:
1090+
- v17.4.0
1091+
- v16.14.0
10761092
-->
10771093

10781094
* `other` {RecordableHistogram}

doc/api/process.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,9 @@ previous setting of `process.exitCode`.
18301830
## `process.getActiveResourcesInfo()`
18311831
18321832
<!-- YAML
1833-
added: v17.3.0
1833+
added:
1834+
- v17.3.0
1835+
- v16.14.0
18341836
-->
18351837
18361838
> Stability: 1 - Experimental

doc/api/stream.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,9 @@ showBoth();
17401740
### `readable.map(fn[, options])`
17411741

17421742
<!-- YAML
1743-
added: v17.4.0
1743+
added:
1744+
- v17.4.0
1745+
- v16.14.0
17441746
-->
17451747

17461748
> Stability: 1 - Experimental
@@ -1785,7 +1787,9 @@ for await (const result of dnsResults) {
17851787
### `readable.filter(fn[, options])`
17861788

17871789
<!-- YAML
1788-
added: v17.4.0
1790+
added:
1791+
- v17.4.0
1792+
- v16.14.0
17891793
-->
17901794

17911795
> Stability: 1 - Experimental
@@ -2754,7 +2758,9 @@ Returns whether the stream has been read from or cancelled.
27542758
### `stream.isErrored(stream)`
27552759

27562760
<!-- YAML
2757-
added: v17.3.0
2761+
added:
2762+
- v17.3.0
2763+
- v16.14.0
27582764
-->
27592765

27602766
> Stability: 1 - Experimental
@@ -2767,7 +2773,9 @@ Returns whether the stream has encountered an error.
27672773
### `stream.isReadable(stream)`
27682774

27692775
<!-- YAML
2770-
added: v17.4.0
2776+
added:
2777+
- v17.4.0
2778+
- v16.14.0
27712779
-->
27722780

27732781
> Stability: 1 - Experimental

0 commit comments

Comments
 (0)