Skip to content

Commit 97afc67

Browse files
authored
chore: bump h3-v2 to 2.0.1-rc.5 (#5959)
1 parent 6e0de0a commit 97afc67

File tree

4 files changed

+37
-27
lines changed

4 files changed

+37
-27
lines changed

packages/start-server-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@tanstack/router-core": "workspace:*",
8080
"@tanstack/start-client-core": "workspace:*",
8181
"@tanstack/start-storage-context": "workspace:*",
82-
"h3-v2": "npm:h3@2.0.0-beta.4",
82+
"h3-v2": "npm:h3@2.0.1-rc.5",
8383
"seroval": "^1.4.0",
8484
"tiny-invariant": "^1.3.3"
8585
},

packages/start-server-core/src/request-response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ export function clearSession(config: Partial<SessionConfig>): Promise<void> {
327327
// not public API
328328
export function getResponse() {
329329
const event = getH3Event()
330-
return event._res
330+
return event.res
331331
}
332332

333333
// not public API (yet)

packages/start-server-core/src/server-functions-handler.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ export const handleServerAction = async ({
221221
return new Response(
222222
nonStreamingBody ? JSON.stringify(nonStreamingBody) : undefined,
223223
{
224-
status: response?.status,
225-
statusText: response?.statusText,
224+
status: response.status,
225+
statusText: response.statusText,
226226
headers: {
227227
'Content-Type': 'application/json',
228228
[X_TSS_SERIALIZED]: 'true',
@@ -251,8 +251,8 @@ export const handleServerAction = async ({
251251
},
252252
})
253253
return new Response(stream, {
254-
status: response?.status,
255-
statusText: response?.statusText,
254+
status: response.status,
255+
statusText: response.statusText,
256256
headers: {
257257
'Content-Type': 'application/x-ndjson',
258258
[X_TSS_SERIALIZED]: 'true',
@@ -261,8 +261,8 @@ export const handleServerAction = async ({
261261
}
262262

263263
return new Response(undefined, {
264-
status: response?.status,
265-
statusText: response?.statusText,
264+
status: response.status,
265+
statusText: response.statusText,
266266
})
267267
} catch (error: any) {
268268
if (error instanceof Response) {
@@ -301,8 +301,8 @@ export const handleServerAction = async ({
301301
)
302302
const response = getResponse()
303303
return new Response(serializedError, {
304-
status: response?.status ?? 500,
305-
statusText: response?.statusText,
304+
status: response.status ?? 500,
305+
statusText: response.statusText,
306306
headers: {
307307
'Content-Type': 'application/json',
308308
[X_TSS_SERIALIZED]: 'true',

pnpm-lock.yaml

Lines changed: 27 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)