Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/start-server-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@tanstack/router-core": "workspace:*",
"@tanstack/start-client-core": "workspace:*",
"@tanstack/start-storage-context": "workspace:*",
"h3-v2": "npm:h3@2.0.0-beta.5",
"h3-v2": "npm:h3@2.0.1-rc.6",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "*request-response*" -o -name "*response*" | grep -E "\.(ts|js)$" | head -20

Repository: TanStack/router

Length of output: 111


🏁 Script executed:

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

Repository: TanStack/router

Length of output: 9267


H3 v2.0.1-rc.6 exists, but code relies on undocumented internal Symbol API that could break during pre-release stages.

H3 v2.0.1-rc.6 is available, and while H3 v2 documents internal Symbols like Symbol.for("h3.notFound") and Symbol.for("h3.handled"), the specific Symbol.for('h3.internal.event.res') used in getResponse() is not documented in the official H3 v2 guide. The @ts-expect-error comment in the code acknowledges this reliance on internal APIs.

Since h3 v2.0.1-rc.6 is still in release candidate stage, undocumented internal Symbols could change or break between RC versions or during the final stable release. Consider either waiting for a stable h3 v2.0.0 release, using a documented H3 API alternative for response access, or pinning to a specific RC version with awareness of potential instability.

"seroval": "^1.4.1",
"tiny-invariant": "^1.3.3"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/start-server-core/src/request-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ export function clearSession(config: Partial<SessionConfig>): Promise<void> {
// not public API
export function getResponse() {
const event = getH3Event()
return event._res
// @ts-expect-error accessing internal symbol
return event[Symbol.for('h3.internal.event.res')]
}

// not public API (yet)
Expand Down
31 changes: 17 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading