Skip to content

Conversation

JinhyeokFang
Copy link
Contributor

stream: replace manual function validation with validateFunction

Replace repetitive manual function type checking with the existing
validateFunction in multiple stream operator functions.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels Aug 19, 2025
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.87%. Comparing base (00a42d8) to head (c4e0bb4).
⚠️ Report is 121 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59529      +/-   ##
==========================================
+ Coverage   89.77%   89.87%   +0.09%     
==========================================
  Files         654      657       +3     
  Lines      192633   193397     +764     
  Branches    37727    37938     +211     
==========================================
+ Hits       172937   173810     +873     
+ Misses      12297    12084     -213     
- Partials     7399     7503     +104     
Files with missing lines Coverage Δ
lib/internal/streams/operators.js 96.43% <100.00%> (-0.13%) ⬇️

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

Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this was done on purpose so the error message includes AsyncFunction to make it clear those utils support callbacks returning a promise. I'm not against scraping that in the name of consistency, I just wanted to point it out in case that context was not known

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Replace repetitive manual function type checking with the existing
validateFunction in multiple stream operator functions.
@JinhyeokFang JinhyeokFang force-pushed the jinhyeokfang/validator branch from a5d0a92 to c4e0bb4 Compare August 19, 2025 13:37
@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@daeyeon daeyeon added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 30, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 30, 2025
@nodejs-github-bot nodejs-github-bot merged commit eefe3b1 into nodejs:main Aug 30, 2025
60 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in eefe3b1

targos pushed a commit that referenced this pull request Sep 4, 2025
Replace repetitive manual function type checking with the existing
validateFunction in multiple stream operator functions.

PR-URL: #59529
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mattias Buelens <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants