Skip to content

stream: avoid constructing extra promise in createPromiseCallback#63064

Draft
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:fewer-promises
Draft

stream: avoid constructing extra promise in createPromiseCallback#63064
aduh95 wants to merge 2 commits intonodejs:mainfrom
aduh95:fewer-promises

Conversation

@aduh95
Copy link
Copy Markdown
Contributor

@aduh95 aduh95 commented May 1, 2026

Looking at the spec, I'm not sure Promise.try actually avoids the extra promise allocation, converting to draft for now

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. web streams labels May 1, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.66%. Comparing base (66054cc) to head (3baa019).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/webstreams/util.js 76.92% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63064      +/-   ##
==========================================
- Coverage   91.48%   89.66%   -1.83%     
==========================================
  Files         358      712     +354     
  Lines      151591   220516   +68925     
  Branches    23925    42282   +18357     
==========================================
+ Hits       138690   197715   +59025     
- Misses      12625    14659    +2034     
- Partials      276     8142    +7866     
Files with missing lines Coverage Δ
lib/internal/per_context/primordials.js 99.20% <100.00%> (+17.14%) ⬆️
lib/internal/webstreams/util.js 98.33% <76.92%> (-1.23%) ⬇️

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

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95 aduh95 force-pushed the fewer-promises branch from 3baa019 to 67d1e1e Compare May 1, 2026 18:26
@aduh95 aduh95 marked this pull request as draft May 1, 2026 18:46
@aduh95 aduh95 requested a review from ljharb May 1, 2026 19:01
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