Skip to content

streams: remove unnecessary check#63030

Open
aduh95 wants to merge 1 commit intonodejs:mainfrom
aduh95:remove-needless-check
Open

streams: remove unnecessary check#63030
aduh95 wants to merge 1 commit intonodejs:mainfrom
aduh95:remove-needless-check

Conversation

@aduh95
Copy link
Copy Markdown
Contributor

@aduh95 aduh95 commented Apr 29, 2026

+size coerces the a number, so there's no case where its typeof wouldn't be a number.

Also, keep a reference to the original size to return in the RangeError for better UX.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. web streams labels Apr 29, 2026
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95 aduh95 force-pushed the remove-needless-check branch from 491fa52 to cb5d3a5 Compare April 29, 2026 09:36
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63030      +/-   ##
==========================================
- Coverage   89.65%   89.65%   -0.01%     
==========================================
  Files         708      708              
  Lines      220374   220373       -1     
  Branches    42264    42266       +2     
==========================================
- Hits       197584   197576       -8     
- Misses      14656    14670      +14     
+ Partials     8134     8127       -7     
Files with missing lines Coverage Δ
lib/internal/webstreams/util.js 99.55% <100.00%> (-0.01%) ⬇️

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

2 participants