Skip to content

Commit e8ce139

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 1de552c commit e8ce139

20 files changed

+505
-48
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ release.
3333
</tr>
3434
<tr>
3535
<td valign="top">
36-
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.13.2">16.13.2</a></b><br/>
36+
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.14.0">16.14.0</a></b><br/>
37+
<a href="doc/changelogs/CHANGELOG_V16.md#16.13.2">16.13.2</a><br/>
3738
<a href="doc/changelogs/CHANGELOG_V16.md#16.13.1">16.13.1</a><br/>
3839
<a href="doc/changelogs/CHANGELOG_V16.md#16.13.0">16.13.0</a><br/>
3940
<a href="doc/changelogs/CHANGELOG_V16.md#16.12.0">16.12.0</a><br/>

doc/api/async_hooks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ the section on [promise execution tracking][].
761761
### `async_hooks.asyncWrapProviders`
762762
763763
<!-- YAML
764-
added: REPLACEME
764+
added: v16.14.0
765765
-->
766766
767767
* Returns: A map of provider types to the corresponding numeric id.

doc/api/child_process.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ controller.abort();
386386
added: v0.5.0
387387
changes:
388388
- version:
389-
- REPLACEME
389+
- v16.14.0
390390
pr-url: https://github.com/nodejs/node/pull/41225
391391
description: The `modulePath` parameter can be a WHATWG `URL` object using
392392
`file:` protocol.

doc/api/crypto.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2573,7 +2573,7 @@ The SHA-256 fingerprint of this certificate.
25732573
### `x509.fingerprint512`
25742574

25752575
<!-- YAML
2576-
added: REPLACEME
2576+
added: v16.14.0
25772577
-->
25782578

25792579
* Type: {string}

doc/api/deprecations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,7 @@ it was an aborted or graceful destroy.
30083008

30093009
<!-- YAML
30103010
changes:
3011-
- version: REPLACEME
3011+
- version: v16.14.0
30123012
pr-url: https://github.com/nodejs/node/pull/40860
30133013
description: Documentation-only deprecation.
30143014
-->

doc/api/diagnostics_channel.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ added:
265265
- v15.1.0
266266
- v14.17.0
267267
changes:
268-
- version: REPLACEME
268+
- version: v16.14.0
269269
pr-url: https://github.com/nodejs/node/pull/40433
270270
description: Added return value. Added to channels without subscribers.
271271
-->

doc/api/errors.md

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

16891689
<!-- YAML
1690-
added: REPLACEME
1690+
added: v16.14.0
16911691
-->
16921692

16931693
An import assertion has failed, preventing the specified module to be imported.
@@ -1697,7 +1697,7 @@ An import assertion has failed, preventing the specified module to be imported.
16971697
### `ERR_IMPORT_ASSERTION_TYPE_MISSING`
16981698

16991699
<!-- YAML
1700-
added: REPLACEME
1700+
added: v16.14.0
17011701
-->
17021702

17031703
An import assertion is missing, preventing the specified module to be imported.
@@ -1707,7 +1707,7 @@ An import assertion is missing, preventing the specified module to be imported.
17071707
### `ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED`
17081708

17091709
<!-- YAML
1710-
added: REPLACEME
1710+
added: v16.14.0
17111711
-->
17121712

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

doc/api/esm.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- YAML
88
added: v8.5.0
99
changes:
10-
- version: REPLACEME
10+
- version: v16.14.0
1111
pr-url: https://github.com/nodejs/node/pull/40250
1212
description: Add support for import assertions.
1313
- version:
@@ -222,7 +222,7 @@ import fs from 'node:fs/promises';
222222
## Import assertions
223223

224224
<!-- YAML
225-
added: REPLACEME
225+
added: v16.14.0
226226
-->
227227

228228
> Stability: 1 - Experimental
@@ -650,7 +650,7 @@ won't apply to `require` calls; those still follow [CommonJS][] rules.
650650
651651
<!-- YAML
652652
changes:
653-
- version: REPLACEME
653+
- version: v16.14.0
654654
pr-url: https://github.com/nodejs/node/pull/40250
655655
description: Add support for import assertions.
656656
-->

