Skip to content

stream: skip null output from stateful transforms#64462

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-stateful-stream-transform-null
Open

stream: skip null output from stateful transforms#64462
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-stateful-stream-transform-null

Conversation

@trivikr

@trivikr trivikr commented Jul 12, 2026

Copy link
Copy Markdown
Member

Fixes: #64461

Stateful transforms currently pass null output to the flattening
helpers, causing ERR_INVALID_ARG_TYPE. Transform output
normalization defines null as no output.

Skip null before flattening stateful transform output in both the
sync and async paths.

Treat null yielded by sync and async stateful transforms as no output,
consistent with transform normalization semantics.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels Jul 12, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 12, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 12, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr trivikr added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 12, 2026
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.24%. Comparing base (14166a5) to head (3c2ae5a).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64462      +/-   ##
==========================================
+ Coverage   90.23%   90.24%   +0.01%     
==========================================
  Files         741      741              
  Lines      241375   241606     +231     
  Branches    45483    45536      +53     
==========================================
+ Hits       217800   218036     +236     
+ Misses      15129    15109      -20     
- Partials     8446     8461      +15     
Files with missing lines Coverage Δ
lib/internal/streams/iter/pull.js 83.89% <100.00%> (+0.03%) ⬆️

... and 35 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream/iter: stateful stream transforms reject null output instead of emitting empty Uint8Array

3 participants