M

node/globmatch-native

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod automates the migration of glob-matching functions like minimatch, micromatch, and picomatch to Node.js's native matchesGlob support in LTS version 20.17.0.

Detailed Description

With Node.js 20.17.0 introducing experimental native support for glob matching, there's no longer a need to rely on third-party libraries like minimatch and micromatch. npx codemod node/globmatch-native simplifies the process of updating your codebase to leverage this new feature, ensuring more efficient and streamlined path matching without the overhead of additional dependencies. The tool automatically refactors your code, replacing instances of these libraries with the new native method, helping you keep your codebase up-to-date with the latest Node.js features.

Example

Before

ts

After

ts

Before

ts

After

ts

Ready to contribute?

Build your own codemod and share it with the community.