Skip to content
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

replace glob with faster approach #278

Merged

Conversation

SuperchupuDev
Copy link
Contributor

@SuperchupuDev SuperchupuDev commented Jun 30, 2024

replaces the usage of glob with fdir and picomatch.

glob uses 27 whole subdependencies, making it far from ideal. fdir and picomatch have both a total of zero (0) subdependencies, making this not just a faster approach, but also one that's way lighter. this makes dotenvx go from 150 subdependencies down to 127 131.

the testing arrays only changed in order, they contain exactly the same elements, it looks like fdir sorts them slightly different than glob.

i couldn't have done this without the help of the e18e server, props to everyone involved for fighting for a more optimized js future :-)

@SuperchupuDev
Copy link
Contributor Author

created branch from an outdated one, trying to fix...

@SuperchupuDev SuperchupuDev force-pushed the refactor/replace-glob-with-fdir branch 2 times, most recently from 6d2b76f to 0465a6e Compare June 30, 2024 00:30
@SuperchupuDev SuperchupuDev force-pushed the refactor/replace-glob-with-fdir branch from 0465a6e to 46626ed Compare June 30, 2024 00:35
@SuperchupuDev
Copy link
Contributor Author

fixed :)

@motdotla
Copy link
Contributor

better sorting than glob as well. thanks!

@motdotla motdotla merged commit 89aebeb into dotenvx:main Jun 30, 2024
20 checks passed
@SuperchupuDev SuperchupuDev deleted the refactor/replace-glob-with-fdir branch June 30, 2024 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants