fs: fix glob early return skipping sibling entries#62901
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62901 +/- ##
==========================================
- Coverage 91.55% 89.65% -1.90%
==========================================
Files 355 708 +353
Lines 149381 220407 +71026
Branches 23364 42272 +18908
==========================================
+ Hits 136765 197614 +60849
- Misses 12354 14655 +2301
- Partials 262 8138 +7876
π New features to boost your workflow:
|
cde04e4 to
91565af
Compare
Signed-off-by: semimikoh <ejffjeosms@gmail.com>
91565af to
4f3a919
Compare
|
@ZYSzys Could you re-run CI on this when you get a chance? π |
Failed to start CI- Validating Jenkins credentials β Jenkins credentials valid - Querying data for job/node-test-pull-request/72881/ [SyntaxError: Unexpected token '<', ..." https://github.com/nodejs/node/actions/runs/27184867612 |
|
@ZYSzys could you run CI on this? |
Failed to start CI- Validating Jenkins credentials β Jenkins credentials valid - Querying data for job/node-test-pull-request/72881/ [SyntaxError: Unexpected token '<', ..." https://github.com/nodejs/node/actions/runs/28997064065 |
|
Hi @semimikoh, are you still working on this? It looks like CI hasn't passed and there's been no activity for a while. If you don't have time to continue, I'd be happy to take this over and finish the fix (with credit to your work here). Thanks! |
|
@trivikr Sure, feel free to take it over and continue the work. Thanks! |
|
Thanks @semimikoh Just to confirm I think you meant me (@webdevelopersrinu), as I'm the one who asked above π. I'll take this over, keep your work credited with Co-authored-by, and open a PR with the fix + regression test + green CI. |
Summary
cache.seencheck from children iteration loop in#addSubpatterns(sync) and#iterateSubpatterns(async)returninside the loop exits the entire method, skipping all remaining siblingscache.addat the top of each method already prevents reprocessing and infinite recursionFixes: #62897
Test plan
test-fs-glob.mjsmultiple times to verify flakiness is resolved