| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
I would prefer if we could avoid transforming into node stream
Sorry, something went wrong.
Any suggestion what alternative you would prefer? |
Sorry, something went wrong.
What I wrote 😄. We don't convert generators to streams. Instead we have a custom function pumping. |
Sorry, something went wrong.
Ah ok yes 😅😅, I think could try using pipeThrough of readable streams, converting the PR to draft |
Sorry, something went wrong.
|
Ok this requires some work closing this for now will reopen with fresh version 😅😅 |
Sorry, something went wrong.
|
Hi @ronag we are in an interesting position in regards to this PR turns out pipeline already supports webstreams due to #46307 since the pipeline is converting streams to duplexes and duplex now supports webstreams, except it breaks if transform streams are added in between, so I am thinking could do two things
would this be an acceptable path? |
Sorry, something went wrong.
|
Hello, have updated the code, 3 tests are failing which shall fix in a while but generally have updated to not convert everything to nodestreams 😅😅, could you please take a look again @ronag if the general direction seems to be correct? |
Sorry, something went wrong.
|
Just took a very quick look but it seems to be right general direction. |
Sorry, something went wrong.
|
Reopening for review all the tests passing! |
Sorry, something went wrong.
There was a problem hiding this comment.
I would make two separate pump functions.
Sorry, something went wrong.
|
Ok refactoring |
Sorry, something went wrong.
The code would be duplicated no? |
Sorry, something went wrong.
|
Have updated to use a separate function |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
Sorry, something went wrong.
| }); | ||
| const ws = new WritableStream({ | ||
| write(chunk) { | ||
| values.push(chunk?.toString()); |
There was a problem hiding this comment.
Nit: since the test is only pushing strings through, perhaps just simply values.push(chunk) ?
Sorry, something went wrong.
There was a problem hiding this comment.
sure updating
Sorry, something went wrong.
There was a problem hiding this comment.
Fixed
Sorry, something went wrong.
Sorry, something went wrong.
|
This one had taken quite some trial and error! |
Sorry, something went wrong.
Refs: nodejs#39316 PR-URL: nodejs#46307 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
| Back | FazBrowse Home | New Git URL |
Added support to using pipeline() for webstreams and added tests for both webstreams and mixture of node streams and webstreams with pipeline
Refs: #39316