Skip to content

replace glob with faster approach#278

Merged
motdotla merged 1 commit intodotenvx:mainfrom
SuperchupuDev:refactor/replace-glob-with-fdir
Jun 30, 2024
Merged

replace glob with faster approach#278
motdotla merged 1 commit intodotenvx:mainfrom
SuperchupuDev:refactor/replace-glob-with-fdir

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
@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