feat(Codemod) : Preact Migrations vX
📚This codemod automates the migration process from Preact versions earlier than 8 to the latest version (vX), ensuring compatibility and streamlining the upgrade.
- [x] Tests for the changes have been added (for bug fixes/features)
- [x] Docs have been added / updated (for bug fixes / features)
@manishjha-04 is attempting to deploy a commit to the Codemod Team on Vercel.
A member of the Team first needs to authorize it.
Hi @manishjha-04 this is awesome! Do you have some repos in mind we can use for testing before merging?
@all-contributors add @manishjha-04 for code
Yeah Hii @mohab-sameh
I do have a couple of repositories you can check out: Nectarine and Spotifio-UI. Depending on the code, you might find that different codemods are needed for each.
You can use the migration recipe codemod preact/X/migration-recipe on them, as the required updates may vary for each.
Great work Manish, have you tested on these repos already?
Yup @arshcodemod !
@manishjha-04 I'm trying to see if there are more popular test repo candidates so that you get the spotlight for a high-impact change. Something that has a large following (stars) and has active maintainers. Ideally, the recipe can open a PR for a popular tool that uses Preact < 8 to the latest version. People will thank you for that.
Do you have candidates in mind we can do this for?
Hey @mohab-sameh Let me look into it and will let you know if i found the one! But surely next time will try to pick a framework which has latest updates so that we could have a wider reach!
I do have a couple of repositories you can check out: Nectarine and Spotifio-UI. Depending on the code, you might find that different codemods are needed for each.
The latter, "Spotifio-UI", is made with Deno's Fresh, which is only 3-ish years old; Fresh only supports Preact X, as X was pretty mature by the time it (Fresh) was created, and it (Fresh) requires APIs that weren't available in 8.
I'm not quite sure what codemods you run against that project, given it's already running & using the target version?