package-trpc-swagger icon indicating copy to clipboard operation
package-trpc-swagger copied to clipboard

Support for TRPC 11

Open LeonAlvarez opened this issue 1 year ago • 17 comments

It would be good to have support for trpc v11, it's not out yet, but rc is and is already the default version on docs.

LeonAlvarez avatar Apr 05 '24 08:04 LeonAlvarez

Release Candidate just came out. It's certainly something I'm keep on tackling.

Vercjames avatar Apr 22 '24 21:04 Vercjames

Keeping a pulse on this issue. as of today trpc is on version v11.0.0-rc.366.

https://github.com/trpc/trpc

Vercjames avatar May 09 '24 15:05 Vercjames

Is there any temporary workaround to make trpc-swagger v1.2.3 works on trpc v11.0.0-rc.366?

lvl99wzrd avatar May 11 '24 14:05 lvl99wzrd

Definitely confused to see this, because the readme says to have trpc server 11 installed. Am I misunderstanding something? I do see the example using the app router is using v10.

jbgrunewald avatar May 18 '24 15:05 jbgrunewald

agreed, this should be updated to v10 https://github.com/Vercjames/package-trpc-swagger/blob/5bcf7a8ddba4090cf0de9effffc029663f3a51cd/README.md?plain=1#L142

being on v11 results in errors like this:

"source":"server","message":"Unknown procedure type","stack":"Error: Unknown procedure type\n    at getProcedureType (/<REDACTED>/node_modules/trpc-swagger/build/utils/procedure.js:29:11)

samjcombs avatar May 23 '24 01:05 samjcombs

I'm using trpc v11 and looking at this issue, i think i'll wait until there's an official support for it before i use it

waptik avatar May 24 '24 06:05 waptik

Still waiting on the official release for v11

the official NPM packages are on 10.45.2 https://www.npmjs.com/package/@trpc/server https://www.npmjs.com/package/@trpc/client

I here the communities cry for v11 support. It's at the top of my list.

Vercjames avatar May 30 '24 17:05 Vercjames

agreed, this should be updated to v10

https://github.com/Vercjames/package-trpc-swagger/blob/5bcf7a8ddba4090cf0de9effffc029663f3a51cd/README.md?plain=1#L142

being on v11 results in errors like this:

"source":"server","message":"Unknown procedure type","stack":"Error: Unknown procedure type\n    at getProcedureType (/<REDACTED>/node_modules/trpc-swagger/build/utils/procedure.js:29:11)

Updated. But feel free to submit PR's <3

Vercjames avatar May 30 '24 17:05 Vercjames

If you MUST have support for v11. I was able to get this patch package work for trpc 11.

Add this to your package.json patch-package

Then apply this patch trpc-openapi+1.2.0.patch

Vercjames avatar May 30 '24 17:05 Vercjames

Would really appreciate it if you can make a branch/PR for trpc v11 support while we wait for the official release. Patches are nice, but it's also really fragile.

musjj avatar May 31 '24 07:05 musjj

If you MUST have support for v11. I was able to get this patch package work for trpc 11.如果您必须支持 v11。我能够让这个补丁包适用于 trpc 11。

Add this to your package.json将其添加到您的package.json patch-package 补丁包

Then apply this patch 然后应用此补丁 trpc-openapi+1.2.0.patchtrpc-openapi+1.2.0.补丁

This patch package is for trpc-openapi, is there a patch package for trpc-swagger?

denvey avatar Jun 04 '24 07:06 denvey

@Vercjames thanks for the continued work on this fork :heart:

Let's all hope V11 gets released soon

dBianchii avatar Jun 08 '24 03:06 dBianchii

Still on v10 trpc

Vercjames avatar Jun 18 '24 21:06 Vercjames

Still keeping tabs on this <3

Vercjames avatar Jul 17 '24 21:07 Vercjames

Still on v10 trpc

Vercjames avatar Sep 03 '24 15:09 Vercjames

If you MUST have support for v11. I was able to get this patch package work for trpc 11.如果您必须支持 v11。我能够让这个补丁包适用于 trpc 11。 Add this to your package.json将其添加到您的package.json patch-package 补丁包 Then apply this patch 然后应用此补丁 trpc-openapi+1.2.0.patchtrpc-openapi+1.2.0.补丁

This patch package is for trpc-openapi, is there a patch package for trpc-swagger?

@Vercjames - What about this?

flawnn avatar Sep 10 '24 13:09 flawnn

@flawnn, I briefly explored this approach, and you're welcome to use patch-package for your current project. Since it's an npm package, this method is more suitable for individual projects rather than being part of the core repository.

All the TRPC packages are still marked for v10.45.2:

@trpc/server @trpc/client @trpc/next

According to the official TRPC Migration Docs:

"The functionality is stable and can be used in production, but we may make small breaking API changes between patches until we reach 11.0.0."

Since this repository relies on those patch changes, I need to wait for v11 to be released to ensure compatibility with their specifications. Here's the current plan:

  1. Wait for 11.0.0 to be published on npm.
  2. Review the new specifications and functionality.
  3. Develop v2.0.0 of this repository.
  4. Build example apps for popular frameworks.
  5. Create new Jest scripts to detect any changes TRPC makes.

I understand it’s frustrating to wait. Many core projects (React v19, TRPC v11, Next.js v15) have faced challenges in getting their new releases up to standard. This is a natural part of the process when ensuring robust and reliable software. I have great respect for all the developers working on these projects, and if any of them have insights or suggestions, I’d be happy to welcome experienced developers as active contributors.

Vercjames avatar Sep 10 '24 16:09 Vercjames

If you MUST have support for v11. I was able to get this patch package work for trpc 11.如果您必须支持 v11。我能够让这个补丁包适用于 trpc 11。 Add this to your package.json将其添加到您的package.json patch-package 补丁包 Then apply this patch 然后应用此补丁 trpc-openapi+1.2.0.patchtrpc-openapi+1.2.0.补丁

This patch package is for trpc-openapi, is there a patch package for trpc-swagger?

@Vercjames - What about this?

In case this can be useful @flawnn, I created my own patch for the trpc-swagger package. But I used pnpm patching which is native. The patch seems to be the same format as the ones from patch-package, so maybe it can work.

[email protected]

adriangonzy avatar Nov 28 '24 10:11 adriangonzy