Skip to content

fs: add FileHandle.prototype.readableStream() - #39331

Closed
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:filehandle-webstream
Closed

fs: add FileHandle.prototype.readableStream()#39331
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:filehandle-webstream

Conversation

@jasnell

@jasnelljasnell commented Jul 9, 2021

Copy link
Copy Markdown
Member

Builds on #39134 (the first commit is from that PR)

Adds an experimental readableStream() method to FileHandle objects that returns ReadableStream.

constfile=awaitfs.promises.open('./some/file/to/read');forawait(constchunkoffile.readableStream())console.log(chunk);
constfile=awaitfs.promises.open('./some/file/to/read');constreadable=file.readableStream();constreader=readable.getReader();reader.read().then(console.log);

Note that the ReadableStream returned is affected by the other methods for reading the FileHandle data. For instance, if file.readFile() is called first, the ReadableStream will not return any data.

@nodejs-github-botnodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jul 9, 2021
@ronag

ronag commented Jul 9, 2021

Copy link
Copy Markdown
Member

readableWebStream? Also what is the advantage of this relative to just making it async iterable?

@ronag

ronag commented Jul 9, 2021

Copy link
Copy Markdown
Member

I would prefer an API with less surface area e.g.:

awaitdstHandle.write(srcHandle)

Where write takes an async iterable and srcHandle is an async iterable.

Later could turn into:

awaitdstHandle.write(pipeline(nodeReadable,webTransform,nodeTransform,()=>{}))awaitdstHandle.write(compose(nodeReadable,webTransform,nodeTransform))

@jasnell

Copy link
Copy Markdown
MemberAuthor

Less surface area? I don't understand. It's a single function with no arguments and is consistent with common web platform APIs. What you're suggesting is a different pattern that can also be implemented but that shouldn't block this.

@ronag

ronag commented Jul 9, 2021

Copy link
Copy Markdown
Member

Less surface area? I don't understand. It's a single function with no arguments and is consistent with common web platform APIs. What you're suggesting is a different pattern that can also be implemented but that shouldn't block this.

I'm just concerned that we start hooking up this to various things in node and end up with 3+ different ways to consume everything. I would prefer to have as few as possible (1?) so that there is less confusion about when to use what.

Also I'm unsure about the naming here again. It's ambiguous whether this is a node readable or a web readable.

We already have 5 different ways to consume node streams which leads to a lot of confusion in regards to when to use what. Would like to try and avoid a repeat of that.

Just concerned. Not blocking.

@ronag
ronag requested a review from mcollinaJuly 9, 2021 23:19
@ronag

ronag commented Jul 9, 2021

Copy link
Copy Markdown
Member

Btw, https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream web File uses .stream()?

Comment threaddoc/api/fs.md Outdated
@jasnell

Copy link
Copy Markdown
MemberAuthor

@ronag:

Btw, developer.mozilla.org/en-US/docs/Web/API/Blob/stream web File uses .stream()?

Yep, and Response (part of fetch) uses .body. Some of the other web apis use .readable, it's a mess.

readableWebStream() is ok here but isn't great.

@jasnell

Copy link
Copy Markdown
MemberAuthor

@ronag - updated to use readableWebStream()

@jasnell
jasnellforce-pushed the filehandle-webstream branch from 770daa8 to 7f2ccd4CompareJuly 11, 2021 04:22
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadlib/internal/fs/promises.js Outdated

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@ronagronag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs either a ref/unref or a on('close', () => stream.close()). I think in node streams we do the latter.

@jasnell
jasnellforce-pushed the filehandle-webstream branch from 7f2ccd4 to ab0107fCompareJuly 12, 2021 19:44
@jasnell

Copy link
Copy Markdown
MemberAuthor

@ronag ... I added the ref/unref with additional tests, and a note in the docs that the FileHandle must still be closed by the usercode. PTAL

@jasnell
jasnell requested a review from ronagJuly 12, 2021 22:36

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@jasnell
jasnellforce-pushed the filehandle-webstream branch from f40780c to 94c4497CompareJuly 13, 2021 17:14
@nodejs-github-bot

This comment has been minimized.

@jasnell
jasnellforce-pushed the filehandle-webstream branch from 94c4497 to 7332982CompareJuly 13, 2021 17:39
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@jasnell
jasnellforce-pushed the filehandle-webstream branch from 7332982 to 489b6c5CompareJuly 13, 2021 19:52
@nodejs-github-bot

This comment has been minimized.

@jasnell

Copy link
Copy Markdown
MemberAuthor

@addaleax ... I'd appreciate if you could take a look at the third commit here. It changes FileHandle::ClosePromise to always return the same persisted promise after the first call as opposed to throwing if Close is called again.

Adds an experimental `readableWebStream()` method to `FileHandle` that
returns a web `ReadableStream`
Signed-off-by: James M Snell <jasnell@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com>
Makes the FileHandle::ClosePromise() idempotent, always returning
the same Promise after it has already been successfully called
once. Avoids the possibility of accidental double close events.
Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell
jasnellforce-pushed the filehandle-webstream branch from 3e8ba52 to cb718a2CompareJuly 15, 2021 20:41
@jasnell

Copy link
Copy Markdown
MemberAuthor

Landed in e2a6399...e239f5e

@jasnelljasnell closed this Jul 15, 2021
jasnell added a commit that referenced this pull request Jul 15, 2021
Adds an experimental `readableWebStream()` method to `FileHandle` that
returns a web `ReadableStream`
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39331
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
jasnell added a commit that referenced this pull request Jul 15, 2021
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39331
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
jasnell added a commit that referenced this pull request Jul 15, 2021
Makes the FileHandle::ClosePromise() idempotent, always returning
the same Promise after it has already been successfully called
once. Avoids the possibility of accidental double close events.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39331
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@targos

Copy link
Copy Markdown
Member

Depends on #39134

targos pushed a commit that referenced this pull request Jul 17, 2021
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39331
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this pull request Jul 17, 2021
Makes the FileHandle::ClosePromise() idempotent, always returning
the same Promise after it has already been successfully called
once. Avoids the possibility of accidental double close events.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39331
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@Trott

Copy link
Copy Markdown
Member

This test fails on containered tests a lot it seems? Here's a link to the most recent daily-master where it failed on three containers. https://ci.nodejs.org/job/node-test-commit-linux-containered/27906/

@jasnell

Copy link
Copy Markdown
MemberAuthor

That's odd. Let's Mark it flaky for now and I'll investigate on Monday

