Skip to content

fs: remove IIFE in glob #58418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

LiviaMedeiros
Copy link
Member

@LiviaMedeiros LiviaMedeiros commented May 22, 2025

Refs: #58419

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels May 22, 2025
@@ -3171,15 +3172,11 @@ function glob(pattern, options, callback) {
callback = makeCallback(callback);

const Glob = lazyGlob();
// TODO: Use iterator helpers when available
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: this TODO was added in 151d365 and already resolved in 090add7

@nodejs-github-bot
Copy link
Collaborator

callback(err);
}
})();
PromisePrototypeThen(
Copy link
Member

Choose a reason for hiding this comment

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

Where is the catch?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the second argument to then():

node/lib/fs.js

Line 3178 in 8b29b14

callback,

Copy link

codecov bot commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.19%. Comparing base (0e72f3b) to head (8b29b14).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58418      +/-   ##
==========================================
- Coverage   90.21%   90.19%   -0.02%     
==========================================
  Files         635      635              
  Lines      187171   187168       -3     
  Branches    36751    36752       +1     
==========================================
- Hits       168856   168825      -31     
- Misses      11081    11126      +45     
+ Partials     7234     7217      -17     
Files with missing lines Coverage Δ
lib/fs.js 98.26% <100.00%> (-0.01%) ⬇️

... and 32 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
fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants