Official MSW codemods to help users adopt new features and handle breaking changes with ease.
Community contributions are welcome and appreciated! Check open issues for codemods to build, or open a new one if something’s missing. See the contribution guide for details.
| Codemod | Description |
|---|---|
@mswjs/v3 |
Migrate from MSW v2 to v3 |
@mswjs/v2 |
Migrate from MSW v1 to v2 |
Caution
Codemods modify code! Run them only on Git-tracked files, and commit or stash changes first.
Recommended for the best UX. This downloads the package from the Registry.
npx codemod@latest <codemod-name>For example:
npx codemod@latest @mswjs/v3npx codemod workflow run -w /path/to/folder/containing/workflow.yamlNote
By default, codemods run in the current folder. Add -t /target/path to change it.
See the Codemod docs for all CLI commands and options.
MIT