Reduce dependencies by switching to picomatch
This has a few advantages:
- Removed 5 dependencies and 3 maintainers from dependency tree to reduce supply chain risk and number of deprecation and security warnings (e.g. from
braceswhich has had a few) micromatchis stuck back onpicomatchversion 2 whereas this lets us use the latest version
picomatch supports all the same exact syntax as micromatch except for ranges (e.g. {01..03}) and increments (e.g. {2..10..2}). I've switched tons 25m downloads/week worth of projects from micromatch to picomatch and have yet to run into a single person who has been using either of these globbing syntaxes.
Looks like this would lose support for brace expansion: https://github.com/micromatch/picomatch?tab=readme-ov-file#library-comparisons so I guess it would be a breaking change.
Not all brace expansion, but ranges (e.g. {01..03}) and increments (e.g. {2..10..2}). Yeah, technically it would be a breaking change. I doubt anyone would be affected, but it's safer to call it one I guess
We just use .makeRe method in micromatch which is have same behavior with .makeRe in picomatch.
We just use
.makeRemethod inmicromatchwhich is have same behavior with.makeReinpicomatch.
@devongovett, you can see this.
from micromatch source file
// ...
const picomatch = require('picomatch');
// ...
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
// ...