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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 9 additions & 3 deletions
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

Lines changed: 9 additions & 3 deletions
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

Lines changed: 12 additions & 4 deletions
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

Lines changed: 6 additions & 2 deletions
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.

0 commit comments

Comments
 (0)