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

Intro #7

Open
hzoo opened this issue Feb 17, 2018 · 2 comments
Open

Intro #7

hzoo opened this issue Feb 17, 2018 · 2 comments
Labels
discussion help wanted Extra attention is needed

Comments

@hzoo
Copy link
Member

hzoo commented Feb 17, 2018

Hello everyone!

I'm writing down a lot of the todos just in the readme since this feels so early in the progress of this idea/tool. If we get closer we can start with individual issues, since I feel like we would just make 100 issues atm.

Philosophy

  • Works with one command npx babel-upgrade.
  • Have nice logging on what has changed, or suggestions where we can't guarantee the change is correct.
  • But allow configurability where useful
    • Allow option to specify paths for various things like source code/babelrc/package.json for fine-grained changed on specific workflows/projects. npx babel-upgrade babelrc=path packagejson=path?

Code

This is a codemod and also something you would ideally only run once on a codebase (at least for each upgrade).

  • Thus don't worry too much about doing something "slow" if the logic is simpler.
  • Needs to handle the base case, so we need testing to make sure it doesn't mess up anything it's not supposed to. Wrap any changes to the file in if checks, like if (package.dependencies) { package.dependencies = ... }
  • Organize the code in such a way that it's easy to add one-off changes, but having lots of tests/fixtures is fine.
@hzoo hzoo added the help wanted Extra attention is needed label Feb 19, 2018
@alexander-alvarez
Copy link

Hey, just wanted to reach out since I thought this was a great tool.

I wanted to make you aware of https://github.com/kellyselden/ember-cli-update to see if there is any knowledge sharing or inspiration that could occur.

@hzoo
Copy link
Member Author

hzoo commented Feb 21, 2018

cc @kellyselden on that. Right now we just manually modify package.json/config files which are all json. I just did string replacement for other files, and next I'll need to look into making some codemods like with babel-codemod regarding babel plugins and other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants