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

Merged
merged 1 commit into from
Jun 17, 2025
Merged

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

This comment was marked as outdated.

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 200 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.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@LiviaMedeiros LiviaMedeiros added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 6, 2025
@LiviaMedeiros LiviaMedeiros added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 17, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 17, 2025
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/58418
✔  Done loading data for nodejs/node/pull/58418
----------------------------------- PR info ------------------------------------
Title      fs: remove IIFE in glob (#58418)
Author     Livia Medeiros <livia@cirno.name> (@LiviaMedeiros)
Branch     LiviaMedeiros:fs-glob-no-iife -> nodejs:main
Labels     fs, author ready, needs-ci
Commits    4
 - fs: remove IIFE in glob
 - squash: remove obsolete comment
 - squash: add test
 - squash: simplify test
Committers 1
 - LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/58418
Refs: https://github.com/nodejs/node/issues/58419
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/58418
Refs: https://github.com/nodejs/node/issues/58419
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Thu, 22 May 2025 09:36:40 GMT
   ✔  Approvals: 1
   ✔  - Zeyu "Alex" Yang (@himself65): https://github.com/nodejs/node/pull/58418#pullrequestreview-2898789800
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-06-06T06:03:35Z: https://ci.nodejs.org/job/node-test-pull-request/67290/
- Querying data for job/node-test-pull-request/67290/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 58418
From https://github.com/nodejs/node
 * branch                  refs/pull/58418/merge -> FETCH_HEAD
✔  Fetched commits as ef2e0848ba36..8b29b1401c4f
--------------------------------------------------------------------------------
[main d0febdb384] fs: remove IIFE in glob
 Author: LiviaMedeiros <livia@cirno.name>
 Date: Wed May 21 20:49:42 2025 +0800
 1 file changed, 6 insertions(+), 8 deletions(-)
[main 736ad5e41f] squash: remove obsolete comment
 Author: LiviaMedeiros <livia@cirno.name>
 Date: Thu May 22 17:33:44 2025 +0800
 1 file changed, 1 deletion(-)
[main f2a28abd23] squash: add test
 Author: LiviaMedeiros <livia@cirno.name>
 Date: Thu May 22 17:34:33 2025 +0800
 1 file changed, 21 insertions(+)
 create mode 100644 test/parallel/test-fs-glob-throw.mjs
[main 7e18d51696] squash: simplify test
 Author: LiviaMedeiros <livia@cirno.name>
 Date: Thu May 22 17:51:27 2025 +0800
 1 file changed, 3 insertions(+), 8 deletions(-)
   ✔  Patches applied
There are 4 commits in the PR. Attempting autorebase.
Rebasing (2/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
fs: remove IIFE in glob

PR-URL: #58418
Refs: #58419
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>

[detached HEAD e0826101c2] fs: remove IIFE in glob
Author: LiviaMedeiros <livia@cirno.name>
Date: Wed May 21 20:49:42 2025 +0800
1 file changed, 6 insertions(+), 8 deletions(-)
Rebasing (3/8)
Rebasing (4/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
squash: remove obsolete comment

PR-URL: #58418
Refs: #58419
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>

[detached HEAD 381d4b113b] squash: remove obsolete comment
Author: LiviaMedeiros <livia@cirno.name>
Date: Thu May 22 17:33:44 2025 +0800
1 file changed, 1 deletion(-)
Rebasing (5/8)
Rebasing (6/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
squash: add test

PR-URL: #58418
Refs: #58419
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>

[detached HEAD 1438ac8a3a] squash: add test
Author: LiviaMedeiros <livia@cirno.name>
Date: Thu May 22 17:34:33 2025 +0800
1 file changed, 21 insertions(+)
create mode 100644 test/parallel/test-fs-glob-throw.mjs
Rebasing (7/8)
Rebasing (8/8)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
squash: simplify test

PR-URL: #58418
Refs: #58419
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>

[detached HEAD 568de725f0] squash: simplify test
Author: LiviaMedeiros <livia@cirno.name>
Date: Thu May 22 17:51:27 2025 +0800
1 file changed, 3 insertions(+), 8 deletions(-)
Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/15714419655

PR-URL: nodejs#58418
Refs: nodejs#58419
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
@LiviaMedeiros LiviaMedeiros merged commit 5584cc5 into nodejs:main Jun 17, 2025
19 checks passed
@LiviaMedeiros
Copy link
Member Author

Landed in 5584cc5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. 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.

5 participants