Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a replacements CLI #130

Open
43081j opened this issue Aug 1, 2024 · 1 comment
Open

Creating a replacements CLI #130

43081j opened this issue Aug 1, 2024 · 1 comment

Comments

@43081j
Copy link
Contributor

43081j commented Aug 1, 2024

At some point, it seems to make sense we create a CLI to make use of the various projects in this org.

A short list of what would be good to have:

  • Detect replaceable modules and warn/error when they are detected (same as the lint rule but via a CLI, for those who don't have ESLint)
  • Provide a --fix flag or similar which will attempt to auto-replace these modules via codemods
    • This could have an interactive mode too to choose which ones to replace, or "all"
  • Automatically update package.json to remove the target modules and execute an npm i
    • Future feature: detect the package manager being used, and run that (via corepack?)
  • Provide a github action/workflow example which can run this (or a github bot/integration?)

It'd be very important to make the ux nice, so using something like clack to make it interactive would be good (when needed)

So a few gaps to fill:

  • Decide the scope of the CLI (anything more than the above?)
  • Decide a name

cc @thepassle

@thepassle
Copy link
Contributor

In the manifests we also have the node version for some of the packages, maybe it would be cool to optionally be able to specify a minimum node version you need to support (but by default apply all codemods when using --fix)

But I also think the scope as you defined it is good enough to start building it

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

No branches or pull requests

2 participants