Skip to content

Conversation

@jasnell
Copy link
Member

@jasnelljasnell commented Jun 24, 2021

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-actionsgithub-actionsbot 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
@jasnelljasnell changed the title test: add WPT streams testsstream: add adapters for webstreams to node.js streamsJun 24, 2021
@jasnelljasnellforce-pushed the whatwg-streams-adapters branch 2 times, most recently from f359cb3 to 2db3dbbCompareJune 26, 2021 00:22
@mcollina
Copy link
Member

Good work!

@mcollina
Copy link
Member

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

@jasnelljasnellforce-pushed the whatwg-streams-adapters branch 2 times, most recently from 35c7181 to 0f4c4c9CompareJune 28, 2021 22:07
@jasnell
Copy link
MemberAuthor

@mcollina:

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

Added!

@jasnelljasnell marked this pull request as ready for review June 28, 2021 23:14
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@jasnelljasnellforce-pushed the whatwg-streams-adapters branch from 9fa29ee to aebb324CompareJuly 8, 2021 14:17
@jasnelljasnell requested review from mcollina and ronagJuly 8, 2021 14:17
@nodejs-github-bot
Copy link
Collaborator

@mcollina
Copy link
Member

Added!

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

@jasnell
Copy link
MemberAuthor

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.

Copy link
Member

@ronagronag left a comment

Choose a reason for hiding this comment

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

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

Copy link
Member

@ronagronag left a comment

Choose a reason for hiding this comment

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

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

jasnell added a commit that referenced this pull request Jul 13, 2021
Experimental adapters for the webstreams API Signed-off-by: James M Snell <[email protected]> PR-URL: #39134 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
@jasnell
Copy link
MemberAuthor

Landed in a99c230

@targos
Copy link
Member

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

@targos
Copy link
Member

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

@Mesteery
Copy link
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 <[email protected]> PR-URL: nodejs#39134 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
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 <[email protected]> PR-URL: nodejs#39134 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
@benjamingr
Copy link
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
Copy link
Contributor

MattiasBuelens commented Oct 9, 2021

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

@targos
Copy link
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.

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.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@jasnell@mcollina@nodejs-github-bot@devsnek@ronag@MattiasBuelens@targos@Mesteery@benjamingr