Uh oh!
There was an error while loading. Please reload this page.
stream: use validateNumber for BYOB reader options.min - #65014
Open
greenheadHQ wants to merge 1 commit into
Open
stream: use validateNumber for BYOB reader options.min#65014greenheadHQ wants to merge 1 commit into
greenheadHQ wants to merge 1 commit into
Conversation
greenheadHQforce-pushed
the
readablestream-validate-number
branch
from
August 4, 2026 14:16
b6208dc to
8416524CompareThe error thrown for a non-number min is unchanged. Signed-off-by: greenhead <shren0812@gmail.com>
greenheadHQforce-pushed
the
readablestream-validate-number
branch
from
August 4, 2026 14:21
8416524 to
6925505CompareCodecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #65014 +/- ##
==========================================
- Coverage 90.30% 90.28% -0.02%
==========================================
Files 759 759 Lines 247621 247634 +13 Branches 46672 46686 +14 ==========================================
- Hits 223603 223570 -33 - Misses 15473 15523 +50 + Partials 8545 8541 -4
🚀 New features to boost your workflow:
|
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 freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the open-coded typeof check for
options.mininReadableStreamBYOBReader.prototype.read()withvalidateNumber. Called without min/max bounds it performs the same check and constructsERR_INVALID_ARG_TYPEwith the same arguments, so the rejection type, code, and message are unchanged.The added test covers all three validation branches (type, integer/positive, out-of-range), which no existing test pinned, and passes with and without the lib change.