-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
refactor: replace globby
with faster alternative
#1158
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
a4e4896
to
e5ea6d3
Compare
e5ea6d3
to
b55de45
Compare
b55de45
to
3492fbd
Compare
3492fbd
to
22fcc5c
Compare
22fcc5c
to
3e610e7
Compare
I think we can use fdir and picomatch to create a new library for lightweight glob, enhancing maintainability. |
the implementation here isnt big really, there's a pr in fdir to add a glob function method though (requiring a matcher function) that maybe could be used in the future. i dont really see a need of making it a lib if sometimes fdir is called in a way picomatch (therefore globbing) isnt even needed |
3e610e7
to
ff3acc0
Compare
🎉 This issue has been resolved in version 8.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
i am aware, when conflicts were solved, it looks like picomatch was updated to v4 which fdir's package.json doesn't allow. to fix this tsup must downgrade to picomatch v3 or fdir must release a new version which contains a fix i submitted a few days ago thecodrr/fdir#101 |
globby
has a count of 23 subdependencies, which is far from ideal for something as simple as globbing. This PR switches to a lighter and faster alternative usingfdir
andpicomatch
. They have both a total of zero (0) subdependencies, making this not just a faster approach, but also one that's way lighter.This makes tsup go from 102 subdependencies down to just 88.
Note: The patterns at
tsup/src/utils.ts
Lines 69 to 77 in 57a372b
globby
(or more specifically,fast-glob
which is used byglobby
) does. It has some behavior around negated patterns no other globbing library has.Relevant prior work: dotenvx/dotenvx#278