You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, @trpc/server is using a lot of Node-based dependencies, i.e. url, http, etc.
It would be great to decouple @trpc/server completely from a node in order to easier deploy tRPC to i.e. CF workers (#1375).
Proposal
Please DM me on Discord before addressing this, there might be better implementations ideas, below are my first thoughts.
Rough steps:
Rename @trpc/server to @trpc/node (and update all examples, etc)
Create a new package, @trpc/core
Gradually extract all non-node-specific stuff into a package named @trpc/core or similar
This requires a lot of refactoring as there are a lot of functions that like resolveHTTPResponse should still exist as part of @trpc/core but with a slightly different signature.
For ease of installation, @trpc/node could have a hard dependency (rather than a peerDep) of @trpc/core and export * from '@trpc/core'
Activity
KATT commentedon Mar 6, 2022
cc @esamattis @icflorescu
KATT commentedon Apr 1, 2022
Excited about this! Thanks for taking ownership, @sachinraja!
sachinraja commentedon May 16, 2022
Closing this as we've now been able to deploy on CF Workers and Deno
github-actions commentedon Oct 4, 2022
This issue has been locked because it had no new activity for 14 days. If you are running into a similar issue, please create a new issue. Thank you.