summaryrefslogtreecommitdiff
path: root/lib/internal/streams/async_iterator.js
AgeCommit message (Collapse)Author
2018-11-29stream: make async iterator .next() always resolveMatteo Collina
See: https://github.com/nodejs/readable-stream/issues/387 PR-URL: https://github.com/nodejs/node/pull/24668 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-27stream: use arrow function for callbackDoiChris
In lib/internal/streams/async_iterator.js, use arrow function for callback. PR-URL: https://github.com/nodejs/node/pull/24609 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-10-28stream: do not error async iterators on destroy(null)Matteo Collina
Fixes: https://github.com/nodejs/node/issues/23890 PR-URL: https://github.com/nodejs/node/pull/23901 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-28stream: ended streams should resolve the async iterationMatteo Collina
Fixes: https://github.com/nodejs/node/issues/23891 PR-URL: https://github.com/nodejs/node/pull/23901 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-24stream: async iteration should work with destroyed streamMatteo Collina
Fixes https://github.com/nodejs/node/issues/23730. PR-URL: https://github.com/nodejs/node/pull/23785 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2018-10-08streams: refactor ReadableStream asyncIterator creation and a few fixesGus Caplan
Closes: https://github.com/nodejs/node/issues/23041 - Rewrite `ReadableAsyncIterator` class into `ReadableStreamAsyncIteratorPrototype` which contains no constructor and inherits from `%AsyncIteratorPrototype%`. - Rewrite `AsyncIteratorRecord` into dumb function. PR-URL: https://github.com/nodejs/node/pull/23042 Fixes: https://github.com/nodejs/node/issues/23041 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-29stream: fix error handling with async iterationJulien Fontanet
Fix an issue when an error was emitted by the stream before `iterator.next()` is called. PR-URL: https://github.com/nodejs/node/pull/20329 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-01-11stream: added experimental support for for-awaitMatteo Collina
Adds support for Symbol.asyncIterator into the Readable class. The stream is destroyed when the loop terminates with break or throw. Fixes: https://github.com/nodejs/node/issues/15709 PR-URL: https://github.com/nodejs/node/pull/17755 Fixes: https://github.com/nodejs/node/issues/15709 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>