-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(start-server-core): update to h3 v2.0.1-rc.2 #6159
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
Conversation
WalkthroughUpdated the h3-v2 dependency and changed getResponse() to return the internal h3 response via the Symbol key instead of the previous event._res property. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cf40c5b to
ba2b4a0
Compare
|
View your CI Pipeline Execution ↗ for commit 7002b29
☁️ Nx Cloud last updated this comment at |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/start-server-core/package.json(1 hunks)packages/start-server-core/src/request-response.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace protocol
workspace:*for internal dependencies in package.json files
Files:
packages/start-server-core/package.json
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode with extensive type safety for all code
Files:
packages/start-server-core/src/request-response.ts
**/*.{js,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Implement ESLint rules for router best practices using the ESLint plugin router
Files:
packages/start-server-core/src/request-response.ts
🧠 Learnings (2)
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.
Applied to files:
packages/start-server-core/package.json
📚 Learning: 2025-12-06T15:03:07.223Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T15:03:07.223Z
Learning: Applies to **/package.json : Use workspace protocol `workspace:*` for internal dependencies in package.json files
Applied to files:
packages/start-server-core/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test
- GitHub Check: Preview
🔇 Additional comments (1)
packages/start-server-core/src/request-response.ts (1)
328-332: Symbol usage for internal h3 property access is appropriate.The h3 v2 documentation shows event.res as the public API for accessing response status and headers, and the use of
Symbol.for('h3.internal.event.res')via @ts-expect-error is a reasonable approach to access internal implementation details when necessary. No remaining usages of the old direct property access pattern (event._resorh3Event._res) were found in the codebase, confirming the migration is complete.
| "@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", |
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.
🧩 Analysis chain
🏁 Script executed:
find . -type f -name "*request-response*" -o -name "*response*" | grep -E "\.(ts|js)$" | head -20Repository: TanStack/router
Length of output: 111
🏁 Script executed:
cat ./packages/start-server-core/src/request-response.tsRepository: 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.
Update, per the instructions here:
From 2.0.0-beta.5 to 2.0.1-rc.2
Release notes
Summary by CodeRabbit
Chores
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.