-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Enhancement: replace globby
with fast-glob
#9453
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
Comments
Ooh nice spot! I'm in favor of this personally. 👍 |
In case the proposal is accepted, I am wondering whether the change should be introduced to v8 only, or backport it to v7 as well. What do you think? |
Both libraries are quite large. What about using something smaller like Compare https://npmgraph.js.org/?q=fast-glob vs https://npmgraph.js.org/?q=fdir See rollup/plugins#1741 for an example of switching |
The user-land config of |
|
We (and the entire ecosystem really) won't drop node 18 till it's EOL - 2025-04-30. https://github.com/nodejs/Release?tab=readme-ov-file#release-schedule |
Also, there might be some behavior differences between |
just my two cents: after weeks of trying to replace globby with lighter alternatives i've published |
I don't really have a problem with switching out the underlying library for globbing. If we can make things faster and / or smaller without too much effort then happy for it to be done! |
Since finding the corresponding @benmccann What do you think? |
I've gotten the CI green now on #9878 based on including some of the changes from this PR. I think we could probably just merge that one since I didn't include the change from #9518 (comment) since it was unrelated to switching glob libraries. I could update my PR to include it if desired or maybe that PR could be updated to just have that change or the change could be submitted as a new PR |
|
While |
As a first step let's go to
In future I'm open to revisiting this and switching to |
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
typescript-estree
My proposal is suitable for this project
Description
Previously, typescript-eslint switched from
glob
toglobby
fortsconfig.json
file searching: #2418Under the hood,
globby
is powered byfast-glob
with extra features, but none of them are utilized by thetypescript-eslint
.Since the
typescript-eslint
doesn't utilize those extra features, I propose replacingglobby
withfast-glob
to reduce the installation size.Additional Info
The installation size difference
The installation size of
globby
is 605 KiB and 23 transitive dependencies are introduced, while the installation size offast-glob
is 503 KiB and 18 transitive dependencies are introduced.Proof of Concept
I've tested the proposal in my fork: SukkaW@0cec339 and all existing test cases are passed on my machine.
globby's extra features
Here is globby's feature description:
fast-glob
also has promise-based API, andtypescript-eslint
only uses the sync APIglobby
's multiple patterns support is powered byfast-glob
directly['foo*', '!foobar']
globby
's negated patterns support is also powered byfast-glob
directlyfoo → foo/**/*
typescript-eslint
doesn't rely on this feature since the exact matches oftsconfig.json
(-like) files are required.gitignore
and similar ignore config filestypescript-eslint
doesn't rely on this feature sinceglobby
disabled this feature by default andtypescript-eslint
doesn't enable it.cwd
typescript-eslint
passed the string path tocwd
, and we can use Node.js built-inurl.fileURLToPath
in case we encounter URLs in the future.The text was updated successfully, but these errors were encountered: