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

feat(Codemod) : Preact Migrations vX #1262

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

manishjha-04
Copy link
Contributor

📚This codemod automates the migration process from Preact versions earlier than 8 to the latest version (vX), ensuring compatibility and streamlining the upgrade.

  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)

Copy link

vercel bot commented Aug 21, 2024

@manishjha-04 is attempting to deploy a commit to the Codemod Team on Vercel.

A member of the Team first needs to authorize it.

@mohab-sameh
Copy link
Contributor

Hi @manishjha-04 this is awesome! Do you have some repos in mind we can use for testing before merging?

@mohab-sameh
Copy link
Contributor

@all-contributors add @manishjha-04 for code

Copy link
Contributor

@mohab-sameh

I've put up a pull request to add @manishjha-04! 🎉

@manishjha-04
Copy link
Contributor Author

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.

@arshcodemod
Copy link
Contributor

Great work Manish, have you tested on these repos already?

@manishjha-04
Copy link
Contributor Author

Yup @arshcodemod !

@mohab-sameh
Copy link
Contributor

@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?

@manishjha-04
Copy link
Contributor Author

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!

@rschristian
Copy link

rschristian commented Aug 30, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants