-
-
Notifications
You must be signed in to change notification settings - Fork 172
feat: use fastify v5 #702
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?
feat: use fastify v5 #702
Conversation
@vafanassieff is attempting to deploy a commit to the ts-rest Team on Vercel. A member of the Team first needs to authorize it. |
|
f0090b6
to
e977c9b
Compare
|
Hey, any news about this one ? |
Hey @oliverbutler, sorry to bother you and thanks for this awesome repository. Can you give us some information about the maintenance / evolution of In advance thanks for your answers, I wish you all the best for your projects 🪻 |
@this-is-tobi npm install @ts-rest/fastify --legacy-peer-deps works for this was able to get it running. A ping again to @oliverbutler, I was able to use v5 without issue with my routers |
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.
Hi @vafanassieff! Thanks for the PR.
Unfortunately due to the breaking changes in fastify v5, it seems like this would be a major version change to @ts-rest.
This may be a case of needing a @ts-rest/fastify v5 much like we've done for react-query v5.
What do you think?
Hey, if we follow the semver spec it's indeed a major release, only for the |
@vafanassieff yup, however, we follow a single version policy so we have the exact same versions cross all of our packages (due to type sharing) We'll likely have to copy/paste the fastify lib and make a v5. I'm unsure whether our standard will be to have the v5 impl within the fastify lib e.g. @Gabrola went with the /v5 subpath pattern with react-query so would be good to get that one agreed before moving forwards with this pr. |
any updates on this?, i was very happy fastify was supported by ts-rest and then i found this issue 😂 😂 😂 😂 Thanks to all the maintainers ❤️ |
I would love for this change to land, given it's more or less trivial. |
Waiting for this change |
I don’t think this needs to be a breaking change. The library remains compatible with fastify v4, so users don’t have to upgrade to fastify v5. The only required adjustment is to relax the version constraint in the Or am I overlooking something? |
I just started implementing a backend with ts-rest v3.52.1 and fastify v5.4.0. Things are working fine so far (I am just in initial stages). But following pnpm warning lead me to this feature request thread.
I have read the comments and now I am confused whether to continue with it or not. |
Same, i didn't have any issues so far. Maybe just relax the version constraint? |
"license": "MIT", | ||
"peerDependencies": { | ||
"fastify": "^4.0.0", | ||
"fastify": "^5.0.0", |
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.
could you change this to "^4.0.0 || ^5.0.0"
to prevent breaking change?
Any chance this can get over the line 🙏 Looks like just the version constraint needs relaxing? |
@oliverbutler Is there anything that can be done to help push this over the finish line? I'm happy to help create separate fastify5 package if that is how is preferable to proceed. |
Btw, I've created an alternative PR that avoids breaking changes and just bumps the range: #850 It should work at a runtime, but produce non-ideal types for Replies. Full solution would require merging this PR in some form. |
Hey there,
All tests are passing locally.
Please let me know if you need more from me.
Best.