-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
docs: Codemods for Upgrading to fastify v5 #5717
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
base: main
Are you sure you want to change the base?
Conversation
|
Why is it still a draft? What are you testing these against? have you got a repo with all those breaking changes that I can test against? |
|
@mcollina these have been tested on https://github.com/fastify/fastify/tree/4.x. Here is the manishjha-04@0d7c3eb link to see. Will be marking it for review. |
|
Most of those seems incorrect, open a PR and I'll comment on them. |
|
Hi @mcollina, I’ve raised the PR. You might notice double semicolons in several places—this is an issue we're currently addressing with the Codemod . I would love to hear any feedback you have on other areas that may need modifications to improve the Codemod |
Signed-off-by: Manuel Spigolon <behemoth89@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, anything missing?
lgtm?
| > **Note**: Codemod to enhance route schemas with: | ||
| > | ||
| > ```bash | ||
| > npx codemod@latest fastify/5/route-schema-enhancement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this simple migration locally, but it does not kick in:
If I check the source code I can't find that code mode:
- here it is listed
- but here it is named in a different way:
fastify-3-querystring-schema-transformer
I think that if we merge this PR, users will complain that it won't work and we will unable to explain why
Could you help us to check these codemodes?

🚀 Feature Proposal
Codemods for Upgrading to fastify v5
Looking forward to add these and help Fastify users have a smooth migration experience.
Motivation
The motivation to create codemods is that it would streamline the process for millions of users, and also ensure that the application stays efficient and secure while leveraging the latest advancements in Fastify v5.
Example
These codemods would help migrate to fastify v5 real quick as running :
which would include all the codemods.