Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream: add filter method to readable #41354

Closed

Conversation

benjamingr
Copy link
Member

This continues the work in #40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental filter api to streams and tests/docs for it.

See https://github.com/tc39/proposal-iterator-helpers/

cc @nodejs/streams

@benjamingr benjamingr added stream Issues and PRs related to the stream subsystem. notable-change PRs with changes that should be highlighted in changelogs. labels Dec 30, 2021
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 30, 2021
@@ -147,6 +147,20 @@ async function * map(fn, options) {
}
}

async function * filter(fn, options) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an async generator for error's sake (so that if fn is not a function it rejects like an async generator would)

I changed the original code a bunch to pass the tests I added)

This continues the work in nodejs#40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.

See https://github.com/tc39/proposal-iterator-helpers/

Co-Authored-By: Robert Nagy <[email protected]>
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@benjamingr
Copy link
Member Author

@ronag it would be useful if the TSC LGTM for new APIs would apply to the whole tc39 iterator helpers proposal so these won't have to wait for another TSC review each time

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ronag
Copy link
Member

ronag commented Dec 30, 2021

@ronag it would be useful if the TSC LGTM for new APIs would apply to the whole tc39 iterator helpers proposal so these won't have to wait for another TSC review each time

Both me and @mcollina are TSC and probably want to review these so I don't think it's an issue.

@ronag ronag added the errors Issues and PRs related to JavaScript errors originated in Node.js core. label Dec 30, 2021
@benjamingr
Copy link
Member Author

Let's see if the label was fixed, if not I'll land later and follow up with another PR (forEach probably?) fixing the two nits at the same time.

@benjamingr benjamingr removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 2, 2022
benjamingr added a commit that referenced this pull request Jan 2, 2022
This continues the work in #40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.

See https://github.com/tc39/proposal-iterator-helpers/

Co-Authored-By: Robert Nagy <[email protected]>

PR-URL: #41354
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@benjamingr
Copy link
Member Author

Landed in 55c5120 with NCU, not ignoring the nits/comments - will correct them in one of the many follow-up PRs for this API

targos pushed a commit that referenced this pull request Jan 14, 2022
This continues the work in #40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.

See https://github.com/tc39/proposal-iterator-helpers/

Co-Authored-By: Robert Nagy <[email protected]>

PR-URL: #41354
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
targos added a commit that referenced this pull request Jan 16, 2022
Notable changes:

crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) #41266
doc:
  * add Mesteery to collaborators (Mestery) #41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) #41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) #41246
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
stream:
  * add filter method to readable (Benjamin Gruenbaum) #41354
  * add map method to Readable (Benjamin Gruenbaum) #40815

PR-URL: TODO
targos added a commit that referenced this pull request Jan 17, 2022
Notable changes:

crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) #41266
doc:
  * add Mesteery to collaborators (Mestery) #41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) #41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) #41246
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
stream:
  * add filter method to readable (Benjamin Gruenbaum) #41354
  * add map method to Readable (Benjamin Gruenbaum) #40815

PR-URL: #41557
@benjamingr benjamingr added the semver-minor PRs that contain new features and should be released in the next minor version. label Jan 17, 2022
targos added a commit that referenced this pull request Jan 17, 2022
Notable changes:

child_process:
  * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) #41225
crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) #41266
doc:
  * add Mesteery to collaborators (Mestery) #41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) #41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) #41246
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
stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum, Robert Nagy) #41354
  * (SEMVER-MINOR) add isReadable helper (Robert Nagy) #41199
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum, Robert Nagy) #40815

PR-URL: #41557
targos added a commit that referenced this pull request Jan 18, 2022
Notable changes:

child_process:
  * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) #41225
crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) #41266
doc:
  * add Mesteery to collaborators (Mestery) #41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) #41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) #41246
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
stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum, Robert Nagy) #41354
  * (SEMVER-MINOR) add isReadable helper (Robert Nagy) #41199
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum, Robert Nagy) #40815

PR-URL: #41557
targos added a commit that referenced this pull request Jan 18, 2022
Notable changes:

child_process:
  * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) #41225
crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) #41266
doc:
  * add Mesteery to collaborators (Mestery) #41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) #41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) #41246
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
stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum, Robert Nagy) #41354
  * (SEMVER-MINOR) add isReadable helper (Robert Nagy) #41199
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum, Robert Nagy) #40815

PR-URL: #41557
thedull pushed a commit to thedull/node that referenced this pull request Jan 18, 2022
Notable changes:

child_process:
  * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) nodejs#41225
crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) nodejs#41266
doc:
  * add Mesteery to collaborators (Mestery) nodejs#41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) nodejs#41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) nodejs#41246
loader:
  * (SEMVER-MINOR) return package format from defaultResolve if known (Gabriel Bota) nodejs#40980
perf_hooks:
  * (SEMVER-MINOR) multiple fixes for Histogram (James M Snell) nodejs#41153
stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum, Robert Nagy) nodejs#41354
  * (SEMVER-MINOR) add isReadable helper (Robert Nagy) nodejs#41199
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum, Robert Nagy) nodejs#40815

PR-URL: nodejs#41557
danielleadams pushed a commit that referenced this pull request Jan 31, 2022
This continues the work in #40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.

See https://github.com/tc39/proposal-iterator-helpers/

Co-Authored-By: Robert Nagy <[email protected]>

PR-URL: #41354
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Linkgoron pushed a commit to Linkgoron/node that referenced this pull request Jan 31, 2022
This continues the work in nodejs#40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.

See https://github.com/tc39/proposal-iterator-helpers/

Co-Authored-By: Robert Nagy <[email protected]>

PR-URL: nodejs#41354
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Linkgoron pushed a commit to Linkgoron/node that referenced this pull request Jan 31, 2022
Notable changes:

child_process:
  * (SEMVER-MINOR) add support for URL to `cp.fork` (Antoine du Hamel) nodejs#41225
crypto:
  * (SEMVER-MINOR) alias webcrypto.subtle and webcrypto.getRandomValues on crypto (James M Snell) nodejs#41266
doc:
  * add Mesteery to collaborators (Mestery) nodejs#41543
events:
  * (SEMVER-MINOR) graduate capturerejections to supported (James M Snell) nodejs#41267
  * (SEMVER-MINOR) add EventEmitterAsyncResource to core (James M Snell) nodejs#41246
loader:
  * (SEMVER-MINOR) return package format from defaultResolve if known (Gabriel Bota) nodejs#40980
perf_hooks:
  * (SEMVER-MINOR) multiple fixes for Histogram (James M Snell) nodejs#41153
stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum, Robert Nagy) nodejs#41354
  * (SEMVER-MINOR) add isReadable helper (Robert Nagy) nodejs#41199
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum, Robert Nagy) nodejs#40815

PR-URL: nodejs#41557
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
This continues the work in #40815 to
make streams compatible with upcoming ECMAScript language features. It
adds an experimental `filter` api to streams and tests/docs for it.

See https://github.com/tc39/proposal-iterator-helpers/

Co-Authored-By: Robert Nagy <[email protected]>

PR-URL: #41354
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
danielleadams added a commit that referenced this pull request Feb 1, 2022
Notable changes:

* doc:
  * add Mesteery to collaborators (Mestery) #41543
  * add @bnb as a collaborator (Tierney Cyren) #41100
* esm:
  * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) #40250
* lib:
  * (SEMVER-MINOR) make AbortSignal cloneable/transferable (James M Snell) #41050
* process:
  * (SEMVER-MINOR) add `getActiveResourcesInfo()` (Darshan Sen) #40813
* stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum) #41354
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum) #40815
  * deprecate thenable support (Antoine du Hamel) #40860
* timers:
  * (SEMVER-MINOR) add experimental scheduler api (James M Snell) #40909
danielleadams added a commit that referenced this pull request Feb 1, 2022
Notable changes:

* doc:
  * add Mesteery to collaborators (Mestery) #41543
  * add @bnb as a collaborator (Tierney Cyren) #41100
* esm:
  * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) #40250
* lib:
  * (SEMVER-MINOR) make AbortSignal cloneable/transferable (James M Snell) #41050
