-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Replacement for minimatch
#52779
Comments
can you give an example of your use case? |
Yes, something like this. E.g. in Vitest docs you can see an example of exclude property in config. If I want to implement a similar approach in my CLI utility that is written in Node, I need to filter out file names that provides Also, I am developing Karakum project. It also CLI util, I use it to convert Typescript definitions to Kotlin/JS definitions. And I also have a similar problem: I need to collect some files using globs, but then I need to ignore some of them (also using glob). Now I use glob and minimatch libraries for it. I considered using native Node API, but I realized that I don't have a replacement for minimatch. BTW, thanks for asking. |
@redyetidev are you interested in picking this up and adding a |
Sure! |
What is the problem this feature will solve?
It is great that now in Node 22 there is
fs.glob
. But it seems that also replacement forminimatch
is required. Otherwise, I don't know how to useexclude
function fromfs.glob
options, because it is a frequent scenario when I need to use some glob pattern to exclude files.What is the feature you are proposing to solve the problem?
I propose to export some helper that matches path string and glob pattern (maybe from
path
module).What alternatives have you considered?
The only alternative I see for now is use
minimatch
package (or package that similar to it).The text was updated successfully, but these errors were encountered: