Skip to content
Source
Sign inSign up
TanStack/router

fix(start-server-core): update to h3 v2.0.1-rc.2 #6159

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/6159/headmerged by birkskyum(GitHub profile, opens in a new tab)

Update, per the instructions here:

From 2.0.0-beta.5 to 2.0.1-rc.2

Release notes

Summary by CodeRabbit

  • Chores

    • Updated h3-v2 dependency to version 2.0.1-rc.2
  • Refactor

    • Internal response-access implementation adjusted; public API signatures and end-user behavior remain unchanged.
✏️ Tip: You can customize this high-level summary in your review settings.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-server-core

    2. Walkthrough

      Updated 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

      Cohort / File(s)Summary
      Dependency Update
      packages/start-server-core/package.json
      Bumped h3-v2 dependency from npm:h3@2.0.0-beta.5 to npm:h3@2.0.1-rc.2.
      Internal Response Access
      packages/start-server-core/src/request-response.ts
      getResponse() now returns event[Symbol.for('h3.internal.event.res')] instead of event._res; includes a TypeScript expect-error suppression for accessing the internal symbol.

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~20 minutes

      • Inspect request-response.ts change to ensure Symbol key is accurate and stable across the targeted h3 release.
      • Verify the TypeScript expect-error is narrow and justified.
      • Run integration checks for start-server-core handlers to confirm response access works in practice.
      • TanStack/router#5959: Alters how getResponse() obtains the internal response in request-response.ts, closely related to this symbol-access change.
      • TanStack/router#5973: Addresses internal h3 response access and overlaps with the dependency/compatibility adjustments here.
      • TanStack/router#5281: Updates h3 integration in start-server-core and intersects with dependency and access patterns changed in this PR.

      Poem

      🐰 I sniffed a tiny symbol bright, I hopped and nudged the response to light, A version bumped, a quiet tweak, Hops and code — both swift and sleek! 🥕

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Title check⚠️ WarningThe title states 'update to h3 v2.0.1-rc.2' but the PR objectives and raw summary indicate the actual update is to h3 v2.0.1-rc.6, creating a mismatch between title and actual changes.Update the PR title to 'chore(start-server-core): update to h3 v2.0.1-rc.6' to match the actual version being upgraded to in the changeset.
      ✅ Passed checks (2 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Docstring Coverage✅ PassedDocstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
      ✨ Finishing touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `update-to-h3-v2.0.1-rc.6`

      📜 Recent review details

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 37e52afaee4d2f63081a9f89a610590ef672ca19 and 7002b290381866ab72548e02fc63698d2757d638.

      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (1)
      • packages/start-server-core/package.json (1 hunks)
      🚧 Files skipped from review as they are similar to previous changes (1)
      • 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

      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.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    3. View your CI Pipeline Execution ↗ for commit 7002b290381866ab72548e02fc63698d2757d638

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded8m 36sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded2m 1sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-12-20 20:04:09 UTC

    4. Actionable comments posted: 1

      📜 Review details

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between cf40c5b7bc394ca6b0f480e636bbaafc165887b0 and 37e52afaee4d2f63081a9f89a610590ef672ca19.

      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is 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._res or h3Event._res) were found in the codebase, confirming the migration is complete.

      packages/start-server-core/package.json line 82Outdated
      @@ -79,4 +79,4 @@
      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.5",
      82+ "h3-v2": "npm:h3@2.0.1-rc.6",

      ⚠️ 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.

    5. More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@6159

      @tanstack/directive-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@6159

      @tanstack/eslint-plugin-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@6159

      @tanstack/history

      npm i https://pkg.pr.new/TanStack/router/@tanstack/history@6159

      @tanstack/nitro-v2-vite-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@6159

      @tanstack/react-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@6159

      @tanstack/react-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@6159

      @tanstack/react-router-ssr-query

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@6159

      @tanstack/react-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@6159

      @tanstack/react-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@6159

      @tanstack/react-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@6159

      @tanstack/router-cli

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@6159

      @tanstack/router-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@6159

      @tanstack/router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@6159

      @tanstack/router-devtools-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@6159

      @tanstack/router-generator

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@6159

      @tanstack/router-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@6159

      @tanstack/router-ssr-query-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@6159

      @tanstack/router-utils

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@6159

      @tanstack/router-vite-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@6159

      @tanstack/server-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@6159

      @tanstack/solid-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@6159

      @tanstack/solid-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@6159

      @tanstack/solid-router-ssr-query

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@6159

      @tanstack/solid-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@6159

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@6159

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@6159

      @tanstack/start-client-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@6159

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@6159

      @tanstack/start-server-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@6159

      @tanstack/start-static-server-functions

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@6159

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@6159

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@6159

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@6159

      @tanstack/vue-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router@6159

      @tanstack/vue-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-devtools@6159

      @tanstack/vue-router-ssr-query

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-ssr-query@6159

      @tanstack/vue-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start@6159

      @tanstack/vue-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start-client@6159

      @tanstack/vue-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start-server@6159

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@6159

      commit: 7002b29

    6. birkskyum(GitHub profile, opens in a new tab) changed the title

    7. birkskyum(GitHub profile, opens in a new tab) changed the title

Sign in to join this conversation.