A CLI toolset (v0.6.1) to automate common code migration tasks: adding extensions to relative imports (e.g., converting `./file` to `./file.js`), migrating Jest test constructs to Vitest (replacing `jest.fn()` with `vi.fn()`), and renaming file extensions (e.g., `.js` → `.cjs`). Designed for Node.js 18+ with a file-based scope; output may not be 100% accurate—always review changes. Lightweight alternative to codemods or jscodeshift for these specific patterns.
npm install code-migration-helpersNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Three common usage patterns: add extensions, migrate Jest to Vitest, rename file extensions.
Work on a separate branch without existing changes so you can revert if needed.
Use `--from` and `--to` filters to limit scope.
Use `npx code-migration-helpers rename-ext -f=... --from=... --to=...`
Run `npm install code-migration-helpers -D` first, then use `npx code-migration-helpers`.
Ensure the path exists and contains relevant files. Use absolute or relative paths correctly.
Upgrade Node.js to 18 or later.
No dependency data recorded yet.