-
Notifications
You must be signed in to change notification settings - Fork 25
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
TRPC 11 #41
base: main
Are you sure you want to change the base?
TRPC 11 #41
Conversation
packages/test-react/package.json
Outdated
"@trpc/server": "11.0.0-rc.403", | ||
"@types/react": "18.3.3", | ||
"@types/react-dom": "18.3.0", | ||
"jsdom": "24.1.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.
happy-dom is faster than jsdom, albeit it is lacking some of the web APIs, one should consider trying to see if it's adequate for this package
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.
I chose jsdom
because they support Websocket
in the browser without needing a polyfill. Tests packages are only here for example, you can use happy-dom
too.
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.
@vafanassieff I've reviewed the entire PR, it looks great. I am not a core contributor though but I am looking forward to seeing this merged as we are using tRPC v11 and would like to use this package for testing.
Co-authored-by: Pierre B. <pierre@lgse.com>
Thanks ! |
@vafanassieff could you add the documentation and then we could go forward with this PR? Thanks! |
Our team is excited to see support for tRPC v11, thank you! Is there a chance this might merge soon? |
@vafanassieff could you please resolve the conflicts? I think we need to
I made a PR to fix this vafanassieff#2. Please squash merge it. |
@maloguertin could you please take a look at the doc update? |
## Config | ||
|
||
`createTRPCMsw` accepts a 2nd argument: | ||
You need to pass a `httpLink` to the `createTRPCMsw` function like you would do with the tRPC client. |
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.
This description must come before the **2. build your trpcMsw with createTRPCMsw.**
in the ## Usage
section above since the config
argument of createTRPCMsw
is now non-optional.
@maloguertin msw has released WebSocket support in version 2.6.0 https://github.com/mswjs/msw/releases/tag/v2.6.0 I love this package and have been using it extensively with @vafanassieff fork Is there anything else the community is able to provide in this PR to unblock it and start implementing WebSocket, FormData and other goodies? |
If you look in the previous commit, we added a way to use websocket, but it was kinda cluncky and out of the scope of this PR. (BTW we moved to SSE instead of websocket for subscriptions, it's much easier) |
Hi ! Any plan to merge ? @vafanassieff Did you publish your fork on npm under a prefix ? |
I'm using |
Hello 👋🏽 The only conflict with main is also in the documentation. I can solve this. |
I have yet to find the time to write the doc, if you are willing to do it lfg ! |
Just as a heads up, this doesn't seem to support post overrides (it always assumes a get request for a query) |
Hello @maloguertin! tRPC 11 is stable! https://trpc.io/blog/announcing-trpc-v11 As of now, Is there any chance this PR will be reviewed soon? |
I updated the PR to use tRPC 11. @Alletkla if you still want to update the config lmk :) |
Hey there, thanks for this package.
We took few liberties to improve the DX / testing
Closes #37
Best
🎯 Changes
pnpm
links
like a normal TRPC client (from @louneskmt)✅ Checklist