Skip to content

Commit

Permalink
2022-08-16, Version 16.17.0 'Gallium' (LTS)
Browse files Browse the repository at this point in the history
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.
Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:
* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.
Contributed by Filip Skokan.
#42507
#43310

Updated Corepack to 0.12.1 - #43965
Updated ICU to 71.1 - #42655
Updated npm to 8.15.0 - #43917
Updated Undici to 5.8.0 - #43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) #42816
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) #43176
doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738
(SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) #42714
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) #41008
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) #43885
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) #43514
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) #41008
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) #41008
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) #42768
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) #43806
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) #43580
(SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) #43361
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) #41008
(SEMVER-MINOR) http2: compat support for array headers (OneNail) #42901
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) #41008
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) #40951
(SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) #42714
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) #43396
(SEMVER-MINOR) module,repl: support 'node:'-only core modules (Colin Ihrig) #42325
(SEMVER-MINOR) net: add drop event for net server (theanarkh) #43582
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
(SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) #36510
(SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) #42725
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) #43116
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) #40478
(SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) #42757
(SEMVER-MINOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) #43124
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) #41008
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) #41849
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) #40802
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) #41008
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) #43329
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) #42784
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) #42849

PR-URL: #44098
  • Loading branch information
targos committed Aug 15, 2022
1 parent ae157d9 commit 30187ba
Show file tree
Hide file tree
Showing 23 changed files with 904 additions and 103 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.16.0">16.16.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.17.0">16.17.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.16.0">16.16.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.15.1">16.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.15.0">16.15.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.14.2">16.14.2</a><br/>
Expand Down
2 changes: 1 addition & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ added:
- v15.7.0
- v14.18.0
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/41270
description: No longer experimental.
-->
Expand Down
12 changes: 6 additions & 6 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Enable experimental support for the [Fetch API][].
### `--experimental-global-customevent`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

Expose the [CustomEvent Web API][] on the global scope.
Expand Down Expand Up @@ -430,7 +430,7 @@ To allow polyfills to be added, `--require` runs before freezing intrinsics.
### `--force-node-api-uncaught-exceptions-policy`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

Enforces `uncaughtException` event on Node-API asynchronous callbacks.
Expand Down Expand Up @@ -762,7 +762,7 @@ against FIPS-enabled OpenSSL.
### `--openssl-shared-config`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

Enable OpenSSL default configuration section, `openssl_conf` to be read from
Expand All @@ -777,7 +777,7 @@ Node.js which is `nodejs_conf` and is default when this option is not used.
### `--openssl-legacy-provider`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

Enable OpenSSL 3.0 legacy provider when dynamically linking to OpenSSL 3.x.
Expand Down Expand Up @@ -1075,7 +1075,7 @@ The value given must be a power of two.
### `--test`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

Starts the Node.js command line test runner. This flag cannot be combined with
Expand All @@ -1085,7 +1085,7 @@ on [running tests from the command line][] for more details.
### `--test-only`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

Configures the test runner to only execute top level tests that have the `only`
Expand Down
8 changes: 4 additions & 4 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,7 @@ Checks the primality of the `candidate`.
added: v0.1.94
deprecated: v10.0.0
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/42427
description: The `authTagLength` option is now optional when using the
`chacha20-poly1305` cipher and defaults to 16 bytes.
Expand Down Expand Up @@ -3008,7 +3008,7 @@ Adversaries][] for details.
<!-- YAML
added: v0.1.94
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/42427
description: The `authTagLength` option is now optional when using the
`chacha20-poly1305` cipher and defaults to 16 bytes.
Expand Down Expand Up @@ -3081,7 +3081,7 @@ given IV will be.
added: v0.1.94
deprecated: v10.0.0
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/42427
description: The `authTagLength` option is now optional when using the
`chacha20-poly1305` cipher and defaults to 16 bytes.
Expand Down Expand Up @@ -3123,7 +3123,7 @@ to create the `Decipher` object.
<!-- YAML
added: v0.1.94
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/42427
description: The `authTagLength` option is now optional when using the
`chacha20-poly1305` cipher and defaults to 16 bytes.
Expand Down
4 changes: 2 additions & 2 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3106,7 +3106,7 @@ Convert them to primitive strings.

