Repository navigation
Closed
Description
🚀 v11 is available to use and ready for production: https://trpc.io/docs/migrate-from-v10-to-v11
Summary
- The main goal of v11 is to improve our own quality-of-life by removing v9-support as it makes the codebase very messy.
- Work will be done in the
next-branch - Ideas welcome from the community of API-decisions you think we should revisit.
- We plan not to delete anything which hasn't previously been marked as
@deprecated(if we rename, we'll do an alias) - Discord chat: https://discord.com/channels/867764511159091230/1057652120473575505
Plan
Before official alpha
- Delete v9 support chore: rm v9 support #3494
- Recover test coverage from the above -- it dropped down to 93% -- see https://app.codecov.io/gh/trpc/trpc/pull/3494
- Deprecate and rename: Remove
Proxyfrom naming of functions. We haveUntypedthat is for the untyped. e.g:createTRPCProxyClient->createTRPCClientrefactor: rename and deprecate proxy named stuff #4932 - Look over all
@deprecatedand delete accordingly (chore(v11): remove some deprecated stuff #5026) - Move from using string paths to tuples in
react-query - Look if there are any open issues that we want to do that might entail breaking features
- Consider if we wanna do them or wait for v12 - maybe we start exporting some stuff specifically for plugins
- Turn
TRPCError.causetounknown - chore: refactors builders to use generic arguments rather than generic "options object" #5188
- Once we've created a
@trpc/core-package, we need to look at extensions using tRPC and make a way to extend tRPC for libraries - feat(v11): make it easier to extend tRPC #5308 - feat: create
@trpc/core-package #5210 - Make sure things that are exported in
@trpc/client/@trpc/serveretc are smurfed. Stuff in@trpc/coredon't need to be smurfed as it's all internal and not intended to be used directly - Make a blog post
- Make a migration guide
- Version Docusaurus docs
- Make sure all docs installs uses
@next - Swap default branch to
next
Beta
- Rename
mainto10.x&next->main
Maybes of things to do
- Move from using string paths to tuples in
client(maybe?) - Search for
FIXMEin codebase and fix them - feat: publishing AppRouter without hassle #5004
- Add a way to access the
ctxin theinputparsers #1963
Subtle breaking changes
Hey you! Yes, you!
Anything you think we should add that should be fixed?
Reacted by Marko Kosir, Néstor, Peter van Meijgaard, Jerry, Daniel Yogel, Chadwick Maycumber, Sean Cassiere, luthfi-hh, Joel Keyser, Alex Castle and 3 more
Reacted by Marko Kosir, Salvatore, Néstor, Lingxi Li, Oscar Beaumont, Tom Lienard, Jerry, Sadegh Barati, luthfi-hh, Ahmed Abdelbaset and 3 more
Reacted by Marko Kosir, Néstor, Jiri Spac, Lingxi Li, nick, Jerry, Ayush, Marshall Han, Pelle Jacobs, Sébastien Vanvelthem and 4 more
Reacted by Julius Marminge, Sachin Raja, Timo Clasen, Vlad Sazonau, Marko Kosir, Salvatore, Néstor, Robert Soriano, kran6a, James Opstad and 11 more
Reacted by Dxig, Albert Ilagan, Théo LUDWIG, Marko Kosir and luthfi-hh
Metadata
Metadata
Type
Projects
- StatusShow more project fields✅ Done
Activity
[-]feat: v11 [/-][+]feat: v11 goals[/+]Nick-Lucas commentedon Dec 27, 2022
This might be a bigger discussion and way out of scope here, but I think the React Query API could be cleaner long term if changes are on the table. There are a few painpoints with it
Take this rough example:
There are a couple painpoints:
trpc.post.useSomeHookis still not lintable by eslint because it doesn't follow the expected patterns of hooks. It may be easier to change the API rather than change the 'rules' which have been pushed since 2019useUtilsutilsandtrpcseparately in order to access different methods on the same procedure. I suppose this is because a procedure called "invalidate" might exist and collide if they were collocated. My experience is it does feel a little unergonomic though.Something a bit tidier might look like:
Doesn't cover everything, but getting linting working seems like the important piece, and bringing the utils naming in line seems like low-hanging-fruit
lilingxi01 commentedon Dec 28, 2022
oljimenez commentedon Dec 28, 2022
TkDodo commentedon Dec 28, 2022
Let's try to sync this with TanStack Query v5. Our roadmap is here:
kran6a commentedon Dec 28, 2022
KATT commentedon Dec 28, 2022
Thanks, everyone! In order to keep the conversation here tidy, we will hide discussions & things that wouldn't result in breaking changes - feel free to open separate issues on those. If you wanna debate or discuss specific topics here, join Discord. I just set up a channel specifically for v11.
51 remaining items
kashipai commentedon Aug 7, 2024
Thanks for this. Helped me solve issues in something I was working with.
Pewtro commentedon Aug 27, 2024
Is there an estimated, or a goal, of when you'd want to release
11.0.0as a stable version and not a*-nextversion? I can see a few tasks that aren't done in this goals/suggestions issue, but I don't see any associated issues or pull requests to those so I don't know what the progress is for those 😄tinrab commentedon Sep 22, 2024
I have one suggestion regarding websockets and the
wspackage. I like what crossws (and nitro) is doing. It gives you a standard WebSocket API usable with different adapters, for Deno, Bun and others. Because tRPC relies onws, calls e.g.client.once(...)don't work across different runtimes.applyWSSHandlerandgetWSConnectionHandlercould be changed to use standard WebSocket APIs.KATT commentedon Sep 22, 2024
cc @tinrab - I like the look of that too, but I won't rewrite our WS adapter anytime soon, feel free to have a stab at it.
barziahmed commentedon Jan 21, 2025
@KATT, It seems all goals are accompolished. Is table version getting published soon?
EmilMalanczak commentedon Feb 16, 2025
Worked for me however I was able to get any clue about it after analyze the build files.
At first I was getting error
Unsafe call of anerrortype typed value. The problem existed only for react-query package which was even more unintuitive (my client code is 1:1 the same as in the docs)Simple reexport
export type * from @trpc/serverdid the job for me 🤷. Hopefully that will help someonedsmurl commentedon Mar 4, 2025
@ax-at I have this same issue in my repo here: https://github.com/dsmurl/an-express-next
Is there a suggested best path past this? I've been stuck for weeks.
lcswillems commentedon Mar 5, 2025
Hey @KATT, what's the reason preventing the release of a v11 stable release? It is said here and there that v11 is stable. So if it is stable, why not publishing a v11 version?
Nick-Lucas commentedon Mar 5, 2025
@lcswillems mostly just that we wanted to get out the Tanstack React Query client first and get it stable, we're very close now. But at large V11 is very stable and has been for a while, a lot of folk use it in production so we're as serious about avoiding breaking changes as a full V11 release now.
lcswillems commentedon Mar 5, 2025
Thanks @Nick-Lucas for the context! 🙏
github-actions commentedon Mar 25, 2025
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.