GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stream: reject nested async streamables in from() by trivikr · Pull Request #64352 · nodejs/node

Conversation

@trivikr

@trivikr trivikr commented Jul 8, 2026

Copy link
Copy Markdown
Member

Fixes: #64351

This updates stream/iter.from() so the sync-iterable fallback rejects
nested async-only streamables. When from() consumes a sync iterable, nested
async iterables and toAsyncStreamable values now throw
ERR_INVALID_ARG_TYPE instead of being consumed.

Promise values yielded by sync iterables are still awaited.


Assisted-by: openai:gpt-5.5

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@trivikr
stream: reject nested async streamables in from()
2e3bde5
Reject nested async iterables and toAsyncStreamable values when from()
is consuming a sync iterable source. Promise values are still awaited.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: openai:gpt-5.5
@nodejs-github-bot

nodejs-github-bot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to Node.js streams. labels Jul 8, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 8, 2026
@codecov

codecov Bot commented Jul 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.23%. Comparing base (8e1ab55) to head (2e3bde5).
⚠️ Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/streams/iter/from.js 77.77% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #64352   +/-   ##
=======================================
  Coverage   90.23%   90.23%           
=======================================
  Files         741      741           
  Lines      240979   240988    +9     
  Branches    45395    45409   +14     
=======================================
+ Hits       217450   217464   +14     
  Misses      15112    15112           
+ Partials     8417     8412    -5     
Files with missing lines Coverage Δ
lib/internal/streams/iter/from.js 88.25% <77.77%> (+0.16%) ⬆️

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Jul 8, 2026
View reviewed changes
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 8, 2026
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

nodejs-github-bot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/74672/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr trivikr added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jul 8, 2026
mcollina
mcollina approved these changes Jul 9, 2026
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mcollina mcollina added the commit-queue PRs queued for automated landing through the Commit Queue. label Jul 9, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jul 10, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 4140d4c into nodejs:main Jul 10, 2026
85 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Landed in 4140d4c

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr
trivikr deleted the stream-iter-from-async-generator branch July 13, 2026 05:14
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
@trivikr @aduh95
stream: reject nested async streamables in from()
9bb5f8a
Reject nested async iterables and toAsyncStreamable values when from()
is consuming a sync iterable source. Promise values are still awaited.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: openai:gpt-5.5
PR-URL: #64352
Fixes: #64351
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jul 21, 2026
2026-07-22, Version 26.6.0 (Current) #64655
Merged
RafaelGSS pushed a commit that referenced this pull request Jul 29, 2026
@trivikr @RafaelGSS
stream: reject nested async streamables in from()
f29937d
Reject nested async iterables and toAsyncStreamable values when from()
is consuming a sync iterable source. Promise values are still awaited.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: openai:gpt-5.5
PR-URL: #64352
Fixes: #64351
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 6, 2026
@trivikr @aduh95
stream: reject nested async streamables in from()
9c9ade3
Reject nested async iterables and toAsyncStreamable values when from()
is consuming a sync iterable source. Promise values are still awaited.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: openai:gpt-5.5
PR-URL: #64352
Fixes: #64351
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@github-actions github-actions Bot mentioned this pull request Aug 21, 2026
2026-08-26, Version 24.20.0 'Krypton' (LTS) #65461
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. stream Issues and PRs related to Node.js streams.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

stream/iter: from() accepts async-only nested values from sync iterables

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@trivikr @nodejs-github-bot @mcollina @jasnell
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.