Skip to content

Replace micromatch dependency with a lighter alternative #603

@trivikr

Description

@trivikr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions