Replace glob w/ fs.glob - #94
Open
ChristianMurphy wants to merge 1 commit into
Open
ChristianMurphy wants to merge 1 commit into
ChristianMurphy wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 23 23
Lines 3214 3206 -8
=========================================
- Hits 3214 3206 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial checklist
Description of changes
Closes #91.
This replaces the deprecated
glob@10withfs.globfrom Node.It needs a major release: the minimum Node version goes from 16 to 22.17, the first 22.x release where
fs.globis stable.lib/finder.jscallsfs.glob(pattern, {cwd}, callback)hasMagic, sonew Minimatch(pattern).hasMagic()decides what counts as a glob; with default options it is the same check as before, where\escapes the next characterlts/jodBehavior changes compared to
glob@10:glob@10followed one level of links, except under a leading**.So
**/*.mdgives the same results as before.But
*/readme.mdanddocs/**/*.mdno longer find files through a linked folder.A glob or path that names the link itself still works, because the engine then reads that folder
\is a path separator instead of an escape..that points back intocwdreports paths such as../dir/file.md;glob@10reportedfile.mdTypeError: fs.glob is not a functionI left out
followSymlinkson purpose.Node 22 ignores it.
On Node 24.16+, it follows links at every depth under
**.Then
**/*.mdwould crawl pnpm dependencies and process npm workspace packages twice.The install warning stays until wooorm/load-plugin#22 lands, because
load-pluginstill brings inglob@10through@npmcli/config.