8000 docs: Codemods for Upgrading to fastify v5 by manishjha-04 · Pull Request #5717 · fastify/fastify · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@manishjha-04
Copy link

🚀 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 :

npx codemod fastify/5/migrationRecipe

which would include all the codemods.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 27, 2024
@Fdawgs Fdawgs changed the title feat: Codemods for Upgrading to fastify v5 docs: Codemods for Upgrading to fastify v5 Sep 30, 2024
@mcollina
Copy link
Member
mcollina commented Oct 4, 2024

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?

@arshcodemod
Copy link
Contributor
arshcodemod commented Oct 4, 2024

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

@manishjha-04 manishjha-04 marked this pull request as ready for review October 4, 2024 14:30
@mcollina
Copy link
Member
mcollina commented Oct 4, 2024

Most of those seems incorrect, open a PR and I'll comment on them.

@manishjha-04
Copy link
Author
manishjha-04 commented Oct 4, 2024

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>
@Eomm
Copy link
Member
Eomm commented Oct 31, 2025

We need to push this PR forward

image

Copy link
Member
@gurgunday gurgunday left a 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
Copy link
Member

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:

Image

If I check the source code I can't find that code mode:

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?

@gurgunday gurgunday added the good first issue Good for newcomers label Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0