<!-- YAML
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/42714
description: Documentation-only deprecation.
-->
Expand All @@ -3124,7 +3124,7 @@ thing instead.

<!-- YAML
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/43738
description: Documentation-only deprecation.
-->
Expand Down
8 changes: 4 additions & 4 deletions doc/api/diagnostics_channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const channel = diagnostics_channel.channel('my-channel');

<!-- YAML
added:
- REPLACEME
- v16.17.0
-->

* `name` {string|symbol} The channel name
Expand Down Expand Up @@ -183,7 +183,7 @@ diagnostics_channel.subscribe('my-channel', (message, name) => {

<!-- YAML
added:
- REPLACEME
- v16.17.0
-->

* `name` {string|symbol} The channel name
Expand Down Expand Up @@ -308,7 +308,7 @@ channel.publish({
added:
- v15.1.0
- v14.17.0
deprecated: REPLACEME
deprecated: v16.17.0
-->

> Stability: 0 - Deprecated: Use [`diagnostics_channel.subscribe(name, onMessage)`][]
Expand Down Expand Up @@ -347,7 +347,7 @@ channel.subscribe((message, name) => {
added:
- v15.1.0
- v14.17.0
deprecated: REPLACEME
deprecated: v16.17.0
changes:
- version: v16.14.0
pr-url: https://github.com/nodejs/node/pull/40433
Expand Down
10 changes: 5 additions & 5 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,7 @@ for more information.
### `ERR_LOADER_CHAIN_INCOMPLETE`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

An ESM loader hook returned without calling `next()` and without explicitly
Expand Down Expand Up @@ -2399,7 +2399,7 @@ cannot be imported through the package resolution, unless using an absolute URL.
### `ERR_PARSE_ARGS_INVALID_OPTION_VALUE`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

When `strict` set to `true`, thrown by [`util.parseArgs()`][] if a {boolean}
Expand All @@ -2411,7 +2411,7 @@ value is provided for an option of type {boolean}.
### `ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

Thrown by [`util.parseArgs()`][], when a positional argument is provided and
Expand All @@ -2422,7 +2422,7 @@ Thrown by [`util.parseArgs()`][], when a positional argument is provided and
### `ERR_PARSE_ARGS_UNKNOWN_OPTION`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

When `strict` set to `true`, thrown by [`util.parseArgs()`][] if an argument
Expand Down Expand Up @@ -3409,7 +3409,7 @@ The module must be successfully linked before instantiation.

<!-- YAML
added: v10.0.0
removed: REPLACEME
removed: v16.17.0
-->

The linker function returned a module for which linking has failed.
Expand Down
10 changes: 5 additions & 5 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
added: v8.5.0
changes:
- version:
- REPLACEME
- v16.17.0
pr-url: https://github.com/nodejs/node/pull/42623
description: Add support for chaining loaders.
- version:
Expand Down Expand Up @@ -672,7 +672,7 @@ of Node.js applications.
added: v8.8.0
changes:
- version:
- REPLACEME
- v16.17.0
pr-url: https://github.com/nodejs/node/pull/42623
description: Add support for chaining loaders.
- version: v16.12.0
Expand Down Expand Up @@ -723,7 +723,7 @@ prevent unintentional breaks in the chain.
<!-- YAML
changes:
- version:
- REPLACEME
- v16.17.0
pr-url: https://github.com/nodejs/node/pull/42623
description: Add support for chaining resolve hooks. Each hook must either
call `nextResolve()` or include a `shortCircuit` property set to `true`
Expand Down Expand Up @@ -814,7 +814,7 @@ export async function resolve(specifier, context, nextResolve) {
<!-- YAML
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/42623
description: Add support for chaining load hooks. Each hook must either
call `nextLoad()` or include a `shortCircuit` property set to `true` in
Expand Down Expand Up @@ -912,7 +912,7 @@ source to a supported one (see [Examples](#examples) below).
<!-- YAML
changes:
- version: REPLACEME
- version: v16.17.0
pr-url: https://github.com/nodejs/node/pull/42623
description: Add support for chaining globalPreload hooks.
-->
Expand Down
4 changes: 2 additions & 2 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ Removes the `listener` from the list of handlers for event `type`.
### Class: `CustomEvent`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

> Stability: 1 - Experimental.
Expand All @@ -1994,7 +1994,7 @@ Instances are created internally by Node.js.
#### `event.detail`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

> Stability: 1 - Experimental.
Expand Down
10 changes: 5 additions & 5 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ number of bytes read is zero.
#### `filehandle.read(buffer[, options])`
<!-- YAML
added: REPLACEME
added: v16.17.0
-->
* `buffer` {Buffer|TypedArray|DataView} A buffer that will be filled with the
Expand Down Expand Up @@ -602,7 +602,7 @@ the end of the file.
#### `filehandle.write(buffer[, options])`
<!-- YAML
added: REPLACEME
added: v16.17.0
-->
* `buffer` {Buffer|TypedArray|DataView}
Expand Down Expand Up @@ -3143,7 +3143,7 @@ above values.
### `fs.read(fd, buffer[, options], callback)`
<!-- YAML
added: REPLACEME
added: v16.17.0
-->
* `fd` {integer}
Expand Down Expand Up @@ -4234,7 +4234,7 @@ the end of the file.
### `fs.write(fd, buffer[, options], callback)`
<!-- YAML
added: REPLACEME
added: v16.17.0
-->
* `fd` {integer}
Expand Down Expand Up @@ -5613,7 +5613,7 @@ this API: [`fs.write(fd, buffer...)`][].
### `fs.writeSync(fd, buffer[, options])`
<!-- YAML
added: REPLACEME
added: v16.17.0
-->
* `fd` {integer}
Expand Down
4 changes: 2 additions & 2 deletions doc/api/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ console.log(ac.signal.reason); // Error('boom!');
#### `abortSignal.throwIfAborted()`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

If `abortSignal.aborted` is `true`, throws `abortSignal.reason`.
Expand Down Expand Up @@ -309,7 +309,7 @@ only if the Node.js binary was compiled with including support for the
## `CustomEvent`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

> Stability: 1 - Experimental. Enable this API with the
Expand Down
8 changes: 4 additions & 4 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ type other than {net.Socket}.
### Event: `'dropRequest'`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

* `request` {http.IncomingMessage} Arguments for the HTTP request, as it is in
Expand Down Expand Up @@ -2353,7 +2353,7 @@ header name:
### `message.headersDistinct`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

* {Object}
Expand Down Expand Up @@ -2505,7 +2505,7 @@ The request/response trailers object. Only populated at the `'end'` event.
### `message.trailersDistinct`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

* {Object}
Expand Down Expand Up @@ -2628,7 +2628,7 @@ will result in a `TypeError` being thrown.
### `outgoingMessage.appendHeader(name, value)`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

* `name` {string} Header name
Expand Down
2 changes: 1 addition & 1 deletion doc/api/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const siblingModule = require('./sibling-module');
### `module.isBuiltin(moduleName)`
<!-- YAML
added: REPLACEME
added: v16.17.0
-->
* `moduleName` {string} name of the module
Expand Down
4 changes: 2 additions & 2 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Emitted when the server has been bound after calling [`server.listen()`][].
### Event: `'drop'`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

When the number of connections reaches the threshold of `server.maxConnections`,
Expand Down Expand Up @@ -1075,7 +1075,7 @@ The numeric representation of the remote port. For example, `80` or `21`.
### `socket.resetAndDestroy()`

<!-- YAML
added: REPLACEME
added: v16.17.0
-->

* Returns: {net.Socket}
Expand Down
Loading

0 comments on commit 30187ba

Please sign in to comment.