Skip to content
Source
Sign inSign up
TanStack/router

refactor(start)!: remove the deprecated inputValidator #8694

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

Stacked on #7588. Merge that first; this PR only contains the two commits on top of it.

createServerFn().inputValidator() and createMiddleware().inputValidator() were deprecated aliases of .validator() since #7566. This removes them, so .validator() is the only way to declare a validator.

Changes

  • start-client-core: the builders no longer have inputValidator, and the deprecated inputValidator types are gone. Server functions now store their validator under validator, the only key middleware reads.
  • start-plugin-core: the compiler no longer tracks .inputValidator() calls or warns about them. The test for diagnostic locations across line terminators now checks the code frame of the destructuring diagnostic, as its TODO asked.
  • AGENTS.md: adds a rule not to write tests that assert a removed API is gone.

Migration

Rename every .inputValidator( call to .validator(. The argument and the inferred types are the same. Code that reads options.inputValidator should read options.validator. A leftover call fails type checking, and without type checking it throws a TypeError when the module loads.

The compiler's warn callback on StartCompilerTransformContext was added for this deprecation and no built-in code calls it anymore. It stays, because external compiler transforms receive that context.

Testing

  • start-client-core, start-plugin-core, start-server-core: test:unit, test:types, test:eslint
  • react-start, solid-start, vue-start: test:build, test:unit
  • e2e/react-start/server-functions: all modes pass
  • Bundle size, full run against a baseline: react-start.full -32 B gzip, react-start.rsbuild.full -26 B, solid-start.full -37 B, vue-start.full -29 B, all other scenarios unchanged

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Breaking Changes
    • Removed the deprecated .inputValidator() method from server functions and middleware. Use .validator() with the same validator instead.
  • Bug Fixes
    • Server-side validation now consistently uses .validator() for server functions and middleware.
    1. 🦋 Changeset detected

      Latest commit: b14a8cc2261e42ac38afa37171600a4b2257fcb0

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 14 packages
      NameType
      @tanstack/start-client-corePatch
      @tanstack/start-plugin-corePatch
      @tanstack/react-startPatch
      @tanstack/solid-startPatch
      @tanstack/vue-startPatch
      @tanstack/react-start-clientPatch
      @tanstack/react-start-rscPatch
      @tanstack/solid-start-clientPatch
      @tanstack/start-server-corePatch
      @tanstack/start-static-server-functionsPatch
      @tanstack/vue-start-clientPatch
      @tanstack/react-start-serverPatch
      @tanstack/solid-start-serverPatch
      @tanstack/vue-start-serverPatch

      Not sure what this means? Click here to learn what changesets are.

      Click here if you're a maintainer who wants to add another changeset to this PR

    2. Codex Review Summary

      This comment shows the latest Codex review activity on this pull request.

      ReviewStatusCommitReview trigger
      🔒 Security Review✅ Completed 2026-10-12T21:52:02.341445Zc6aa556PR opened
      ℹ️ About Codex in GitHub

      Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

      • Open a pull request for review
      • Mark a draft as ready
      • Comment "@codex review" or "@codex security review".

      Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

    3. Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Repository: TanStack/router/.coderabbit.yaml
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 438ea7be-344b-42ff-8838-4f584b4e0d05
      📥 Commits

      Reviewing files that changed from the base of the PR and between 94d6d8e49694e225cb07e2a6777633d08aeeb3c5 and b14a8cc2261e42ac38afa37171600a4b2257fcb0.

      📒 Files selected for processing (13)
      • .changeset/remove-input-validator.md
      • AGENTS.md
      • packages/start-client-core/src/createMiddleware.ts
      • packages/start-client-core/src/createServerFn.ts
      • packages/start-client-core/src/tests/createServerFn.test-d.ts
      • packages/start-client-core/src/tests/createServerMiddleware.test-d.ts
      • packages/start-plugin-core/src/start-compiler/compiler.ts
      • packages/start-plugin-core/src/start-compiler/handleCreateMiddleware.ts
      • packages/start-plugin-core/src/start-compiler/handleCreateServerFn.ts
      • packages/start-plugin-core/src/start-compiler/types.ts
      • packages/start-plugin-core/tests/createMiddleware/createMiddleware.test.ts
      • packages/start-plugin-core/tests/createServerFn/createServerFn.test.ts
      • packages/start-server-core/tests/server-functions-reconciliation.test.ts
      💤 Files with no reviewable changes (5)
      • packages/start-client-core/src/tests/createServerMiddleware.test-d.ts
      • packages/start-plugin-core/src/start-compiler/compiler.ts
      • packages/start-client-core/src/tests/createServerFn.test-d.ts
      • packages/start-plugin-core/tests/createMiddleware/createMiddleware.test.ts
      • packages/start-plugin-core/src/start-compiler/types.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

      📝 Walkthrough

      Walkthrough

      The pull request removes .inputValidator() from the createServerFn and createMiddleware APIs and compiler handling. It updates related type and runtime tests, compiler tests, contributor guidance, and release notes to use .validator().

      Changes

      Validator API removal

      Layer / File(s)Summary
      Builder API and validation options
      packages/start-client-core/src/createMiddleware.ts, packages/start-client-core/src/createServerFn.ts, packages/start-client-core/src/tests/*, packages/start-server-core/tests/server-functions-reconciliation.test.ts, .changeset/remove-input-validator.md
      The middleware and server-function builders and their types no longer expose inputValidator. Validation options and middleware execution use validator, and the reconciliation tests call .validator(). The changeset records patch releases for five Start packages.
      Compiler handling and coverage
      packages/start-plugin-core/src/start-compiler/*, packages/start-plugin-core/tests/createMiddleware/createMiddleware.test.ts, packages/start-plugin-core/tests/createServerFn/createServerFn.test.ts, AGENTS.md
      The compiler tracks and handles .validator() calls without inputValidator handling or deprecation warnings. Compiler tests remove warning checks and cover diagnostic locations across line-ending formats. Contributor guidance addresses tests for removed APIs.

      Priority: ➖ Normal

      Estimated code review effort: 2 (Simple) | ~12 minutes

      Change: Refactor

      Suggested reviewers: sheraff

      Merge Risk: ⚪ Minimal · up to b14a8

      This removes a deprecated API in favor of the existing validator method. Callers still using inputValidator will fail, which is the intended and documented breaking change. No merge-blocking risk was found.

      Pre-merge checks · Passed 4 · Failed 1
      Failed Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Docstring CoverageWarningDocstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 6 files. (2 skipped: 2…Write docstrings for the functions missing them to satisfy the coverage threshold.
      Passed Passed checks (4 passed)
      Check nameStatusExplanation
      Title checkPassedThe title clearly and concisely identifies the main change: removing the deprecated inputValidator API.
      Description checkPassedThe description explains the change, migration path, testing, release impact, and AI assistance. It omits the template's explicit Checklist and Release Impact headings, but it provides the required in…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Docstring Coverage

      Explanation

      Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 6 files. (2 skipped: 2 unsupported.)

      • Fix all pre-merge checks with AI
      ✨ Finishing Touches 💡 1
      📝 Generate docstrings 💡
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      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.
    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-server-core

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

    7. Bundle Size Benchmarks

      • Commit: 86c1a7ab0e41
      • Measured at: 2026-10-12T22:09:13.309Z
      • Baseline source: history:94d6d8e49694
      • Dashboard: bundle-size history

      The following scenarios have bundle-size changes compared with the baseline:

      ScenarioCurrent (gzip)Initial (gzip)RawBrotliTrend
      react-start.full99.8 KiB
      -32 B
      99.7 KiB
      -32 B
      311.6 KiB
      -121 B
      86.7 KiB
      +20 B
      ▄▅████████▃▁
      react-start.rsbuild.full103.5 KiB
      -26 B
      103.3 KiB
      -26 B
      322.9 KiB
      -121 B
      89.3 KiB
      -84 B
      ▇▇████████▄▁
      solid-start.full51.2 KiB
      -37 B
      51.0 KiB
      -34 B
      150.0 KiB
      -121 B
      45.4 KiB
      -135 B
      ▆█▅▅▅▅▅▅▅▅▂▁
      vue-start.full69.1 KiB
      -29 B
      69.0 KiB
      -29 B
      197.5 KiB
      -121 B
      61.6 KiB
      -68 B
      ▆█▅▅▅▅▅▅▅▅▂▁

      Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.

    8. View your CI Pipeline Execution ↗ for commit b14a8cc2261e42ac38afa37171600a4b2257fcb0

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

      ☁️ Nx Cloud last updated this comment at 2026-10-12 22:37:43 UTC

    9. 🚀 Changeset Version Preview

      13 package(s) bumped directly, 10 bumped as dependents.

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/react-start1.168.61 → 1.168.62Changeset
      @tanstack/react-start-server1.167.47 → 1.167.48Changeset
      @tanstack/router-core1.171.35 → 1.171.36Changeset
      @tanstack/router-generator1.167.41 → 1.167.42Changeset
      @tanstack/router-plugin1.168.43 → 1.168.44Changeset
      @tanstack/solid-start1.168.58 → 1.168.59Changeset
      @tanstack/solid-start-server1.167.45 → 1.167.46Changeset
      @tanstack/start-client-core1.170.35 → 1.170.36Changeset
      @tanstack/start-plugin-core1.171.50 → 1.171.51Changeset
      @tanstack/start-server-core1.169.40 → 1.169.41Changeset
      @tanstack/start-storage-context1.167.37 → 1.167.38Changeset
      @tanstack/vue-start1.168.57 → 1.168.58Changeset
      @tanstack/vue-start-server1.167.45 → 1.167.46Changeset
      @tanstack/react-router1.170.42 → 1.170.43Dependent
      @tanstack/react-start-client1.168.40 → 1.168.41Dependent
      @tanstack/react-start-rsc0.1.60 → 0.1.61Dependent
      @tanstack/router-cli1.167.41 → 1.167.42Dependent
      @tanstack/router-vite-plugin1.167.43 → 1.167.44Dependent
      @tanstack/solid-router1.170.39 → 1.170.40Dependent
      @tanstack/solid-start-client1.168.38 → 1.168.39Dependent
      @tanstack/start-static-server-functions1.167.40 → 1.167.41Dependent
      @tanstack/vue-router1.170.38 → 1.170.39Dependent
      @tanstack/vue-start-client1.167.41 → 1.167.42Dependent
    10. More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/@tanstack/arktype-adapter@8694

      @tanstack/eslint-plugin-router

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

      @tanstack/eslint-plugin-start

      npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8694

      @tanstack/history

      npm i https://pkg.pr.new/@tanstack/history@8694

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

      npm i https://pkg.pr.new/@tanstack/react-start@8694

      @tanstack/react-start-client

      npm i https://pkg.pr.new/@tanstack/react-start-client@8694

      @tanstack/react-start-rsc

      npm i https://pkg.pr.new/@tanstack/react-start-rsc@8694

      @tanstack/react-start-server

      npm i https://pkg.pr.new/@tanstack/react-start-server@8694

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

      npm i https://pkg.pr.new/@tanstack/solid-start@8694

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/@tanstack/solid-start-client@8694

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/@tanstack/solid-start-server@8694

      @tanstack/start-client-core

      npm i https://pkg.pr.new/@tanstack/start-client-core@8694

      @tanstack/start-fn-stubs

      npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8694

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/@tanstack/start-plugin-core@8694

      @tanstack/start-server-core

      npm i https://pkg.pr.new/@tanstack/start-server-core@8694

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/@tanstack/start-storage-context@8694

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/@tanstack/valibot-adapter@8694

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8694

      @tanstack/vue-router

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

      @tanstack/vue-router-devtools

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

      @tanstack/vue-router-ssr-query

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

      @tanstack/vue-start

      npm i https://pkg.pr.new/@tanstack/vue-start@8694

      @tanstack/vue-start-client

      npm i https://pkg.pr.new/@tanstack/vue-start-client@8694

      @tanstack/vue-start-server

      npm i https://pkg.pr.new/@tanstack/vue-start-server@8694

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/@tanstack/zod-adapter@8694

      commit: b14a8cc

    11. Merging this PR will improve performance by 3.34%

      :information_source: 3 benchmarks have no flame graph

      The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.

      :warning: Different runtime environments detected

      Some benchmarks with significant performance changes were compared across different runtime environments, which may affect the accuracy of the results.

      Open the report in CodSpeed to investigate

      ⚡ 1 improved benchmark ✅ 193 untouched benchmarks ⏩ 3 skipped benchmarks1

      Performance Changes

      ModeBenchmarkBASEHEADEfficiency
      ⚡Memorymem client navigation-churn (solid)98.1 KB95 KB+3.34%

      Tip

      Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


      Comparing remove-input-validator (b14a8cc) with main (94d6d8e) Open in CodSpeed

      Footnotes

      1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Sign in to join this conversation.