Skip to content

Conversation

@Renegade334
Copy link
Member

The webstreams standard uses the name readableType for a source property which specifies the type of the readable component of a constructed readable-writable pair.1 Although this is only future-proofed nomenclature at the moment, we should probably follow this convention here, for consistency and just in case we also need to support WritableStream types in the future.

This paradigm would also be consistent with Duplex.toWeb() taking readableStrategy and writableStrategy options in the future, if so desired.

Because Duplex.toWeb() is no longer marked as experimental, I believe that removing options.type entirely would need a full deprecation cycle, so I've just turned it into a silent alias for simplicity.

Refs: #58664

Footnotes

  1. https://streams.spec.whatwg.org/#dictdef-transformer

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. web streams labels Feb 2, 2026
@Renegade334 Renegade334 added the stream Issues and PRs related to the stream subsystem. label Feb 2, 2026
@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61632      +/-   ##
==========================================
+ Coverage   89.73%   89.75%   +0.01%     
==========================================
  Files         673      673              
  Lines      203948   203954       +6     
  Branches    39193    39194       +1     
==========================================
+ Hits       183022   183051      +29     
+ Misses      13240    13239       -1     
+ Partials     7686     7664      -22     
Files with missing lines Coverage Δ
lib/internal/webstreams/adapters.js 85.66% <100.00%> (+0.08%) ⬆️

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

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. stream Issues and PRs related to the stream subsystem. web streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants