Skip to content

chore(codemod): Replace deprecated deps with native alternatives#419

Merged
csandman merged 1 commit into
v5from
chore/codemod-dep-cleanup
May 27, 2026
Merged

chore(codemod): Replace deprecated deps with native alternatives#419
csandman merged 1 commit into
v5from
chore/codemod-dep-cleanup

Conversation

@csandman
Copy link
Copy Markdown
Owner

Summary

  • Remove execa, inquirer, meow, and is-git-clean (and all their transitive deprecated subdeps — cross-spawn-async etc.) — 52 packages total
  • Add commander for CLI parsing with auto-generated --help, and prompts as a lightweight replacement for inquirer
  • Inline git clean check using node:child_process execFileSync directly (same behavior as is-git-clean's sync path)
  • Replace execaSync with native spawnSync for the jscodeshift invocation
  • Add --parser=tsx flag to jscodeshift so TSX/JSX files are always parsed correctly

Test plan

  • npx crs-codemod --help shows correct usage output
  • npx crs-codemod v5 <path> runs without prompts
  • npx crs-codemod with no args shows interactive prompts
  • --dry, --print, --force, --run-in-band flags all pass through correctly
  • Running against a dirty git repo is rejected (unless --force)

🤖 Generated with Claude Code

- Remove `execa`, `inquirer`, `meow`, `is-git-clean` and all transitive deprecated deps (cross-spawn-async, etc.)
- Add `commander` (CLI parsing with auto-generated --help) and `prompts` (lightweight interactive prompts)
- Inline git clean check using node:child_process execFileSync instead of is-git-clean
- Replace execaSync with native spawnSync for jscodeshift invocation
- Add --parser=tsx flag to jscodeshift so TSX files are parsed correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

commit: 34e038b

@github-actions
Copy link
Copy Markdown

📊 Package size report   No changes

File Before After
Total (Includes all files) 155.6 kB 155.6 kB
Tarball size 31.3 kB 31.3 kB
Unchanged files
File Size
dist/index.d.mts 20.0 kB
dist/index.d.ts 20.0 kB
dist/index.js 33.1 kB
dist/index.mjs 31.5 kB
LICENSE.md 1.1 kB
package.json 2.4 kB
README.md 47.5 kB

🤖 This report was automatically generated by pkg-size-action

@csandman csandman merged commit 1f99261 into v5 May 27, 2026
7 checks passed
@csandman csandman deleted the chore/codemod-dep-cleanup branch May 27, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant