Files
node/lib
Trivikram Kamat 91b65a4fe8 stream: prefer sync iterator in fromSync
When an input provides Symbol.iterator, fromSync() should consume the
synchronous iterator instead of rejecting the input because it also
exposes an asynchronous or promise-like protocol.

Continue rejecting async-only iterables and promise/thenable-only
inputs, but allow sync iterables that also define Symbol.asyncIterator
or then().

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/64294
Fixes: https://github.com/nodejs/node/issues/64292
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-08 07:06:40 +00:00
..
…
…
…
2026-07-05 08:04:44 +00:00
…
2026-04-05 10:12:21 +00:00
2026-06-21 19:42:03 +00:00
2026-05-31 12:49:51 -07:00
2024-01-12 16:09:48 +00:00
2025-12-10 16:12:28 +00:00
2025-12-22 16:14:46 +00:00
2024-10-09 06:42:16 +00:00
2025-09-04 11:58:50 +00:00
2026-02-21 16:30:23 +00:00
2026-04-01 10:09:41 +00:00
2026-06-19 16:07:24 +02:00
2026-04-26 19:36:36 +00:00
2026-05-23 18:43:31 +00:00
2025-08-05 13:45:41 +00:00