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 micromatch dependency with a lighter alternative #603

Open
trivikr opened this issue Jul 15, 2024 · 0 comments
Open

Replace micromatch dependency with a lighter alternative #603

trivikr opened this issue Jul 15, 2024 · 0 comments

Comments

@trivikr
Copy link
Contributor

trivikr commented Jul 15, 2024

Is your feature request related to a problem? Please describe.

Recently, the Ecosystem Performance was formed to cleanup, speedup, levelup the JavaScript Ecosystem.
Socket Security team wrote a blog post about it https://socket.dev/blog/javascript-community-launches-e18e-initiative-to-improve-ecosystem-performance

On the e18e cleanup channel on Discord, multiple solutions are being discussed. One of them is to replace micromatch with picomatch.

I see that jscodeshift uses micromatch

"micromatch": "^4.0.7",

Only isMatched API of micromatch is used, and it's called once to decide whether to ignore files

const matched = matchers.length ? mm.isMatch(path, matchers, { dot:true }) : false;

Describe the solution you'd like

Replace micromatch with a lighter alternative, like picomatch.

The micromatch@4.0.7 has publish size of 54.9 kB, and install size of 235 kB

Screenshot Screenshot 2024-07-15 at 1 10 36 PM

On other hand picomatch has install/publish size of 83.2 kB with no dependencies

Screenshot Screenshot 2024-07-15 at 1 11 59 PM

Npm Trends: https://npmtrends.com/micromatch-vs-picomatch

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

No branches or pull requests

1 participant