@volue/wave-codemod__react
Codemods for migration to the newer version of the @volue/wave-react
library.
These codemods utilize jscodeshift library for transformations and Hypermod.io CLI tool for downloading and running them against your codebase.
Install
No installation of this package is necessary.
Downloading and running codemods can be done via npx @hypermod/cli
.
Usage
Considerations
- You should run codemods on a separate Git branch, then manually review the changes before deploying them.
- Codemods are designed to do the heavy lifting, but they may not be perfect, so some manual work may still be required in order to successfully migrate.
- Codemods might output code that doesn’t follow your coding style. Make sure to run your code formatter and/or linter before committing the changes.
Examples
Running the following command will print a list of all version transforms to choose form:
npx @hypermod/cli --experimental-loader --packages @volue/wave-codemod__react /project/src/**/*.tsx
To run a transform for version 1.0.0
of @volue/wave-react
, use one of the following commands:
npx @hypermod/cli --experimental-loader --packages @volue/wave-codemod__react@1.0.0 /project/src/**/*.tsx
npx @hypermod/cli --experimental-loader --packages @volue/wave-codemod__react@1.0.0 /project/src/path/to/file
To run all transforms for @volue/wave-react
in sequence from version 1.0.0
to the latest, add --sequence
flag:
npx @hypermod/cli --sequence --packages @volue/wave-codemod__react@1.0.0 /project/src/**/*.tsx
See the Hypermod CLI docs for more information and examples