diff options
author | Danielle Adams <adamzdanielle@gmail.com> | 2022-02-01 00:34:51 -0500 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2022-02-08 14:28:28 -0500 |
commit | 2455b26fdbc9b962b6d3a332f2ce903e0399d62c (patch) | |
tree | e01dc4d56619d72f03f0f5b386aaa7c64da0520d /doc/api/errors.md | |
parent | 08be585712774904bccbf4a43e481895a641464f (diff) | |
download | node-new-2455b26fdbc9b962b6d3a332f2ce903e0399d62c.tar.gz |
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 https://github.com/nodejs/node/pull/40250
Other notable changes:
* async_hooks:
* (SEMVER-MINOR) expose async_wrap providers (Rafael Gonzaga) https://github.com/nodejs/node/pull/40760
* child_process:
* (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) https://github.com/nodejs/node/pull/41225
* doc:
* add @Mesteery to collaborators (Mestery) https://github.com/nodejs/node/pull/41543
* add @bnb as a collaborator (Tierney Cyren) https://github.com/nodejs/node/pull/41100
* esm:
* (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) https://github.com/nodejs/node/pull/41267
* (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) https://github.com/nodejs/node/pull/41246
* events:
* (SEMVER-MINOR) propagate weak option for kNewListener (James M Snell) https://github.com/nodejs/node/pull/40899
* fs:
* (SEMVER-MINOR) accept URL as argument for `fs.rm` and `fs.rmSync` (Antoine du Hamel) https://github.com/nodejs/node/pull/41132
* lib:
* (SEMVER-MINOR) make AbortSignal cloneable/transferable (James M Snell) https://github.com/nodejs/node/pull/41050
* (SEMVER-MINOR) add AbortSignal.timeout (James M Snell) https://github.com/nodejs/node/pull/40899
* (SEMVER-MINOR) add reason to AbortSignal (James M Snell) https://github.com/nodejs/node/pull/40807
* (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) https://github.com/nodejs/node/pull/40433
* (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) https://github.com/nodejs/node/pull/40433
* loader:
* (SEMVER-MINOR) return package format from defaultResolve if known (Gabriel Bota) https://github.com/nodejs/node/pull/40980
* perf_hooks:
* (SEMVER-MINOR) multiple fixes for Histogram (James M Snell) https://github.com/nodejs/node/pull/41153
* process:
* (SEMVER-MINOR) add `getActiveResourcesInfo()` (Darshan Sen) https://github.com/nodejs/node/pull/40813
* src:
* (SEMVER-MINOR) add x509.fingerprint512 to crypto module (3nprob) https://github.com/nodejs/node/pull/39809
* (SEMVER-MINOR) add flags for controlling process behavior (Cheng Zhao) https://github.com/nodejs/node/pull/40339
* stream:
* (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/41354
* (SEMVER-MINOR) add isReadable helper (Robert Nagy) https://github.com/nodejs/node/pull/41199
* (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/40815
* deprecate thenable support (Antoine du Hamel) https://github.com/nodejs/node/pull/40860
* util:
* (SEMVER-MINOR) pass through the inspect function to custom inspect functions (Ruben Bridgewater) https://github.com/nodejs/node/pull/41019
* (SEMVER-MINOR) add numericSeparator to util.inspect (Ruben Bridgewater) https://github.com/nodejs/node/pull/41003
* (SEMVER-MINOR) always visualize cause property in errors during inspection (Ruben Bridgewater) https://github.com/nodejs/node/pull/41002
* timers:
* (SEMVER-MINOR) add experimental scheduler api (James M Snell) https://github.com/nodejs/node/pull/40909
* v8:
* (SEMVER-MINOR) multi-tenant promise hook api (Stephen Belanger) https://github.com/nodejs/node/pull/39283
PR-URL: https://github.com/nodejs/node/pull/41804
Diffstat (limited to 'doc/api/errors.md')
-rw-r--r-- | doc/api/errors.md | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/api/errors.md b/doc/api/errors.md index da08930f4a..8ec3923e6a 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1699,7 +1699,9 @@ An attempt was made to construct an object using a non-public constructor. ### `ERR_IMPORT_ASSERTION_TYPE_FAILED` <!-- YAML -added: v17.1.0 +added: + - v17.1.0 + - v16.14.0 --> 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. ### `ERR_IMPORT_ASSERTION_TYPE_MISSING` <!-- YAML -added: v17.1.0 +added: + - v17.1.0 + - v16.14.0 --> 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. ### `ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED` <!-- YAML -added: v17.1.0 +added: + - v17.1.0 + - v16.14.0 --> An import assertion is not supported by this version of Node.js. |