doc/api/events.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ added:
740740
- v13.4.0
741741
- v12.16.0
742742
changes:
743-
- version: REPLACEME
743+
- version: v16.14.0
744744
pr-url: https://github.com/nodejs/node/pull/41267
745745
description: No longer experimental.
746746
-->
@@ -1028,7 +1028,7 @@ added:
10281028
- v13.4.0
10291029
- v12.16.0
10301030
changes:
1031-
- version: REPLACEME
1031+
- version: v16.14.0
10321032
pr-url: https://github.com/nodejs/node/pull/41267
10331033
description: No longer experimental.
10341034
-->
@@ -1044,7 +1044,7 @@ added:
10441044
- v13.4.0
10451045
- v12.16.0
10461046
changes:
1047-
- version: REPLACEME
1047+
- version: v16.14.0
10481048
pr-url: https://github.com/nodejs/node/pull/41267
10491049
description: No longer experimental.
10501050
-->
@@ -1172,7 +1172,7 @@ setMaxListeners(5, target, emitter);
11721172
## Class: `events.EventEmitterAsyncResource extends EventEmitter`
11731173

11741174
<!-- YAML
1175-
added: REPLACEME
1175+
added: v16.14.0
11761176
-->
11771177

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

doc/api/globals.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ added:
5151
- v15.0.0
5252
- v14.17.0
5353
changes:
54-
- version: REPLACEME
54+
- version: v16.14.0
5555
pr-url: https://github.com/nodejs/node/pull/40807
5656
description: Added the new optional reason argument.
5757
-->
@@ -88,7 +88,7 @@ added:
8888
- v15.12.0
8989
- v14.17.0
9090
changes:
91-
- version: REPLACEME
91+
- version: v16.14.0
9292
pr-url: https://github.com/nodejs/node/pull/40807
9393
description: Added the new optional reason argument.
9494
-->
@@ -101,7 +101,7 @@ Returns a new already aborted `AbortSignal`.
101101
#### Static method: `AbortSignal.timeout(delay)`
102102

103103
<!-- YAML
104-
added: REPLACEME
104+
added: v16.14.0
105105
-->
106106

107107
* `delay` {number} The number of milliseconds to wait before triggering
@@ -166,7 +166,7 @@ when the `abortController.abort()` function has been called.
166166
#### `abortSignal.reason`
167167

168168
<!-- YAML
169-
added: REPLACEME
169+
added: v16.14.0
170170
-->
171171

172172
* Type: {any}

doc/api/n-api.md

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

11841184
<!-- YAML
1185-
added: REPLACEME
1185+
added: v16.14.0
11861186
-->
11871187

