fs: apply function exclude to glob results#63049
fs: apply function exclude to glob results#63049Kelpy2004 wants to merge 1 commit intonodejs:mainfrom
Conversation
4882cfd to
de11752
Compare
|
I pushed an update that adds coverage for The currently visible GitHub Actions runs are all Local validation:
|
|
@mcollina when you have a moment, could you please take a look at this The GitHub Actions runs are currently waiting for maintainer approval on this forked PR, so a review/CI approval would be appreciated. Happy to adjust the patch if you prefer a different shape before merge. |
de11752 to
88d0ea5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63049 +/- ##
==========================================
+ Coverage 89.66% 89.68% +0.02%
==========================================
Files 706 713 +7
Lines 219370 224146 +4776
Branches 42065 42324 +259
==========================================
+ Hits 196694 201028 +4334
- Misses 14586 14952 +366
- Partials 8090 8166 +76
🚀 New features to boost your workflow:
|
88d0ea5 to
f8c0188
Compare
Signed-off-by: Aryan Katiyar <aryankatiyar613@gmail.com>
f8c0188 to
e3e82a2
Compare
|
@mcollina the two remaining GitHub Actions failures look unrelated to this patch:
Codecov reports the modified |
Function-form
excludecallbacks were applied while queuing subpatterns, but some terminal result paths were added directly to the result set. That meant files matched by terminal**or terminal child patterns could bypass anexclude(path)callback that matched the full relative path.For example,
globSync('**', { cwd, exclude: (path) => path === 'a/skip.txt' })could still includea/skip.txt.This routes result additions through a shared helper that applies function-form excludes before recording sync and async glob results, while preserving the existing array-exclude filtering in
ResultSet.Added coverage for:
fs.globSync()fs.glob()fs.promises.glob()**resultsValidation performed locally:
node --check lib/internal/fs/glob.jsnode --check test/parallel/test-fs-glob.mjsI could not run the patched Node test binary because this sparse checkout does not include a built local
nodeexecutable.