Skip to content
Source
Sign inSign up
TanStack/router

fix: various fixes #5215

Mergedschiller-manuel(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/5215/headmerged by schiller-manuel(GitHub profile, opens in a new tab)

Summary by CodeRabbit

  • Documentation
    • Updated install commands (non-dev) and examples to use inputValidator.
    • Renamed example API in router docs to getRouter.
  • Refactor
    • startInstance is now a named export (no default export).
    • Hydration now imports startInstance directly and handles its absence more gracefully.
  • Bug Fixes
    • Code-splitting respects undefined deleteNodes and applies stricter checks.
  • Chores
    • Adjusted server-entry build externals.
    • Added @rolldown/pluginutils dependency and streamlined runtime file filtering.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: router-plugin

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-start

    3. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-start

    4. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-plugin-core

    5. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-client-core

    6. View your CI Pipeline Execution ↗ for commit c7135bca5c617bab547d60bb6f922fc1854abf60

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded4m 58sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 35sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-09-24 19:39:55 UTC

    7. Walkthrough

      Documentation updates rename validator to inputValidator and adjust install commands and router API naming. Start/solid default-entry modules switch from default export to a named startInstance and adjust build externals. Client hydration now imports startInstance directly and handles its absence. Router plugin tweaks deleteNodes handling. Start plugin narrows runtime file filtering and adds a dependency.

      Changes

      Cohort / File(s)Summary of changes
      Docs: validator→inputValidator, install/API tweaks
      docs/router/integrations/query.md, docs/start/framework/react/authentication.md, docs/start/framework/react/observability.md
      Updated install commands to non-dev for tanstack package; renamed example router export to getRouter; replaced .validator(...) with .inputValidator(...) across React auth and observability docs.
      Start/Solid default entry exports and externals
      packages/react-start/src/default-entry/start.ts, packages/solid-start/src/default-entry/start.ts, packages/react-start/vite.config.server-entry.ts, packages/solid-start/vite.config.server-entry.ts, packages/react-start/src/default-entry/server.ts, packages/solid-start/src/default-entry/server.ts
      Replaced default export {} with named startInstance = undefined; removed '#tanstack-start-entry' from externalDeps; React: type Register now from @tanstack/react-router; Solid: added ESLint directive above fetch cast.
      Client hydration flow update
      packages/start-client-core/src/client/hydrateStart.ts
      Directly imports startInstance from #tanstack-start-entry; branches when absent; initializes and propagates serializationAdapters; stores options on window.__TSS_START_OPTIONS__; ensures ServerFunctionSerializationAdapter inclusion; preserves hydration behavior.
      Router plugin: deleteNodes handling
      packages/router-plugin/src/core/code-splitter/compilers.ts, packages/router-plugin/src/core/router-code-splitter-plugin.ts
      In compiler, replaced optional chaining with non-null assertion on opts.deleteNodes! during property filtering; in plugin, only constructs a Set when deleteNodes provided, otherwise passes undefined.
      Start plugin core: filtering and deps
      packages/start-plugin-core/src/start-compiler-plugin/plugin.ts, packages/start-plugin-core/package.json
      Uses makeIdFiltersToMatchWithQuery(...) to specify a narrowed list of runtime files to match; adjusts included files for client/server runtimes; adds dependency @rolldown/pluginutils@1.0.0-beta.40.

      Sequence Diagram(s)

      sequenceDiagram
        autonumber
        actor User
        participant Browser
        participant App as App Bootstrap
        participant Start as startInstance (from #tanstack-start-entry)
        participant Router
      
        User->>Browser: Load app
        Browser->>App: Execute hydrateStart()
        App->>Start: Import startInstance
        alt startInstance present
          App->>Start: getOptions()
          Start-->>App: startOptions
          App->>Browser: Set window.__TSS_START_OPTIONS__
          App->>App: Ensure serializationAdapters (append ServerFunctionSerializationAdapter)
        else startInstance absent
          App->>App: Initialize empty serializationAdapters<br/>Append ServerFunctionSerializationAdapter
          App->>Browser: Set window.__TSS_START_OPTIONS__ (fallback)
        end
        App->>Router: Apply serializationAdapters
        App->>Router: Hydrate if no existing matches
        Router-->>Browser: UI hydrated

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~25 minutes

      Suggested labels

      package: react-start-client, package: solid-start-client

      Suggested reviewers

      • Sheraff
      • SeanCassiere

      Poem

      I nudge the start, a tiny hop, From defaults to a named-top. Validators don new attire, Hydration warms with gentle fire. Plugins prune with deft delight— Fewer twigs, the path is light. Thump-thump! Ship it, shining bright. 🐇✨

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning, 1 inconclusive)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      Title Check❓ InconclusiveThe title “fix: various fixes” is overly generic and fails to summarize the primary changes, which include renaming validation methods, adjusting export patterns, and updating dependencies across multiple packages. Because it does not convey meaningful information about the modifications, it does not meet the criteria for a clear and specific PR title.Please revise the title to succinctly reflect the main change, for example “refactor: rename validator to inputValidator across docs and update export patterns,” or consider splitting distinct changes into separate PRs with focused titles.
      ✅ Passed checks (1 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      ✨ Finishing touches
      • 📝 Generate Docstrings
        🧪 Generate unit tests
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `start-fixes`

      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    8. More templates

      @tanstack/arktype-adapter

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

      @tanstack/directive-functions-plugin

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

      @tanstack/eslint-plugin-router

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/zod-adapter

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

      commit: c7135bc

    9. Actionable comments posted: 2

      Caution

      Some comments are outside the diff and can’t be posted inline due to platform limitations.

      ⚠️ Outside diff range comments (5)
      docs/start/framework/react/observability.md (3)

      37-48: Missing import for createServerFn in Sentry snippet.

      The snippet uses createServerFn() without importing it.

      Apply this diff within the snippet:

       // Server functions
      -import * as Sentry from '@sentry/node'
      +import * as Sentry from '@sentry/node'
      +import { createServerFn } from '@tanstack/react-start'
       
       const serverFn = createServerFn().handler(async () => {

      100-113: Fix middleware handler signature: request is undefined.

      request is referenced but not passed into the handler.

      Apply this diff to include request and required imports:

      -import { createMiddleware } from '@tanstack/react-start'
      +import { createMiddleware, json } from '@tanstack/react-start'
      +import { createFileRoute } from '@tanstack/react-router'
       
      -const requestLogger = createMiddleware().handler(async ({ next }) => {
      +const requestLogger = createMiddleware().handler(async ({ next, request }) => {
         const startTime = Date.now()
         const timestamp = new Date().toISOString()
       
         console.log(`[${timestamp}] ${request.method} ${request.url} - Starting`)

      126-136: Add missing imports in route snippet using json/createFileRoute.

      json and createFileRoute are used but not imported in this snippet.

      Apply the import additions in the same snippet as shown in the previous diff (lines 100-113).

      docs/router/integrations/query.md (2)

      127-132: Bug: context is undefined in loader example

      context is referenced but not destructured from the loader args.

      Apply:

      -export const Route = createFileRoute('/user/$id')({
      -  loader: ({ params }) => {
      -    // do not await this nor return the promise, just kick off the query to stream it to the client
      -    context.queryClient.fetchQuery(userQuery(params.id))
      -  },
      -})
      +export const Route = createFileRoute('/user/$id')({
      +  loader: ({ params, context }) => {
      +    // do not await this nor return the promise; kick off the query to stream to the client
      +    void context.queryClient.fetchQuery(userQuery(params.id))
      +  },
      +})

      6-8: Correct broken docs link In docs/router/integrations/query.md (line 7), update the link from ../../framework/react/guide/external-data-loading.md to ../framework/react/guide/external-data-loading.md

      🧹 Nitpick comments (7)
      docs/start/framework/react/authentication.md (2)

      8-9: Use docs-root-relative internal link per guidelines.

      Replace ../authentication-overview.md with a link relative to the docs/ root.

      Apply this diff:

      -> **📋 Before You Start:** Check our [Authentication Overview](../authentication-overview.md) for all available options including partner solutions and hosted services.
      +> **📋 Before You Start:** Check our [Authentication Overview](./start/framework/authentication-overview.md) for all available options including partner solutions and hosted services.

      Please verify the correct target path under docs/ and adjust if the actual file lives elsewhere.


      609-609: Use relative docs link for How-to Guides Replace the absolute site path with a docs-relative link:

      - see the [How-to Guides](/router/latest/docs/framework/react/how-to/README.md#authentication)
      + see the [How-to Guides](./router/framework/react/how-to/README.md#authentication)
      docs/router/integrations/query.md (1)

      118-120: Remove unused import in snippet

      useQuery isn’t used in this example.

      -import { queryOptions, useQuery } from '@tanstack/react-query'
      +import { queryOptions } from '@tanstack/react-query'
      packages/react-start/src/default-entry/server.ts (1)

      10-14: Add the same ESLint suppression as Solid to avoid lint failures.

      Solid adds the no-unnecessary-type-assertion suppression above the fetch cast; React file omits it. Add for parity and to keep DTS shaping stable without tripping ESLint.

       export default {
         // Providing `RequestHandler` from `@tanstack/react-start/server` is required so that the output types don't import it from `@tanstack/start-server-core`
      -  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
      +  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
         // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
         fetch: fetch as RequestHandler<Register>,
       }
      packages/start-client-core/src/client/hydrateStart.ts (1)

      13-20: Minor: simplify initialization and avoid overriding defaults when absent.

      Use nullish assignment and only set defaultSsr if provided.

      -    const startOptions = await startInstance.getOptions()
      -    startOptions.serializationAdapters =
      -      startOptions.serializationAdapters ?? []
      +    const startOptions = await startInstance.getOptions()
      +    startOptions.serializationAdapters ??= []
           window.__TSS_START_OPTIONS__ = startOptions as AnyStartInstanceOptions
           serializationAdapters = startOptions.serializationAdapters
      -    router.options.defaultSsr = startOptions.defaultSsr
      +    if (startOptions.defaultSsr !== undefined) {
      +      router.options.defaultSsr = startOptions.defaultSsr
      +    }
      packages/router-plugin/src/core/code-splitter/compilers.ts (1)

      167-180: Non-null assertion is safe under the preceding guard; consider tiny cleanup.

      Given the size > 0 check, opts.deleteNodes!.has(...) is safe. For readability, hoist a local const to avoid the bang.

      -                if (opts.deleteNodes && opts.deleteNodes.size > 0) {
      +                if (opts.deleteNodes && opts.deleteNodes.size > 0) {
      +                  const deleteNodes = opts.deleteNodes
                         routeOptions.properties = routeOptions.properties.filter(
                           (prop) => {
                             if (t.isObjectProperty(prop)) {
                               if (t.isIdentifier(prop.key)) {
      -                          if (opts.deleteNodes!.has(prop.key.name as any)) {
      +                          if (deleteNodes.has(prop.key.name as any)) {
                                   return false
                                 }
                               }
                             }
                             return true
                           },
                         )
                       }
      packages/start-plugin-core/src/start-compiler-plugin/plugin.ts (1)

      63-81: Safer resolution for optional packages and keep filters resilient across environments.

      Current unconditional resolvePackage(...) can throw if a package isn’t installed in a consumer setup. Wrap resolves to avoid hard failures while still excluding when present.

      Apply this diff within the selected block to use a safe resolver:

      -            ...makeIdFiltersToMatchWithQuery([
      -              ...resolveRuntimeFiles({
      +            ...makeIdFiltersToMatchWithQuery([
      +              ...safeResolveRuntimeFiles({
                       package: '@tanstack/start-client-core',
                       files: [
                         'index.js',
                         'createIsomorphicFn.js',
                         'envOnly.js',
                         'serverFnFetcher.js',
                       ],
                     }),
      -              ...resolveRuntimeFiles({
      +              ...safeResolveRuntimeFiles({
                       package: '@tanstack/start-server-core',
                       files: ['index.js', 'server-functions-handler.js'],
                     }),
      -              ...resolveRuntimeFiles({
      +              ...safeResolveRuntimeFiles({
                       package: `@tanstack/${framework}-start-client`,
                       files: ['index.js'],
                     }),
                   ]),

      Add this helper near resolveRuntimeFiles for graceful fallback:

      function safeResolveRuntimeFiles(opts: { package: string; files: Array<string> }) {
        try {
          return resolveRuntimeFiles(opts)
        } catch {
          return []
        }
      }
      • Confirm that narrowing the excluded files (dropping createServerFn.js, createMiddleware.js, serverRoute.js, etc.) is intentional and covered by tests (no unintended transforms of runtime internals).
      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 06839407b9246f406615ba529c35b8fed8e753c1 and c7135bca5c617bab547d60bb6f922fc1854abf60.

      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (14)
      • docs/router/integrations/query.md (2 hunks)
      • docs/start/framework/react/authentication.md (7 hunks)
      • docs/start/framework/react/observability.md (2 hunks)
      • packages/react-start/src/default-entry/server.ts (1 hunks)
      • packages/react-start/src/default-entry/start.ts (1 hunks)
      • packages/react-start/vite.config.server-entry.ts (1 hunks)
      • packages/router-plugin/src/core/code-splitter/compilers.ts (1 hunks)
      • packages/router-plugin/src/core/router-code-splitter-plugin.ts (1 hunks)
      • packages/solid-start/src/default-entry/server.ts (1 hunks)
      • packages/solid-start/src/default-entry/start.ts (1 hunks)
      • packages/solid-start/vite.config.server-entry.ts (1 hunks)
      • packages/start-client-core/src/client/hydrateStart.ts (1 hunks)
      • packages/start-plugin-core/package.json (1 hunks)
      • packages/start-plugin-core/src/start-compiler-plugin/plugin.ts (2 hunks)
      🧰 Additional context used
      📓 Path-based instructions (7)
      docs/**/*.{md,mdx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)

      Files:

      • docs/start/framework/react/observability.md
      • docs/router/integrations/query.md
      • docs/start/framework/react/authentication.md
      docs/{router,start}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place router docs under docs/router/ and start framework docs under docs/start/

      Files:

      • docs/start/framework/react/observability.md
      • docs/router/integrations/query.md
      • docs/start/framework/react/authentication.md
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use TypeScript in strict mode with extensive type safety across the codebase

      Files:

      • packages/react-start/src/default-entry/start.ts
      • packages/react-start/vite.config.server-entry.ts
      • packages/solid-start/vite.config.server-entry.ts
      • packages/router-plugin/src/core/router-code-splitter-plugin.ts
      • packages/solid-start/src/default-entry/start.ts
      • packages/router-plugin/src/core/code-splitter/compilers.ts
      • packages/solid-start/src/default-entry/server.ts
      • packages/start-client-core/src/client/hydrateStart.ts
      • packages/react-start/src/default-entry/server.ts
      • packages/start-plugin-core/src/start-compiler-plugin/plugin.ts
      packages/{*-start,start-*}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Name and place Start framework packages under packages/-start/ or packages/start-/

      Files:

      • packages/react-start/src/default-entry/start.ts
      • packages/react-start/vite.config.server-entry.ts
      • packages/solid-start/vite.config.server-entry.ts
      • packages/solid-start/src/default-entry/start.ts
      • packages/solid-start/src/default-entry/server.ts
      • packages/start-client-core/src/client/hydrateStart.ts
      • packages/react-start/src/default-entry/server.ts
      • packages/start-plugin-core/src/start-compiler-plugin/plugin.ts
      • packages/start-plugin-core/package.json
      packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

      Files:

      • packages/router-plugin/src/core/router-code-splitter-plugin.ts
      • packages/router-plugin/src/core/code-splitter/compilers.ts
      packages/router-plugin/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Use unplugin for universal bundler plugins in the router-plugin package

      Files:

      • packages/router-plugin/src/core/router-code-splitter-plugin.ts
      • packages/router-plugin/src/core/code-splitter/compilers.ts
      **/package.json

      📄 CodeRabbit inference engine (AGENTS.md)

      Use workspace:* protocol for internal dependencies in package.json files

      Files:

      • packages/start-plugin-core/package.json
      🧠 Learnings (2)
      📚 Learning: 2025-09-23T17:36:12.589Z
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.589Z
      Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

      Applied to files:

      • packages/react-start/src/default-entry/server.ts
      📚 Learning: 2025-09-23T17:36:12.589Z
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.589Z
      Learning: Applies to packages/router-plugin/** : Use unplugin for universal bundler plugins in the router-plugin package

      Applied to files:

      • packages/start-plugin-core/package.json
      🧬 Code graph analysis (2)
      packages/react-start/src/default-entry/start.ts (1)
      packages/solid-start/src/default-entry/start.ts (1)
      • startInstance (1-1)
      packages/solid-start/src/default-entry/start.ts (1)
      packages/react-start/src/default-entry/start.ts (1)
      • startInstance (1-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)
      • GitHub Check: Preview
      • GitHub Check: Test
      🔇 Additional comments (14)
      docs/start/framework/react/observability.md (2)

      520-523: Rename to inputValidator looks correct (OpenTelemetry example).

      The validation and handler data destructuring align.


      64-66: Rename to inputValidator looks correct. The builder chain and handler signature remain consistent. No .validator( usages found in .md/.mdx docs.

      docs/start/framework/react/authentication.md (1)

      50-51: No stale .validator references remain. All examples now consistently use .inputValidator(...) with the correct handler signature.

      docs/router/integrations/query.md (3)

      41-60: Approve rename to getRouter — verified all docs reference getRouter(), no instances of createAppRouter.


      21-28: Install as a runtime dependency — LGTM

      No other docs reference dev installs for @tanstack/react-router-ssr-query.


      36-39: Verified SSR query integration API exports: @tanstack/react-router-ssr-query exports setupRouterSsrQueryIntegration with options router, queryClient, handleRedirects?, and wrapQueryClient?.

      packages/react-start/src/default-entry/server.ts (1)

      5-5: Register type source change looks correct; verify version alignment.

      Switching Register to come from @tanstack/react-router matches the Solid variant and likely the intended public source. Please confirm package/peer versions are aligned to avoid DTS drift.

      packages/react-start/vite.config.server-entry.ts (1)

      7-7: Removing '#tanstack-start-entry' from externals looks good.

      Matches the broader migration to a named startInstance import. Please confirm server-entry builds don’t reference the virtual module anymore.

      packages/solid-start/src/default-entry/server.ts (1)

      12-13: Good: ESLint suppression aligns with intended DTS cast.

      Parity with React entry is recommended (React file currently lacks this line).

      packages/solid-start/vite.config.server-entry.ts (1)

      7-7: LGTM on externalDeps trim.

      Consistent with the startInstance named export approach.

      packages/start-client-core/src/client/hydrateStart.ts (1)

      6-6: Named import switch is correct given the new entry surface.

      Assuming the start entry module resolves, this aligns with the new export shape.

      packages/router-plugin/src/core/router-code-splitter-plugin.ts (1)

      134-136: Passing Set or undefined for deleteNodes is correct; consistent with downstream non-null assertions.

      This aligns with the guard in compilers.ts that checks size before calling .has. No action needed.

      Please confirm that userConfig.codeSplittingOptions?.deleteNodes is typed as Array to ensure Set construction is type-safe.

      packages/start-plugin-core/src/start-compiler-plugin/plugin.ts (1)

      8-8: Import of makeIdFiltersToMatchWithQuery is appropriate for query-aware ID matching.

      Good improvement to handle id queries (e.g., ?v=...).

      Please verify cross-bundler support: that Unplugin’s transform.filter id exclude array accepts the filter objects produced by @rolldown/pluginutils in Vite, Webpack, and Rspack environments.

      packages/start-plugin-core/package.json (1)

      67-67: Confirm @rolldown/pluginutils version publishing The dependency is pinned to 1.0.0-beta.40 but npm only publishes up to 1.0.0-beta.34 (which does export makeIdFiltersToMatchWithQuery). Ensure 1.0.0-beta.40 is available on your registry or revert the version to 1.0.0-beta.34.

      packages/react-start/src/default-entry/start.ts line 1
      @@ -1 +1 @@
      1-export default {}
      1+export const startInstance = undefined

      ⚠️ Potential issue

      Typing issue: exported startInstance is undefined, breaking downstream type narrowing.

      With export const startInstance = undefined, the type is undefined, making if (startInstance) { await startInstance.getOptions() } unreachable/invalid in consumers (e.g., hydrateStart.ts). Export a union with a minimal shape to satisfy usage.

      -export const startInstance = undefined
      +export type StartInstanceShim = {
      +  getOptions: () => Promise<unknown>
      +}
      +export const startInstance: StartInstanceShim | undefined = undefined
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      export type StartInstanceShim = {
        getOptions: () => Promise<unknown>
      }
      export const startInstance: StartInstanceShim | undefined = undefined
      🤖 Prompt for AI Agents
      In packages/react-start/src/default-entry/start.ts around line 1, the file
      currently exports startInstance as the literal value undefined which gives it
      the type undefined and breaks downstream type-narrowing; change this to export a
      typed union so consumers can narrow safely: declare a minimal interface/type
      that matches expected usage (at least a getOptions method returning a Promise or
      appropriate signature used by hydrateStart.ts), then export startInstance with
      that interface unioned with undefined (e.g., MyStartInstance | undefined) and
      initialize it to undefined so runtime value remains the same but TypeScript sees
      the correct shape for conditional checks.
      packages/solid-start/src/default-entry/start.ts line 1
      @@ -1 +1 @@
      1-export default {}
      1+export const startInstance = undefined

      ⚠️ Potential issue

      Same typing issue as React: startInstance must not be undefined-only.

      Expose a union with a minimal method contract so downstream getOptions() compiles.

      -export const startInstance = undefined
      +export type StartInstanceShim = {
      +  getOptions: () => Promise<unknown>
      +}
      +export const startInstance: StartInstanceShim | undefined = undefined
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      export type StartInstanceShim = {
        getOptions: () => Promise<unknown>
      }
      export const startInstance: StartInstanceShim | undefined = undefined
      🤖 Prompt for AI Agents
      In packages/solid-start/src/default-entry/start.ts around line 1, the exported
      startInstance is currently undefined-only which breaks downstream typing for
      getOptions; change the export to a union type exposing a minimal method contract
      (e.g. an object shape that includes the getOptions signature used downstream) so
      startInstance can be either that object or undefined, update the exported
      declaration accordingly, and ensure the declared getOptions parameter and return
      types match the expectations in downstream code so compilation succeeds.

Sign in to join this conversation.