Skip to content

stream: accept callable iterator results - #67898

Open
dani7514 wants to merge 1 commit into
nodejs:mainfrom
dani7514:fix/webstream-callable-iterator-results
Open

dani7514 wants to merge 1 commit into
nodejs:mainfrom
dani7514:fix/webstream-callable-iterator-results

Conversation

@dani7514

Copy link
Copy Markdown

Fixes #67894

ReadableStream.from() rejected function objects returned by an iterator’s next() or return() method, even when they had the expected done and value properties. This change accepts function objects and still rejects null and primitive values.

I verified on Windows that reading and cancelling work with both sync and async iterators. This PR adds regression tests for all four cases. The full Node.js test suite has yet to run.

Assisted-by: Codex

Assisted-by: Codex
Signed-off-by: Daniel Misganaw <danielmisganaw192021@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. web streams Issues and PRs related to the Web Streams API. labels Nov 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

@dani7514
dani7514 marked this pull request as ready for review November 30, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. web streams Issues and PRs related to the Web Streams API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReadableStream.from() rejects callable iterator results

2 participants