FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

stream: validate fromWritable() options before cache by trivikr · Pull Request #63278 · nodejs/node · GitHub

/ node Public

stream: validate fromWritable() options before cache - #63278

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:stream-iter-from-writable-cache-options
May 15, 2026
Merged

stream: validate fromWritable() options before cache#63278
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:stream-iter-from-writable-cache-options

Conversation

trivikr commented May 13, 2026

Copy link
Copy Markdown
Member

Fixes stream/iter fromWritable() cache handling so later options are
validated and applied correctly.

Previously, fromWritable(writable) cached a strict writer, and later calls
such as fromWritable(writable, { backpressure: 'drop-newest' }) returned that
cached strict writer before validating or applying the new options. This also
meant invalid later options did not throw.

This updates fromWritable() to validate options before cache lookup and cache
writers by both Writable instance and backpressure policy.

Fixes: #63277


Assisted-by: openai:gpt-5.5

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels May 13, 2026
trivikr force-pushed the stream-iter-from-writable-cache-options branch from 2785bd3 to eb326fb Compare May 13, 2026 07:56
trivikr self-assigned this May 13, 2026

codecov Bot commented May 13, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (2edd842) to head (6a2e3d3).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63278      +/-   ##
==========================================
+ Coverage   90.04%   90.05%   +0.01%     
==========================================
  Files         714      714              
  Lines      225338   225346       +8     
  Branches    42598    42613      +15     
==========================================
+ Hits       202897   202933      +36     
+ Misses      14236    14192      -44     
- Partials     8205     8221      +16     
Files with missing lines Coverage Δ
lib/internal/streams/iter/classic.js 89.44% <100.00%> (+0.09%) ⬆️

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

trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label May 13, 2026
Validate options before returning a cached fromWritable() adapter so
invalid later options still throw.

Cache adapters by backpressure policy as well as Writable instance,
since the policy changes write behavior.

Fixes: nodejs#63277

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
trivikr force-pushed the stream-iter-from-writable-cache-options branch from eb326fb to 6a2e3d3 Compare May 15, 2026 00:18
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 15, 2026

This comment was marked as outdated.

trivikr added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label May 15, 2026

Copy link
Copy Markdown
Collaborator

trivikr added the commit-queue Add this label to land a pull request using GitHub Actions. label May 15, 2026
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 15, 2026
nodejs-github-bot merged commit 2d6cbea into nodejs:main May 15, 2026
73 of 74 checks passed

Copy link
Copy Markdown
Collaborator

Landed in 2d6cbea

aduh95 pushed a commit that referenced this pull request May 19, 2026
Validate options before returning a cached fromWritable() adapter so
invalid later options still throw.

Cache adapters by backpressure policy as well as Writable instance,
since the policy changes write behavior.

Fixes: #63277

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: #63278
Fixes: #63277
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
aduh95 pushed a commit that referenced this pull request May 19, 2026
Validate options before returning a cached fromWritable() adapter so
invalid later options still throw.

Cache adapters by backpressure policy as well as Writable instance,
since the policy changes write behavior.

Fixes: #63277

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: #63278
Fixes: #63277
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
trivikr deleted the stream-iter-from-writable-cache-options branch May 27, 2026 07:49
aduh95 pushed a commit to aduh95/node that referenced this pull request Jul 30, 2026
Validate options before returning a cached fromWritable() adapter so
invalid later options still throw.

Cache adapters by backpressure policy as well as Writable instance,
since the policy changes write behavior.

Fixes: nodejs#63277

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: nodejs#63278
Fixes: nodejs#63277
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
aduh95 pushed a commit that referenced this pull request Aug 6, 2026
Validate options before returning a cached fromWritable() adapter so
invalid later options still throw.

Cache adapters by backpressure policy as well as Writable instance,
since the policy changes write behavior.

Fixes: #63277

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: #63278
Backport-PR-URL: #64675
Fixes: #63277
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 outstanding review comments, 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: fromWritable() cache ignores later options

4 participants


Back | FazBrowse Home | New Git URL