-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
refactor(pluginutils): replace micromatch with more lightweight picomatch. #306
Conversation
This reduces dependency size.
Thanks for suggesting this. The one big hangup for me right now is that I don't want plugins to be in the business of maintaining types for dependencies. That's ripe for technical debt. If the picomatch folks don't respond over the next few days, I would suggest adding those types to https://github.com/DefinitelyTyped/DefinitelyTyped/. If they get published there or in picomatch itself, then I'm all about merging this. |
Alright, I understand that. I'll add the types to DefinitelyTyped if they don't respond. |
@Patcher56 We're still open to this change. Any word on the types situation? |
Unfortunately no comment on the picomatch pull request. I am very busy at work rn, but will add the types to DefinitelyTyped on weekend. After that we can we remove the type declarations from this PR. Is this ok for you? Edit: Just opened a PR to DefinitelyTyped. DefinitelyTyped/DefinitelyTyped#44221 |
I just replaced the picomatch.d.ts file with the newly created @types/picomatch package. |
Thanks! I'll take care of that lock file mismatch for you a little later today (that's my plan anyhow) and we'll merge this. |
* Replace micromatch with more lightweight picomatch. This reduces dependency size. * pluginutils: replace picomatch types with @types/picomatch. * chore: update pnpm lock Co-authored-by: shellscape <andrew@shellscape.org>
Rollup Plugin Name:
pluginutils
This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description
This just replaces
micromatch
dependency with thepicomatch
package.picomatch
is part ofmicromatch
and thepluginutils
-plugin only uses thematcher
function which is the same as usingpicomatch
directly (See https://github.com/micromatch/micromatch/blob/master/index.js#L104).This reduces dependency size.
Also added custom types until
picomatch
adds types on it's own. (See micromatch/picomatch#53 (comment))