lib: narrow ReadableStreamBYOBRequest.view return type to Uint8Array#63017
lib: narrow ReadableStreamBYOBRequest.view return type to Uint8Array#63017Jah-yee wants to merge 1 commit intonodejs:mainfrom
Conversation
|
Hi @MattiasBuelens, thank you for your review on #62958! π This PR replaces #62958 with the corrected commit message (per your feedback on the line-length lint issue β the commit message was adjusted accordingly). The change is identical: a 1-line JSDoc type narrowing from The CI checks were cancelled (not failed) and appear to be pending. Could you please review this PR when you have a moment? Happy to address any feedback. Also tagging @gurgunday β thank you for the earlier feedback on #62958 as well! π |
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63017 +/- ##
==========================================
- Coverage 89.65% 89.65% -0.01%
==========================================
Files 708 708
Lines 220374 220374
Branches 42264 42265 +1
==========================================
- Hits 197584 197570 -14
+ Misses 14656 14651 -5
- Partials 8134 8153 +19
π New features to boost your workflow:
|
|
Your commit message still doesn't pass all checks. Note that we recently added a new requirement that requires all commits to have a You can run these checks locally before pushing by using core-validate-commit. For example: git rev-parse HEAD | npx core-validate-commitYou can update your commit message with If you're not sure how to do this, just let us know. We're here to help you, or we can do it for you if needed. π |
|
Thank you so much for the detailed guidance! π I'll fix the commit message with the line and force-push to update this PR directly β no need to open a new PR. Will update shortly. |
|
Thank you so much for the detailed guidance! π I will fix the commit message with the Signed-off-by line and force-push to update this PR directly β no need to open a new PR. Will update shortly. |
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 per the updated spec. Fixes: nodejs#62952 Signed-off-by: Jah-yee <166608075+Jah-yee@users.noreply.github.com>
e6b5c86 to
8cdb57e
Compare
|
Thanks for the review! I've added the Signed-off-by line to the commit message per the contributor guidelines (point 6). The commit now includes: Commit SHA updated: |
Description
Follow WHATWG streams spec update: whatwg/streams#1367
ReadableStreamBYOBRequest.viewis always constructed as aUint8Array, and the specification will be updated to enforce this. This changes the documented return type fromArrayBufferViewtoUint8Array.Fix
Changed the JSDoc type annotation for
viewgetter from@type {ArrayBufferView}to@type {Uint8Array}inlib/internal/webstreams/readablestream.js.Relation to #62958
This PR replaces #62958, which was closed after the commit message lint check failed. The commit message was corrected (per feedback from @MattiasBuelens) and resubmitted as this new PR with the fix already applied.
Fixes #62952