@BethGriggsBethGriggs mentioned this pull request Jul 26, 2021
BethGriggs pushed a commit that referenced this pull request Jul 29, 2021
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39331
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
BethGriggs pushed a commit that referenced this pull request Jul 29, 2021
Makes the FileHandle::ClosePromise() idempotent, always returning
the same Promise after it has already been successfully called
once. Avoids the possibility of accidental double close events.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39331
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@targostargos added dont-land-on-v14.x semver-minor PRs that contain new features and should be released in the next minor version. labels Sep 4, 2021
@BethGriggsBethGriggs mentioned this pull request Oct 14, 2021
2 tasks
BethGriggs added a commit that referenced this pull request Oct 15, 2021
Notable Changes:
Deprecations and Removals:
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup`
options
(Antoine du Hamel) [#39793]
- doc: deprecate (doc-only) http abort related
(dr-js) [#36670]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- v8: remove --harmony-top-level-await
(Geoffrey Booth) [#40226]
OpenSSL 3.0:
Node.js now includes OpenSSL 3.0, specifically https://github.com/quictls/openssl
which provides QUIC support. For details about all the features in
OpenSSL 3.0 please see https://www.openssl.org/blog/blog/2021/09/07/OpenSSL3.Final.
(Daniel Bevenius) [#38512]
V8 9.5:
The V8 JavaScript engine is updated to V8 9.5. This release comes with
additional supported types for th `Intl.DisplayNames` API and Extended
`timeZoneName` options in the `Intl.DateTimeFormat` API. You can read
more details in the V8 9.5 release post https://v8.dev/blog/v8-release-95.
(Michaël Zasso) [#40178]
Readline Promise API:
The `readline` module provides an interface for reading data from a
Readable stream (such as `process.stdin`) one line at a time.
(Antoine du Hamel) [#37947]
Other Notable Changes:
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MINOR) fs: add FileHandle.prototype.readableWebStream()
(James M Snell) [#39331]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
Semver-Major Commits:
- (SEMVER-MAJOR) build: compile with C++17 (MSVC)
(Richard Lau) [#38807]
- (SEMVER-MAJOR) build: compile with --gnu++17
(Richard Lau) [#38807]
- (SEMVER-MAJOR) deps: update V8 to 9.5.172.19
(Michaël Zasso) [#40178]
- (SEMVER-MAJOR) deps,test,src,doc,tools: update to OpenSSL 3.0
(Daniel Bevenius) [#38512]
- (SEMVER-MAJOR) dgram: tighten `address` validation in `socket.send`
(Voltrex) [#39190]
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup` options
(Antoine du Hamel) [#39793]
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) doc: update minimum supported FreeBSD to 12.2
(Michaël Zasso) [#40179]
- (SEMVER-MAJOR) errors: disp ver on fatal except that causes exit
(Divlo) [#38332]
- (SEMVER-MAJOR) fs: fix rmsync error swallowing
(Nitzan Uziely) [#38684]
- (SEMVER-MAJOR) fs: aggregate errors in fsPromises to avoid error swallowing
(Nitzan Uziely) [#38259]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- (SEMVER-MAJOR) readline: validate `AbortSignal`s and remove unused event listeners
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: introduce promise-based API
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: refactor `Interface` to ES2015 class
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) src: allow CAP\_NET\_BIND\_SERVICE in SafeGetenv
(Daniel Bevenius) [#37727]
- (SEMVER-MAJOR) src: return Maybe from a couple of functions
(Darshan Sen) [#39603]
- (SEMVER-MAJOR) src: allow custom PageAllocator in NodePlatform
(Shelley Vohr) [#38362]
- (SEMVER-MAJOR) stream: fix highwatermark threshold and add the missing error
(Rongjian Zhang) [#38700]
- (SEMVER-MAJOR) stream: don't emit 'data' after 'error' or 'close'
(Robert Nagy) [#39639]
- (SEMVER-MAJOR) stream: do not emit `end` on readable error
(Szymon Marczak) [#39607]
- (SEMVER-MAJOR) stream: forward errored to callback
(Robert Nagy) [#39364]
- (SEMVER-MAJOR) stream: destroy readable on read error
(Robert Nagy) [#39342]
- (SEMVER-MAJOR) stream: validate abort signal
(Robert Nagy) [#39346]
- (SEMVER-MAJOR) stream: unify stream utils
(Robert Nagy) [#39294]
- (SEMVER-MAJOR) stream: throw on premature close in Readable\
(Darshan Sen) [#39117]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
- (SEMVER-MAJOR) stream: error Duplex write/read if not writable/readable
(Robert Nagy) [#34385]
- (SEMVER-MAJOR) stream: bypass legacy destroy for pipeline and async iteration
(Robert Nagy) [#38505]
- (SEMVER-MAJOR) url: throw invalid this on detached accessors
(James M Snell) [#39752]
- (SEMVER-MAJOR) url: forbid certain confusable changes from being introduced by toASCII
(Timothy Gu) [#38631]
PR-URL: #40119
BethGriggs added a commit that referenced this pull request Oct 15, 2021
Notable Changes:
Deprecations and Removals:
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup`
options
(Antoine du Hamel) [#39793]
- doc: deprecate (doc-only) http abort related
(dr-js) [#36670]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- v8: remove --harmony-top-level-await
(Geoffrey Booth) [#40226]
OpenSSL 3.0:
Node.js now includes OpenSSL 3.0, specifically https://github.com/quictls/openssl
which provides QUIC support. For details about all the features in
OpenSSL 3.0 please see https://www.openssl.org/blog/blog/2021/09/07/OpenSSL3.Final.
(Daniel Bevenius) [#38512]
V8 9.5:
The V8 JavaScript engine is updated to V8 9.5. This release comes with
additional supported types for the `Intl.DisplayNames` API and Extended
`timeZoneName` options in the `Intl.DateTimeFormat` API. You can read
more details in the V8 9.5 release post https://v8.dev/blog/v8-release-95.
(Michaël Zasso) [#40178]
Readline Promise API:
The `readline` module provides an interface for reading data from a
Readable stream (such as `process.stdin`) one line at a time.
(Antoine du Hamel) [#37947]
Other Notable Changes:
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) errors: print Node.js version on fatal exceptions that
cause exit
(Divlo) [#38332]
- (SEMVER-MINOR) fs: add FileHandle.prototype.readableWebStream()
(James M Snell) [#39331]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
Semver-Major Commits:
- (SEMVER-MAJOR) build: compile with C++17 (MSVC)
(Richard Lau) [#38807]
- (SEMVER-MAJOR) build: compile with --gnu++17
(Richard Lau) [#38807]
- (SEMVER-MAJOR) deps: update V8 to 9.5.172.19
(Michaël Zasso) [#40178]
- (SEMVER-MAJOR) deps,test,src,doc,tools: update to OpenSSL 3.0
(Daniel Bevenius) [#38512]
- (SEMVER-MAJOR) dgram: tighten `address` validation in `socket.send`
(Voltrex) [#39190]
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup` options
(Antoine du Hamel) [#39793]
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) doc: update minimum supported FreeBSD to 12.2
(Michaël Zasso) [#40179]
- (SEMVER-MAJOR) errors: disp ver on fatal except that causes exit
(Divlo) [#38332]
- (SEMVER-MAJOR) fs: fix rmsync error swallowing
(Nitzan Uziely) [#38684]
- (SEMVER-MAJOR) fs: aggregate errors in fsPromises to avoid error swallowing
(Nitzan Uziely) [#38259]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- (SEMVER-MAJOR) readline: validate `AbortSignal`s and remove unused event listeners
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: introduce promise-based API
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: refactor `Interface` to ES2015 class
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) src: allow CAP\_NET\_BIND\_SERVICE in SafeGetenv
(Daniel Bevenius) [#37727]
- (SEMVER-MAJOR) src: return Maybe from a couple of functions
(Darshan Sen) [#39603]
- (SEMVER-MAJOR) src: allow custom PageAllocator in NodePlatform
(Shelley Vohr) [#38362]
- (SEMVER-MAJOR) stream: fix highwatermark threshold and add the missing error
(Rongjian Zhang) [#38700]
- (SEMVER-MAJOR) stream: don't emit 'data' after 'error' or 'close'
(Robert Nagy) [#39639]
- (SEMVER-MAJOR) stream: do not emit `end` on readable error
(Szymon Marczak) [#39607]
- (SEMVER-MAJOR) stream: forward errored to callback
(Robert Nagy) [#39364]
- (SEMVER-MAJOR) stream: destroy readable on read error
(Robert Nagy) [#39342]
- (SEMVER-MAJOR) stream: validate abort signal
(Robert Nagy) [#39346]
- (SEMVER-MAJOR) stream: unify stream utils
(Robert Nagy) [#39294]
- (SEMVER-MAJOR) stream: throw on premature close in Readable\
(Darshan Sen) [#39117]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
- (SEMVER-MAJOR) stream: error Duplex write/read if not writable/readable
(Robert Nagy) [#34385]
- (SEMVER-MAJOR) stream: bypass legacy destroy for pipeline and async iteration
(Robert Nagy) [#38505]
- (SEMVER-MAJOR) url: throw invalid this on detached accessors
(James M Snell) [#39752]
- (SEMVER-MAJOR) url: forbid certain confusable changes from being introduced by toASCII
(Timothy Gu) [#38631]
PR-URL: #40119
BethGriggs added a commit that referenced this pull request Oct 16, 2021
Notable Changes:
Deprecations and Removals:
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup`
options
(Antoine du Hamel) [#39793]
- doc: deprecate (doc-only) http abort related
(dr-js) [#36670]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
OpenSSL 3.0:
Node.js now includes OpenSSL 3.0, specifically https://github.com/quictls/openssl
which provides QUIC support. For details about all the features in
OpenSSL 3.0 please see https://www.openssl.org/blog/blog/2021/09/07/OpenSSL3.Final.
(Daniel Bevenius) [#38512]
V8 9.5:
The V8 JavaScript engine is updated to V8 9.5. This release comes with
additional supported types for the `Intl.DisplayNames` API and Extended
`timeZoneName` options in the `Intl.DateTimeFormat` API. You can read
more details in the V8 9.5 release post https://v8.dev/blog/v8-release-95.
(Michaël Zasso) [#40178]
Readline Promise API:
The `readline` module provides an interface for reading data from a
Readable stream (such as `process.stdin`) one line at a time.
(Antoine du Hamel) [#37947]
Other Notable Changes:
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) errors: print Node.js version on fatal exceptions that
cause exit
(Divlo) [#38332]
- (SEMVER-MINOR) fs: add FileHandle.prototype.readableWebStream()
(James M Snell) [#39331]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
Semver-Major Commits:
- (SEMVER-MAJOR) build: compile with C++17 (MSVC)
(Richard Lau) [#38807]
- (SEMVER-MAJOR) build: compile with --gnu++17
(Richard Lau) [#38807]
- (SEMVER-MAJOR) deps: update V8 to 9.5.172.19
(Michaël Zasso) [#40178]
- (SEMVER-MAJOR) deps,test,src,doc,tools: update to OpenSSL 3.0
(Daniel Bevenius) [#38512]
- (SEMVER-MAJOR) dgram: tighten `address` validation in `socket.send`
(Voltrex) [#39190]
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup` options
(Antoine du Hamel) [#39793]
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) doc: update minimum supported FreeBSD to 12.2
(Michaël Zasso) [#40179]
- (SEMVER-MAJOR) errors: disp ver on fatal except that causes exit
(Divlo) [#38332]
- (SEMVER-MAJOR) fs: fix rmsync error swallowing
(Nitzan Uziely) [#38684]
- (SEMVER-MAJOR) fs: aggregate errors in fsPromises to avoid error swallowing
(Nitzan Uziely) [#38259]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- (SEMVER-MAJOR) readline: validate `AbortSignal`s and remove unused event listeners
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: introduce promise-based API
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: refactor `Interface` to ES2015 class
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) src: allow CAP\_NET\_BIND\_SERVICE in SafeGetenv
(Daniel Bevenius) [#37727]
- (SEMVER-MAJOR) src: return Maybe from a couple of functions
(Darshan Sen) [#39603]
- (SEMVER-MAJOR) src: allow custom PageAllocator in NodePlatform
(Shelley Vohr) [#38362]
- (SEMVER-MAJOR) stream: fix highwatermark threshold and add the missing error
(Rongjian Zhang) [#38700]
- (SEMVER-MAJOR) stream: don't emit 'data' after 'error' or 'close'
(Robert Nagy) [#39639]
- (SEMVER-MAJOR) stream: do not emit `end` on readable error
(Szymon Marczak) [#39607]
- (SEMVER-MAJOR) stream: forward errored to callback
(Robert Nagy) [#39364]
- (SEMVER-MAJOR) stream: destroy readable on read error
(Robert Nagy) [#39342]
- (SEMVER-MAJOR) stream: validate abort signal
(Robert Nagy) [#39346]
- (SEMVER-MAJOR) stream: unify stream utils
(Robert Nagy) [#39294]
- (SEMVER-MAJOR) stream: throw on premature close in Readable\
(Darshan Sen) [#39117]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
- (SEMVER-MAJOR) stream: error Duplex write/read if not writable/readable
(Robert Nagy) [#34385]
- (SEMVER-MAJOR) stream: bypass legacy destroy for pipeline and async iteration
(Robert Nagy) [#38505]
- (SEMVER-MAJOR) url: throw invalid this on detached accessors
(James M Snell) [#39752]
- (SEMVER-MAJOR) url: forbid certain confusable changes from being introduced by toASCII
(Timothy Gu) [#38631]
PR-URL: #40119
BethGriggs added a commit that referenced this pull request Oct 18, 2021
Notable Changes:
Deprecations and Removals:
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup`
options
(Antoine du Hamel) [#39793]
- doc: deprecate (doc-only) http abort related
(dr-js) [#36670]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
OpenSSL 3.0:
Node.js now includes OpenSSL 3.0, specifically https://github.com/quictls/openssl
which provides QUIC support.
While OpenSSL 3.0 APIs should be mostly compatible with those provided
by OpenSSL 1.1.1, we do anticipate some ecosystem impact due to
tightened restrictions on the allowed algorithms and key sizes.
If you hit an `ERR_OSSL_EVP_UNSUPPORTED` error in your application with
Node.js 17, it’s likely that your application or a module you’re using
is attempting to use an algorithm or key size which is no longer allowed
by default with OpenSSL 3.0. A command-line option,
`--openssl-legacy-provider`, has been added to revert to the legacy
provider as a temporary workaround for these tightened restrictions.
For details about all the features in
OpenSSL 3.0 please see https://www.openssl.org/blog/blog/2021/09/07/OpenSSL3.Final.
(Daniel Bevenius) [#38512]
Contributed in #38512, #40478
V8 9.5:
The V8 JavaScript engine is updated to V8 9.5. This release comes with
additional supported types for the `Intl.DisplayNames` API and Extended
`timeZoneName` options in the `Intl.DateTimeFormat` API. You can read
more details in the V8 9.5 release post https://v8.dev/blog/v8-release-95.
(Michaël Zasso) [#40178]
Readline Promise API:
The `readline` module provides an interface for reading data from a
Readable stream (such as `process.stdin`) one line at a time.
(Antoine du Hamel) [#37947]
Other Notable Changes:
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) errors: print Node.js version on fatal exceptions that
cause exit
(Divlo) [#38332]
- deps: upgrade npm to 8.1.0
(npm team) [#40463]
- (SEMVER-MINOR) fs: add FileHandle.prototype.readableWebStream()
(James M Snell) [#39331]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
Semver-Major Commits:
- (SEMVER-MAJOR) build: compile with C++17 (MSVC)
(Richard Lau) [#38807]
- (SEMVER-MAJOR) build: compile with --gnu++17
(Richard Lau) [#38807]
- (SEMVER-MAJOR) deps: update V8 to 9.5.172.19
(Michaël Zasso) [#40178]
- (SEMVER-MAJOR) deps,test,src,doc,tools: update to OpenSSL 3.0
(Daniel Bevenius) [#38512]
- (SEMVER-MAJOR) dgram: tighten `address` validation in `socket.send`
(Voltrex) [#39190]
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup` options
(Antoine du Hamel) [#39793]
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) doc: update minimum supported FreeBSD to 12.2
(Michaël Zasso) [#40179]
- (SEMVER-MAJOR) errors: disp ver on fatal except that causes exit
(Divlo) [#38332]
- (SEMVER-MAJOR) fs: fix rmsync error swallowing
(Nitzan Uziely) [#38684]
- (SEMVER-MAJOR) fs: aggregate errors in fsPromises to avoid error swallowing
(Nitzan Uziely) [#38259]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- (SEMVER-MAJOR) readline: validate `AbortSignal`s and remove unused event listeners
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: introduce promise-based API
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: refactor `Interface` to ES2015 class
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) src: allow CAP\_NET\_BIND\_SERVICE in SafeGetenv
(Daniel Bevenius) [#37727]
- (SEMVER-MAJOR) src: return Maybe from a couple of functions
(Darshan Sen) [#39603]
- (SEMVER-MAJOR) src: allow custom PageAllocator in NodePlatform
(Shelley Vohr) [#38362]
- (SEMVER-MAJOR) stream: fix highwatermark threshold and add the missing error
(Rongjian Zhang) [#38700]
- (SEMVER-MAJOR) stream: don't emit 'data' after 'error' or 'close'
(Robert Nagy) [#39639]
- (SEMVER-MAJOR) stream: do not emit `end` on readable error
(Szymon Marczak) [#39607]
- (SEMVER-MAJOR) stream: forward errored to callback
(Robert Nagy) [#39364]
- (SEMVER-MAJOR) stream: destroy readable on read error
(Robert Nagy) [#39342]
- (SEMVER-MAJOR) stream: validate abort signal
(Robert Nagy) [#39346]
- (SEMVER-MAJOR) stream: unify stream utils
(Robert Nagy) [#39294]
- (SEMVER-MAJOR) stream: throw on premature close in Readable\
(Darshan Sen) [#39117]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
- (SEMVER-MAJOR) stream: error Duplex write/read if not writable/readable
(Robert Nagy) [#34385]
- (SEMVER-MAJOR) stream: bypass legacy destroy for pipeline and async iteration
(Robert Nagy) [#38505]
- (SEMVER-MAJOR) url: throw invalid this on detached accessors
(James M Snell) [#39752]
- (SEMVER-MAJOR) url: forbid certain confusable changes from being introduced by toASCII
(Timothy Gu) [#38631]
PR-URL: #40119
BethGriggs added a commit that referenced this pull request Oct 18, 2021
Notable Changes:
Deprecations and Removals:
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup`
options
(Antoine du Hamel) [#39793]
- doc: deprecate (doc-only) http abort related
(dr-js) [#36670]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
OpenSSL 3.0:
Node.js now includes OpenSSL 3.0, specifically https://github.com/quictls/openssl
which provides QUIC support.
While OpenSSL 3.0 APIs should be mostly compatible with those provided
by OpenSSL 1.1.1, we do anticipate some ecosystem impact due to
tightened restrictions on the allowed algorithms and key sizes.
If you hit an `ERR_OSSL_EVP_UNSUPPORTED` error in your application with
Node.js 17, it’s likely that your application or a module you’re using
is attempting to use an algorithm or key size which is no longer allowed
by default with OpenSSL 3.0. A command-line option,
`--openssl-legacy-provider`, has been added to revert to the legacy
provider as a temporary workaround for these tightened restrictions.
For details about all the features in
OpenSSL 3.0 please see https://www.openssl.org/blog/blog/2021/09/07/OpenSSL3.Final.
(Daniel Bevenius) [#38512]
Contributed in #38512, #40478
V8 9.5:
The V8 JavaScript engine is updated to V8 9.5. This release comes with
additional supported types for the `Intl.DisplayNames` API and Extended
`timeZoneName` options in the `Intl.DateTimeFormat` API. You can read
more details in the V8 9.5 release post https://v8.dev/blog/v8-release-95.
(Michaël Zasso) [#40178]
Readline Promise API:
The `readline` module provides an interface for reading data from a
Readable stream (such as `process.stdin`) one line at a time.
(Antoine du Hamel) [#37947]
Other Notable Changes:
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) errors: print Node.js version on fatal exceptions that
cause exit
(Divlo) [#38332]
- deps: upgrade npm to 8.1.0
(npm team) [#40463]
- (SEMVER-MINOR) fs: add FileHandle.prototype.readableWebStream()
(James M Snell) [#39331]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
Semver-Major Commits:
- (SEMVER-MAJOR) build: compile with C++17 (MSVC)
(Richard Lau) [#38807]
- (SEMVER-MAJOR) build: compile with --gnu++17
(Richard Lau) [#38807]
- (SEMVER-MAJOR) deps: update V8 to 9.5.172.19
(Michaël Zasso) [#40178]
- (SEMVER-MAJOR) deps,test,src,doc,tools: update to OpenSSL 3.0
(Daniel Bevenius) [#38512]
- (SEMVER-MAJOR) dgram: tighten `address` validation in `socket.send`
(Voltrex) [#39190]
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup` options
(Antoine du Hamel) [#39793]
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) doc: update minimum supported FreeBSD to 12.2
(Michaël Zasso) [#40179]
- (SEMVER-MAJOR) errors: disp ver on fatal except that causes exit
(Divlo) [#38332]
- (SEMVER-MAJOR) fs: fix rmsync error swallowing
(Nitzan Uziely) [#38684]
- (SEMVER-MAJOR) fs: aggregate errors in fsPromises to avoid error swallowing
(Nitzan Uziely) [#38259]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- (SEMVER-MAJOR) readline: validate `AbortSignal`s and remove unused event listeners
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: introduce promise-based API
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: refactor `Interface` to ES2015 class
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) src: allow CAP\_NET\_BIND\_SERVICE in SafeGetenv
(Daniel Bevenius) [#37727]
- (SEMVER-MAJOR) src: return Maybe from a couple of functions
(Darshan Sen) [#39603]
- (SEMVER-MAJOR) src: allow custom PageAllocator in NodePlatform
(Shelley Vohr) [#38362]
- (SEMVER-MAJOR) stream: fix highwatermark threshold and add the missing error
(Rongjian Zhang) [#38700]
- (SEMVER-MAJOR) stream: don't emit 'data' after 'error' or 'close'
(Robert Nagy) [#39639]
- (SEMVER-MAJOR) stream: do not emit `end` on readable error
(Szymon Marczak) [#39607]
- (SEMVER-MAJOR) stream: forward errored to callback
(Robert Nagy) [#39364]
- (SEMVER-MAJOR) stream: destroy readable on read error
(Robert Nagy) [#39342]
- (SEMVER-MAJOR) stream: validate abort signal
(Robert Nagy) [#39346]
- (SEMVER-MAJOR) stream: unify stream utils
(Robert Nagy) [#39294]
- (SEMVER-MAJOR) stream: throw on premature close in Readable\
(Darshan Sen) [#39117]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
- (SEMVER-MAJOR) stream: error Duplex write/read if not writable/readable
(Robert Nagy) [#34385]
- (SEMVER-MAJOR) stream: bypass legacy destroy for pipeline and async iteration
(Robert Nagy) [#38505]
- (SEMVER-MAJOR) url: throw invalid this on detached accessors
(James M Snell) [#39752]
- (SEMVER-MAJOR) url: forbid certain confusable changes from being introduced by toASCII
(Timothy Gu) [#38631]
PR-URL: #40119
BethGriggs added a commit that referenced this pull request Oct 19, 2021
Notable Changes:
Deprecations and Removals:
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup`
options
(Antoine du Hamel) [#39793]
- doc: deprecate (doc-only) http abort related
(dr-js) [#36670]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
OpenSSL 3.0:
Node.js now includes OpenSSL 3.0, specifically https://github.com/quictls/openssl
which provides QUIC support.
While OpenSSL 3.0 APIs should be mostly compatible with those provided
by OpenSSL 1.1.1, we do anticipate some ecosystem impact due to
tightened restrictions on the allowed algorithms and key sizes.
If you hit an `ERR_OSSL_EVP_UNSUPPORTED` error in your application with
Node.js 17, it’s likely that your application or a module you’re using
is attempting to use an algorithm or key size which is no longer allowed
by default with OpenSSL 3.0. A command-line option,
`--openssl-legacy-provider`, has been added to revert to the legacy
provider as a temporary workaround for these tightened restrictions.
For details about all the features in
OpenSSL 3.0 please see https://www.openssl.org/blog/blog/2021/09/07/OpenSSL3.Final.
(Daniel Bevenius) [#38512]
Contributed in #38512, #40478
V8 9.5:
The V8 JavaScript engine is updated to V8 9.5. This release comes with
additional supported types for the `Intl.DisplayNames` API and Extended
`timeZoneName` options in the `Intl.DateTimeFormat` API. You can read
more details in the V8 9.5 release post https://v8.dev/blog/v8-release-95.
(Michaël Zasso) [#40178]
Readline Promise API:
The `readline` module provides an interface for reading data from a
Readable stream (such as `process.stdin`) one line at a time.
(Antoine du Hamel) [#37947]
Other Notable Changes:
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) errors: print Node.js version on fatal exceptions that
cause exit
(Divlo) [#38332]
- deps: upgrade npm to 8.1.0
(npm team) [#40463]
- (SEMVER-MINOR) fs: add FileHandle.prototype.readableWebStream()
(James M Snell) [#39331]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
Semver-Major Commits:
- (SEMVER-MAJOR) build: compile with C++17 (MSVC)
(Richard Lau) [#38807]
- (SEMVER-MAJOR) build: compile with --gnu++17
(Richard Lau) [#38807]
- (SEMVER-MAJOR) deps: update V8 to 9.5.172.19
(Michaël Zasso) [#40178]
- (SEMVER-MAJOR) deps,test,src,doc,tools: update to OpenSSL 3.0
(Daniel Bevenius) [#38512]
- (SEMVER-MAJOR) dgram: tighten `address` validation in `socket.send`
(Voltrex) [#39190]
- (SEMVER-MAJOR) dns: runtime deprecate type coercion of `dns.lookup` options
(Antoine du Hamel) [#39793]
- (SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()
(treysis) [#39987]
- (SEMVER-MAJOR) doc: update minimum supported FreeBSD to 12.2
(Michaël Zasso) [#40179]
- (SEMVER-MAJOR) errors: disp ver on fatal except that causes exit
(Divlo) [#38332]
- (SEMVER-MAJOR) fs: fix rmsync error swallowing
(Nitzan Uziely) [#38684]
- (SEMVER-MAJOR) fs: aggregate errors in fsPromises to avoid error swallowing
(Nitzan Uziely) [#38259]
- (SEMVER-MAJOR) lib: add structuredClone() global
(Ethan Arrowood) [#39759]
- (SEMVER-MAJOR) lib: expose `DOMException` as global
(Khaidi Chu) [#39176]
- (SEMVER-MAJOR) module: subpath folder mappings EOL
(Guy Bedford) [#40121]
- (SEMVER-MAJOR) module: runtime deprecate trailing slash patterns
(Guy Bedford) [#40117]
- (SEMVER-MAJOR) readline: validate `AbortSignal`s and remove unused event listeners
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: introduce promise-based API
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) readline: refactor `Interface` to ES2015 class
(Antoine du Hamel) [#37947]
- (SEMVER-MAJOR) src: allow CAP\_NET\_BIND\_SERVICE in SafeGetenv
(Daniel Bevenius) [#37727]
- (SEMVER-MAJOR) src: return Maybe from a couple of functions
(Darshan Sen) [#39603]
- (SEMVER-MAJOR) src: allow custom PageAllocator in NodePlatform
(Shelley Vohr) [#38362]
- (SEMVER-MAJOR) stream: fix highwatermark threshold and add the missing error
(Rongjian Zhang) [#38700]
- (SEMVER-MAJOR) stream: don't emit 'data' after 'error' or 'close'
(Robert Nagy) [#39639]
- (SEMVER-MAJOR) stream: do not emit `end` on readable error
(Szymon Marczak) [#39607]
- (SEMVER-MAJOR) stream: forward errored to callback
(Robert Nagy) [#39364]
- (SEMVER-MAJOR) stream: destroy readable on read error
(Robert Nagy) [#39342]
- (SEMVER-MAJOR) stream: validate abort signal
(Robert Nagy) [#39346]
- (SEMVER-MAJOR) stream: unify stream utils
(Robert Nagy) [#39294]
- (SEMVER-MAJOR) stream: throw on premature close in Readable\
(Darshan Sen) [#39117]
- (SEMVER-MAJOR) stream: finished should error on errored stream
(Robert Nagy) [#39235]
- (SEMVER-MAJOR) stream: error Duplex write/read if not writable/readable
(Robert Nagy) [#34385]
- (SEMVER-MAJOR) stream: bypass legacy destroy for pipeline and async iteration
(Robert Nagy) [#38505]
- (SEMVER-MAJOR) url: throw invalid this on detached accessors
(James M Snell) [#39752]
- (SEMVER-MAJOR) url: forbid certain confusable changes from being introduced by toASCII
(Timothy Gu) [#38631]
PR-URL: #40119
@coderabbitaicoderabbitaiBot mentioned this pull request Jun 14, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.lib / srcIssues and PRs related to general changes in the lib or src directory.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@jasnell@ronag@nodejs-github-bot@targos@Trott@mcollina@addaleax