omar-dulaimi / prisma-trpc-generator

Prisma 2+ generator to emit fully implemented tRPC routers
MIT License
676 stars 34 forks source link

tRPC 10 Support #53

Closed mwarger closed 1 year ago

mwarger commented 1 year ago

fixes #52

Description

Adds support for tRPC v10

omar-dulaimi commented 1 year ago

Hey @mwarger thanks for the PR! I thought tRPC v10 is stable right now. So, if that was the case, is there any reason to keep this PR behind a flag?

mwarger commented 1 year ago

Hey @mwarger thanks for the PR! I thought tRPC v10 is stable right now. So, if that was the case, is there any reason to keep this PR behind a flag?

Just considering people that may be using this but not upgraded yet.

I also did this because the middleware and shield features aren't implemented. Wasn't sure how to do that yet.

Happy to remove it, or we can later.

JC-Perso commented 1 year ago

Thx for your work ! 🚀

raverecursion commented 1 year ago

Any news about this PR @mwarger , @omar-dulaimi ?

sparkinson-vhs commented 1 year ago

Any news about this PR @mwarger , @omar-dulaimi ?

I second that. We're currently just starting new project with trpc v10 and would like to use this generator as well.

mwarger commented 1 year ago

@omar-dulaimi @JC-Perso @innellea @sparkinson-vhs This could be published behind a different tag if this is useful - would be nice to have other people test and provide feedback. I'm not familiar with trpc shield so I did not implement that. I also skipped the middleware because I didn't need it. I was just trying to get the basics out to start with which is why I put it behind a config option. I can try to make this more feature complete this week.

omar-dulaimi commented 1 year ago

Hey everybody, I have been a little bit busy lately. But I promise I'll upgrade the shield and shield generator to v10 this Friday, so we could merge this PR.

@mwarger I think this project will support v10 only going forward, so there's no need for the flag.

mwarger commented 1 year ago

I will take out the flag.

sparkinson-vhs commented 1 year ago

Great! Many thanks to you both.

On Thu, 22 Dec 2022 at 04:42, Mat Warger @.***> wrote:

I will take out the flag.

— Reply to this email directly, view it on GitHub https://github.com/omar-dulaimi/prisma-trpc-generator/pull/53#issuecomment-1361866788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZP5W7OAY53IXJDX5RCTVY3WONFQ5ANCNFSM6AAAAAASZVT43E . You are receiving this because you were mentioned.Message ID: @.***>

omar-dulaimi commented 1 year ago

Hey all, trpc-shield has been updated to support tRPC v10 now starting with trpc-shield v0.2.0(latest version is 0.2.1). The other project prisma-trpc-shield-generator requires no changes at all.

Which means @mwarger can proceed with uncommenting the sections related to them after updating the trpc-shield dependency to latest version.

I will add a few comments to this PR since @mwarger is going to need them to use the shield.

We can release as soon as work on this PR is done :)

omar-dulaimi commented 1 year ago

Hey @mwarger I see that you have removed the flag. Could you also resolve my comments above so we could merge this?

mwarger commented 1 year ago

@omar-dulaimi Changes pushed. I have not used and am not familiar with trpc shield, so I gave it my best shot. I have not tested it. Please review and feel free to push any changes if needed. Middleware should be good too, I think, but I haven't had a chance to test it. I just wanted to get the basics out the door based on your comments.

I also updated dependency versions and updated the README.

omar-dulaimi commented 1 year ago

Looks good to me, thank you @mwarger Releasing soon

omar-dulaimi commented 1 year ago

Hey all, Released in https://github.com/omar-dulaimi/prisma-trpc-generator/releases/tag/0.8.0 Thanks for your work @mwarger.

Guys as you know this is an open source project that I work on in my free time(when I get any). So I really appreciate any help that comes to improve and maintain it.

Also, don't forget to star it and maybe even sponsor it if you find it useful at work :)

Thank you