GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — stream: implement ReadableStream.from by debadree25 · Pull Request #48395 · nodejs/node Conversation
|
|
cc @nodejs/whatwg-stream |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Also, would this need node tests too? or WPTs are enough? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can't this be an async function which would allow the catch to not exist nd the below return PromiseResolve() to just be a return etc?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hmm i think it could, let me make it so and see if the WPTs pass
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hey! updated this, the WPTs don't complain and reading the spec i doesn't seem to say anything about the function having to sync or async
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this is equivalent. I wanted the error handling to be very explicit in the reference implementation, but practical implementations can be more succinct. 🙂
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM (esp for a first version).
A few notes:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
where to check for this? should make a issue on the spec repo? maybe @MattiasBuelens can help? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
have addressed all the comments and will wait for some time if we would like to add .toWeb functionality like @benjamingr suggested |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I would recommend something like: // at the top-level // ideally, this is exported by `lib/internal/streams/readable.js` const originalReadableAsyncIterator = Readable.prototype[Symbol.asyncIterator]; // in readableStreamFromIterable if (iterable instanceof Readable && iterable[Symbol.asyncIterator] === originalReadableAsyncIterator) { return Readable.toWeb(iterable); } This way, you can be certain that you're dealing with an unmodified I also suggest you write additional tests with polluted |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hey one thing is it ok to export things from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
bfefd98 to
ef12c54
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hello everyone! I have reverted the change of toWeb for now (I shall do it in a follow up, since i was getting confused 😅) PTAL it seems ready to land! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in b361ad7 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Fixes: nodejs#48389 PR-URL: nodejs#48395 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Fixes: nodejs#48389 PR-URL: nodejs#48395 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Fixes: nodejs#48389 PR-URL: nodejs#48395 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Fixes: #48389 PR-URL: #48395 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Streams: supportReadableStream.from()
There was an error while loading. Please reload this page.