feat(trpc-server): use c.body to create response to avoid header loss (#517)

pull/526/head
Rahul Mishra 2024-05-16 03:46:16 +05:30 committed by GitHub
parent 44766bff2f
commit 8f669cd338
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,5 @@
---
'@hono/trpc-server': patch
---
use `c.body` to create response to avoid header loss

View File

@ -28,11 +28,11 @@
"homepage": "https://honojs.dev",
"peerDependencies": {
"@trpc/server": "^10.10.0",
"hono": ">=3.*"
"hono": ">=4.*"
},
"devDependencies": {
"@trpc/server": "^10.10.0",
"hono": "^3.11.7",
"hono": "^4.3.6",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
"zod": "^3.20.2"

View File

@ -32,7 +32,7 @@ export const trpcServer = ({
}),
endpoint,
req: c.req.raw,
})
}).then((res) => c.body(res.body, res))
return res
}
}

View File

@ -2094,13 +2094,13 @@ __metadata:
resolution: "@hono/trpc-server@workspace:packages/trpc-server"
dependencies:
"@trpc/server": "npm:^10.10.0"
hono: "npm:^3.11.7"
hono: "npm:^4.3.6"
jest: "npm:^29.7.0"
rimraf: "npm:^5.0.5"
zod: "npm:^3.20.2"
peerDependencies:
"@trpc/server": ^10.10.0
hono: ">=3.*"
hono: ">=4.*"
languageName: unknown
linkType: soft