* process:
  * (SEMVER-MINOR) add `getActiveResourcesInfo()` (Darshan Sen) #40813
* stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum) #41354
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum) #40815
  * deprecate thenable support (Antoine du Hamel) #40860
* timers:
  * (SEMVER-MINOR) add experimental scheduler api (James M Snell) #40909
@danielleadams danielleadams mentioned this pull request Feb 1, 2022
danielleadams added a commit that referenced this pull request Feb 1, 2022
Notable changes:

* doc:
  * add Mesteery to collaborators (Mestery) #41543
  * add @bnb as a collaborator (Tierney Cyren) #41100
* esm:
  * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) #40250
* lib:
  * (SEMVER-MINOR) make AbortSignal cloneable/transferable (James M Snell) #41050
* process:
  * (SEMVER-MINOR) add `getActiveResourcesInfo()` (Darshan Sen) #40813
* stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum) #41354
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum) #40815
  * deprecate thenable support (Antoine du Hamel) #40860
* timers:
  * (SEMVER-MINOR) add experimental scheduler api (James M Snell) #40909
danielleadams added a commit that referenced this pull request Feb 1, 2022
Notable changes:

* doc:
  * add Mesteery to collaborators (Mestery) #41543
  * add @bnb as a collaborator (Tierney Cyren) #41100
* esm:
  * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) #40250
* lib:
  * (SEMVER-MINOR) make AbortSignal cloneable/transferable (James M Snell) #41050
* process:
  * (SEMVER-MINOR) add `getActiveResourcesInfo()` (Darshan Sen) #40813
* stream:
  * (SEMVER-MINOR) add filter method to readable (Benjamin Gruenbaum) #41354
  * (SEMVER-MINOR) add map method to Readable (Benjamin Gruenbaum) #40815
  * deprecate thenable support (Antoine du Hamel) #40860
* timers:
  * (SEMVER-MINOR) add experimental scheduler api (James M Snell) #40909

PR-URL: #41804
danielleadams added a commit that referenced this pull request Feb 1, 2022
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) add support for JSON import assertion (Antoine du Hamel) #40250
  * (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
* 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
* 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
danielleadams added a commit that referenced this pull request Feb 1, 2022
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) add support for JSON import assertion (Antoine du Hamel) #40250
  * (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
* 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
* 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
danielleadams added a commit that referenced this pull request Feb 1, 2022
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) add support for JSON import assertion (Antoine du Hamel) #40250
  * (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
* 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
* 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
danielleadams added a commit that referenced this pull request Feb 1, 2022
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) add support for JSON import assertion (Antoine du Hamel) #40250
  * (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
* 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
* 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
danielleadams added a commit that referenced this pull request Feb 1, 2022
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) add support for JSON import assertion (Antoine du Hamel) #40250
  * (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
* 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
* 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
danielleadams added a commit that referenced this pull request Feb 5, 2022
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) add support for JSON import assertion (Antoine du Hamel) #40250
  * (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
* 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
* 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
danielleadams added a commit that referenced this pull request Feb 6, 2022
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):

```js
import info from './package.json' assert { type: 'json' };
// or using dynamic import:
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) https://github.com/nodejs/node/pull41019
  * (SEMVER-MINOR) add numericSeparator to util.inspect (Ruben Bridgewater) #41003
  * (SEMVER-MINOR) always visualize cause property in errors during inspection (Ruben Bridgewater) https://github.com/nodejs/node/pull41002
* 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
danielleadams added a commit that referenced this pull request Feb 6, 2022
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) https://github.com/nodejs/node/pull41019
  * (SEMVER-MINOR) add numericSeparator to util.inspect (Ruben Bridgewater) #41003
  * (SEMVER-MINOR) always visualize cause property in errors during inspection (Ruben Bridgewater) https://github.com/nodejs/node/pull41002
* 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
danielleadams added a commit that referenced this pull request Feb 6, 2022
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
danielleadams added a commit that referenced this pull request Feb 6, 2022
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
danielleadams added a commit that referenced this pull request Feb 7, 2022
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
danielleadams added a commit that referenced this pull request Feb 8, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants