Commit Graph

10 Commits (4211ab56ccdb62b980f456cae34821e4622b40a2)

Author SHA1 Message Date
Debadree Chatterjee 23effb255e
stream: add pipeline() for webstreams
Refs: https://github.com/nodejs/node/issues/39316
PR-URL: https://github.com/nodejs/node/pull/46307
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-02-02 19:45:42 +00:00
Erick Wendel 5d0946ad0e
stream: fix readable stream as async iterator function
Since v19.2 it's not possible to use readableStreams
as async iterators (confirmed bug).
This patch fixes the problem by reading the Stream.Duplex property
from 'streams/duplex' instead of 'streams/legacy' module

Fixes: https://github.com/nodejs/node/issues/46141
PR-URL: https://github.com/nodejs/node/pull/46147
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-01-20 12:37:52 +00:00
Benjamin Gruenbaum d2ac192351
stream: add reduce
PR-URL: https://github.com/nodejs/node/pull/41669
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-30 14:07:32 +00:00
Robert Nagy 8ee4e672ec stream: pipeline with end option
Currently pipeline cannot fully replace pipe due
to the missing end option. This PR adds the end
option to the promisified pipeline method.

PR-URL: https://github.com/nodejs/node/pull/40886
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-22 10:52:23 +01:00
Robert Nagy c04d621ecc stream: add signal support to pipeline generators
Generators in pipeline must be able to be aborted or pipeline
can deadlock.

PR-URL: https://github.com/nodejs/node/pull/39067
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-25 17:44:28 +02:00
Robert Nagy bb275ef2a4 stream: unify stream utils
Unify stream helps into utils.

PR-URL: https://github.com/nodejs/node/pull/39294
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-11 10:40:30 +02:00
Joyee Cheung a4ea9fc48e
lib: remove unnecessary lazy loads
Now that more modules are included in the snapshot, it's not
necessary to lazy load them anymore

PR-URL: https://github.com/nodejs/node/pull/38737
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-05-27 21:46:48 +08:00
Rich Trott 1e34df139c stream: move duplicated code to an internal module
Create a utils module for isIterable(), isReadable(), and isStream().

PR-URL: https://github.com/nodejs/node/pull/37508
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-02-28 05:07:26 -08:00
Nitzan Uziely 38f6e5a789 stream: add AbortSignal to promisified pipeline
add support for AbortSignal to promisified pipeline.

Resolves: https://github.com/nodejs/node/issues/37321

PR-URL: https://github.com/nodejs/node/pull/37359
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-02-18 18:00:02 +02:00
rickyes 527e2147af stream: add promises version to utility functions
PR-URL: https://github.com/nodejs/node/pull/33991
Fixes: https://github.com/nodejs/node/issues/33582
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2020-07-09 09:12:19 +02:00