FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: add adapters for webstreams to node.js streams by jasnell · Pull Request #39134 · nodejs/node · GitHub

/ node Public

stream: add adapters for webstreams to node.js streams - #39134

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:whatwg-streams-adapters
Closed

stream: add adapters for webstreams to node.js streams#39134
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:whatwg-streams-adapters

Conversation

jasnell commented Jun 24, 2021
edited
Loading

Copy link
Copy Markdown
Member

Experimental adapters for node.js streams and web streams.

Depends on #39062 (the first two commits here are from that PR and will be rebased out once that once lands)

github-actions 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 Jun 24, 2021
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
jasnell changed the title test: add WPT streams tests stream: add adapters for webstreams to node.js streams Jun 24, 2021
jasnell force-pushed the whatwg-streams-adapters branch 2 times, most recently from f359cb3 to 2db3dbb Compare June 26, 2021 00:22

Copy link
Copy Markdown
Member

Good work!

Copy link
Copy Markdown
Member

I think this should include some code&test for finished() and pipeline() to support these.

jasnell force-pushed the whatwg-streams-adapters branch 2 times, most recently from 35c7181 to 0f4c4c9 Compare June 28, 2021 22:07
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated

jasnell commented Jun 28, 2021

Copy link
Copy Markdown
Member Author

@mcollina:

I think this should include some code&test for finished() and pipeline() to support these.

Added!

jasnell marked this pull request as ready for review June 28, 2021 23:14

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

jasnell force-pushed the whatwg-streams-adapters branch from 9fa29ee to aebb324 Compare July 8, 2021 14:17
jasnell requested review from mcollina and ronag July 8, 2021 14:17

Copy link
Copy Markdown
Collaborator

mcollina commented Jul 8, 2021

Copy link
Copy Markdown
Member

Added!

Where? I can't find them in the code. There are no changes to finished and pipeline to support whatwg streams.

jasnell commented Jul 8, 2021

Copy link
Copy Markdown
Member Author

Where? I can't find them in the code.

I think I misunderstood. I added tests to show that the adapters work properly with finished and pipeline, but I have not modified either finish or pipeline to accept the web streams variants directly. I'd rather do that in a separate PR.

ronag 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could we land #39294 and use the utils from that?

Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated

ronag 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

IMHO. The naming of the adapter methods are not very ergonomic....

Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
Comment thread lib/internal/webstreams/adapters.js Outdated
jasnell added a commit that referenced this pull request Jul 13, 2021
Experimental adapters for the webstreams API

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #39134
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

jasnell commented Jul 13, 2021

Copy link
Copy Markdown
Member Author

Landed in a99c230

targos commented Jul 17, 2021

Copy link
Copy Markdown
Member

This needs a backport to land on v16.x because it depends on the semver-major #39294

targos commented Oct 9, 2021

Copy link
Copy Markdown
Member

Does anyone want to backport this? Maybe @nodejs/backporters ?

Mesteery commented Oct 9, 2021

Copy link
Copy Markdown
Contributor

I'm willing to take care of it.

Mesteery pushed a commit to Mesteery/node that referenced this pull request Oct 9, 2021
Experimental adapters for the webstreams API

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: nodejs#39134
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

Copy link
Copy Markdown
Member

Hey just wondering - is there any reason you chose not to overload Readable.from? I skimmed discussion and missed it (toWeb makes sense regardless)

MattiasBuelens commented Oct 9, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

@benjamingr See this comment. It's not off the table, but at least for now it seemed better to keep it separate as .fromWeb().

targos commented Oct 10, 2021

Copy link
Copy Markdown
Member

I'm going to keep the backport-requested label for some time, in case someone has an idea to backport without the need for semver-major changes.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL