-
Notifications
You must be signed in to change notification settings - Fork 23
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. <[email protected]>
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? |
Hey I currently don't have much time to write the docs, if someone want to chat with me and @louneskmt to have some guidance and help us! |
@vafanassieff @louneskmt I would be happy to help with the documentation. The github action to publish might also need to be updated as well. I ran into a few issues with it when creating a temporary fork. |
Hey, I removed the websocket part since it added too much overhead for almost nothing. |
This comment was marked as resolved.
This comment was marked as resolved.
@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 |
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