-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Add codemod for v1 to v2 migration #5038
Comments
I love codemods, it's like having magic wizards in my computer. It might not be practical to have codemods for every change, but the more the better. I'd guess the codemod writing process would be:
|
Seems facebook is working on a nice interactive version of codemod |
I started my site on https://github.com/rdela/rdela.com https://github.com/KyleAMathews/blog/tree/gatsby-v2-canary?files=1 https://github.com/KyleAMathews/blog/pull/21/files https://twitter.com/kylemathews/status/954905518874664960?s=20 |
Inspiring prior art https://svelte.technology/blog/version-2 |
Everything from here down in this PR seems relevant |
Particularly this PR where Kyle updates his blog I remember the Need to dig into both of those PRs more; unsure currently about how |
Taking a look through the migration guide, things it might possible to codemod are: |
I'll give |
Doing another - |
@tsriram that would be great :) I'm not even 100% sure if you get file name, but if you do, you may want to restrict it to only certain files where that's valid. But looking forward to it! |
@pieh that's what I get for scrolling through the feed and replying before I get all the way to the bottom 😛 Commented on it :) |
I think we can call this done. Thanks folks :) |
It would make upgrading much easier if users could run a codemod to convert any breaking changes programatically.
Some things to consider/questions to be answered:
The text was updated successfully, but these errors were encountered: