close
Skip to content

lib: narrow ReadableStreamBYOBRequest.view return type to Uint8Array#62958

Open
Jah-yee wants to merge 1 commit intonodejs:mainfrom
Jah-yee:fix/readablestreambyobrequeest-view-type
Open

lib: narrow ReadableStreamBYOBRequest.view return type to Uint8Array#62958
Jah-yee wants to merge 1 commit intonodejs:mainfrom
Jah-yee:fix/readablestreambyobrequeest-view-type

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 25, 2026

Description

Follow WHATWG streams spec update: whatwg/streams#1367

ReadableStreamBYOBRequest.view is always constructed as a Uint8Array, and the specification will be updated to enforce this. This changes the documented return type from ArrayBufferView to Uint8Array.

Fix

Changed the JSDoc type annotation for view getter from @type {ArrayBufferView} to @type {Uint8Array} in lib/internal/webstreams/readablestream.js.

Fixes #62952

Follow WHATWG streams spec update:
whatwg/streams#1367

ReadableStreamBYOBRequest.view is always constructed as a Uint8Array.
This changes the documented return type from ArrayBufferView to Uint8Array.

Fixes: nodejs#62952
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. web streams labels Apr 25, 2026
@Jah-yee
Copy link
Copy Markdown
Author

Jah-yee commented Apr 25, 2026

👋 Checking in — PR is a clean 1-line JSDoc type fix per WHATWG streams spec update. Happy to address any feedback or add tests. Thanks! 🙏

@Jah-yee
Copy link
Copy Markdown
Author

Jah-yee commented Apr 25, 2026

PR still active and ready for review. 🙏

@gurgunday
Copy link
Copy Markdown
Member

Hi, thanks for the PR

Please stop spamming, the maintainers will review it when they are free

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.66%. Comparing base (42a154b) to head (fb1859c).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62958      +/-   ##
==========================================
+ Coverage   89.64%   89.66%   +0.01%     
==========================================
  Files         706      706              
  Lines      219394   219394              
  Branches    42066    42066              
==========================================
+ Hits       196674   196710      +36     
+ Misses      14629    14584      -45     
- Partials     8091     8100       +9     
Files with missing lines Coverage Δ
lib/internal/webstreams/readablestream.js 98.54% <100.00%> (ø)

... and 34 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. web streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webstreams: narrow ReadableStreamBYOBRequest.view to Uint8Array

4 participants