11881188
````c
@@ -1298,7 +1298,7 @@ This API returns a JavaScript `RangeError` with the text provided.
12981298
#### `node_api_create_syntax_error`
12991299
13001300
<!-- YAML
1301-
added: REPLACEME
1301+
added: v16.14.0
13021302
-->
13031303
13041304
```c

doc/api/perf_hooks.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ added: v11.10.0
872872
### `histogram.count`
873873

874874
<!-- YAML
875-
added: REPLACEME
875+
added: v16.14.0
876876
-->
877877

878878
* {number}
@@ -882,7 +882,7 @@ The number of samples recorded by the histogram.
882882
### `histogram.countBigInt`
883883

884884
<!-- YAML
885-
added: REPLACEME
885+
added: v16.14.0
886886
-->
887887

888888
* {bigint}
@@ -903,7 +903,7 @@ loop delay threshold.
903903
### `histogram.exceedsBigInt`
904904

905905
<!-- YAML
906-
added: REPLACEME
906+
added: v16.14.0
907907
-->
908908

909909
* {bigint}
@@ -924,7 +924,7 @@ The maximum recorded event loop delay.
924924
### `histogram.maxBigInt`
925925

926926
<!-- YAML
927-
added: REPLACEME
927+
added: v16.14.0
928928
-->
929929

930930
* {bigint}
@@ -954,7 +954,7 @@ The minimum recorded event loop delay.
954954
### `histogram.minBigInt`
955955

956956
<!-- YAML
957-
added: REPLACEME
957+
added: v16.14.0
958958
-->
959959

960960
* {bigint}
@@ -975,7 +975,7 @@ Returns the value at the given percentile.
975975
### `histogram.percentileBigInt(percentile)`
976976

977977
<!-- YAML
978-
added: REPLACEME
978+
added: v16.14.0
979979
-->
980980

981981
* `percentile` {number} A percentile value in the range (0, 100).
@@ -996,7 +996,7 @@ Returns a `Map` object detailing the accumulated percentile distribution.
996996
### `histogram.percentilesBigInt`
997997

998998
<!-- YAML
999-
added: REPLACEME
999+
added: v16.14.0
10001000
-->
10011001

10021002
* {Map}
@@ -1062,7 +1062,7 @@ added: v15.9.0
10621062
### `histogram.add(other)`
10631063

10641064
<!-- YAML
1065-
added: REPLACEME
1065+
added: v16.14.0
10661066
-->
10671067

10681068
* `other` {RecordableHistogram}

doc/api/process.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,7 @@ previous setting of `process.exitCode`.
18221822
## `process.getActiveResourcesInfo()`
18231823
18241824
<!-- YAML
1825-
added: REPLACEME
1825+
added: v16.14.0
18261826
-->
18271827
18281828
> Stability: 1 - Experimental

doc/api/stream.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ showBoth();
16851685
### `readable.map(fn[, options])`
16861686

16871687
<!-- YAML
1688-
added: REPLACEME
1688+
added: v16.14.0
16891689
-->
16901690

16911691
> Stability: 1 - Experimental
@@ -1729,7 +1729,7 @@ for await (const result of dnsResults) {
17291729
### `readable.filter(fn[, options])`
17301730

17311731
<!-- YAML
1732-
added: REPLACEME
1732+
added: v16.14.0
17331733
-->
17341734

17351735
> Stability: 1 - Experimental
@@ -2250,7 +2250,7 @@ Returns whether the stream has been read from or cancelled.
22502250
### `stream.isErrored(stream)`
22512251

22522252
<!-- YAML
2253-
added: REPLACEME
2253+
added: v16.14.0
22542254
-->
22552255

22562256
> Stability: 1 - Experimental
@@ -2263,7 +2263,7 @@ Returns whether the stream has encountered an error.
22632263
### `stream.isReadable(stream)`
22642264

22652265
<!-- YAML
2266-
added: REPLACEME
2266+
added: v16.14.0
22672267
-->
22682268

22692269
> Stability: 1 - Experimental

doc/api/timers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ const interval = 100;
475475
### `timersPromises.scheduler.wait(delay[, options])`
476476

477477
<!-- YAML
478-
added: REPLACEME
478+
added: v16.14.0
479479
-->
480480

481481
> Stability: 1 - Experimental
@@ -503,7 +503,7 @@ await scheduler.wait(1000); // Wait one second before continuing
503503
### `timersPromises.scheduler.yield()`
504504

505505
<!-- YAML
506-
added: REPLACEME
506+
added: v16.14.0
507507
-->
508508

509509
> Stability: 1 - Experimental

doc/api/tls.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ certificate.
11331133

11341134
<!-- YAML
11351135
changes:
1136-
- version: REPLACEME
1136+
- version: v16.14.0
11371137
pr-url: https://github.com/nodejs/node/pull/39809
11381138
description: Add fingerprint512.
11391139
- version: v11.4.0

doc/api/util.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ stream.write('With ES6');
483483
<!-- YAML
484484
added: v0.3.0
485485
changes:
486-
- version: REPLACEME
486+
- version: v16.14.0
487487
pr-url: https://github.com/nodejs/node/pull/41003
488488
description: The `numericSeparator` option is supported now.
489489
- version:
@@ -875,7 +875,7 @@ ignored, if not supported.
875875
<!-- YAML
876876
added: v0.1.97
877877
changes:
878-
- version: REPLACEME
878+
- version: v16.14.0
879879
pr-url: https://github.com/nodejs/node/pull/41019
880880
description: The inspect argument is added for more interoperability.
881881
-->

0 commit comments

Comments
 (0)