Skip to content

stream: validate writer options signal#64385

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-writer-validate-options-signal
Open

stream: validate writer options signal#64385
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-writer-validate-options-signal

Conversation

@trivikr

@trivikr trivikr commented Jul 9, 2026

Copy link
Copy Markdown
Member

Fixes: #64384

stream/iterwriter methods now validateoptions.signal` consistently
before using or ignoring it.

This updates push, broadcast, and fromWritable writer write(),
writev(), and end() so invalid options.signal values throw
ERR_INVALID_ARG_TYPE instead of causing inconsistent behavior.


Assisted-by: openai:gpt-5.5

Validate options.signal for stream/iter writer write(), writev(),
and end() methods across push, broadcast, and fromWritable.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@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 9, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 9, 2026
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.25%. Comparing base (0032189) to head (a56cebf).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64385      +/-   ##
==========================================
+ Coverage   90.23%   90.25%   +0.02%     
==========================================
  Files         741      741              
  Lines      241194   241220      +26     
  Branches    45432    45424       -8     
==========================================
+ Hits       217640   217712      +72     
+ Misses      15129    15073      -56     
- Partials     8425     8435      +10     
Files with missing lines Coverage Δ
lib/internal/streams/iter/broadcast.js 85.99% <100.00%> (+0.03%) ⬆️
lib/internal/streams/iter/classic.js 89.32% <100.00%> (+0.06%) ⬆️
lib/internal/streams/iter/push.js 91.17% <100.00%> (+0.32%) ⬆️
lib/internal/streams/iter/utils.js 98.26% <100.00%> (+0.06%) ⬆️

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

needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream/iter: Writer methods do not consistently validate options.signal

2 participants