0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
🤖 A client-first, server-capable, fully type-safe router and full-stack framework for the web (React and more). https://tanstack.com/router
  • TypeScript 98.2%
  • JavaScript 1.2%
  • CSS 0.4%
  • Vue 0.1%
  • HTML 0.1%
Find a file
Sheraff a220a0579a
test(router-generator): route file upkeep through generate(), transform unit suite out of the corpus
Audit D H6: transform.test.ts drives the internal ../src/transform module
with hand-built RouteNodes, so a rewrite with no user-visible difference
fails it. It moves to tests/outside-compiler-corpus/transform.test.ts (header
"Not part of the compiler test corpus"), and the route file upkeep it
covers is re-expressed in tests/route-file-upkeep.test.ts through full
generator runs, reading the file back and evaluating it: id fixed through
cast options, double-quoted and template-literal ids, aliased Route export,
export lists, a second non-exported route call, .ts angle-bracket
assertions (#7341); root route files (createRootRoute,
createRootRouteWithContext, export list) left byte for byte; constructor
switches both ways (semicolon import, type specifier, multi-line import);
the right constructor when the id is already right (5 rows); missing
constructor import added on its own line (LF, CRLF, single line, next to
another package's import, next to an aliased or a namespace import,
semicolon style); type imports stay type-only; stale imports of the other
constructor (CRLF, BOM + astral characters, trailing whitespace, same-line
import, semicolons, untouched declaration, aliased constructor); Route
re-exports / app route factories left as they are; ids the generator
cannot rewrite and malformed route calls reported by file name (failed run,
or a warning with the file untouched).

Coordinator ruling on D ASK-1 (removing an unused import of the other
route constructor is allowed, not required): every stale-import test, in
the corpus file and in the moved unit suite (transform:203 CRLF, :625 BOM,
:772 rows 2-4, :916, :932, :946, :984, :997), accepts the import kept or
dropped, and always checks that the file evaluates, has the right id,
binds the right constructor once and keeps its non-import code.

Audit D rows applied to the moved unit suite:
- transform:50 through parentheses: deleted (0 of ~50k corpus files wrap
  the constructor or the id in parentheses).
- transform:511 redeclared `var Route` twice: deleted (0 corpus files with
  two `var Route = create...Route(` declarations).
- transform:823 export-list helper `no-route-export`: deleted (internal
  result code); known-bugs "a route file without a Route export is left
  out with a warning" row 2 covers it through a run.
- transform:829 `export let Route` without initializer: row dropped (0
  corpus files); the Route-from-another-binding row stays.
Not re-expressed in the corpus (kept in the unit suite only): the
parenthesized call `((createFileRoute('/old'))({}))` and the
multi-declarator export (0 corpus files each), the default import of the
router package (the package has no default export), and two exported
Route bindings (not a valid module).

Also: literal BOM characters typed into generator-options.test.ts and the
new file are written as  escapes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
History 2026-10-18 12:11:08 +02:00
.agents/skills improve bundle size benchmarks and add initial skill (#7450) 2026-06-04 22:48:53 +02:00
.changeset refactor(router-plugin): remove enableRouteGeneration option (#8737) 2026-10-17 12:22:15 +02:00
.devcontainer docs: add devcontainer config (#6970) 2026-03-18 15:10:30 +01:00
.github Merge remote-tracking branch 'origin/main' into compiler-tests/infra-fix 2026-10-18 10:31:34 +02:00
.nx/workflows test: fix Nx sandbox violations in CI tasks (#8400) 2026-09-14 10:54:23 +02:00
_artifacts docs: use new query methods (#7100) 2026-10-06 17:59:20 +02:00
benchmarks bump node version to 26.10.0 (#8509) 2026-10-17 17:04:18 +02:00
docs perf: lower manifest script preload priority (#8212) 2026-10-16 15:35:33 +02:00
e2e Merge remote-tracking branch 'origin/main' into compiler-tests/infra-fix 2026-10-18 10:31:34 +02:00
examples ci: Version Packages (#8733) 2026-10-16 23:05:28 +02:00
gpt chore: use tinyglobby instead of glob (#2880) 2024-11-28 21:28:27 +01:00
media docs: use the dynamic README header endpoint (#7940) 2026-08-03 21:03:29 +02:00
packages test(router-generator): route file upkeep through generate(), transform unit suite out of the corpus 2026-10-18 12:11:08 +02:00
scripts ci: keep bundle-size measurement out of the Test workflow (#8669) 2026-10-17 12:35:23 +02:00
skills/bundle-size-optimization ci: keep bundle-size measurement out of the Test workflow (#8669) 2026-10-17 12:35:23 +02:00
.coderabbit.yaml docs: clarify contribution guidelines (#8163) 2026-08-25 05:14:16 +02:00
.gitattributes chore: better build system 2022-01-31 12:06:06 -07:00
.gitignore chore: update nx to 23.2.0 (#8341) 2026-09-10 18:28:24 +02:00
.npmrc ci: move pnpm settings to pnpm-workspace.yaml (#6076) 2025-12-12 15:25:17 +11:00
.nvmrc bump node version to 26.10.0 (#8509) 2026-10-17 17:04:18 +02:00
.prettierignore fix: harden URL handling across Router and Start (#8308) 2026-09-09 23:03:49 +02:00
AGENTS.md refactor(start)!: remove the deprecated inputValidator (#8694) 2026-10-13 00:32:10 +02:00
CONTRIBUTING.md add AI rules to CONTRIBUTING.md (#8714) 2026-10-14 17:40:27 +02:00
DEBUGGING.md feat: optional path params (#4597) 2025-07-16 13:41:58 -06:00
eslint.config.js test: migrate lint from tanstack/config to tanstack/eslint-config (#6915) 2026-03-13 03:02:00 +01:00
how-to-guides-implementation-plan.md docs: search param sharing/inheritance how-to 2025-07-30 11:09:18 -06:00
how-to-testing-plan.md ci: apply automated fixes 2025-07-28 19:18:28 +00:00
knip.json chore: Migrate to ESLint flat config (#1846) 2024-06-28 11:59:39 +10:00
labeler-config.yml chore: remove experimental Nitro v2 Vite plugin (#8537) 2026-10-13 00:42:07 +02:00
LICENSE Update outdated LICENSE year (#335) 2022-11-10 08:49:28 -07:00
nx.json optimize streaming (#8204) 2026-09-16 22:38:25 +02:00
package.json fix(nx): cache benchmark checks and build measurements (#8343) 2026-09-10 18:55:36 +02:00
pnpm-lock.yaml Merge remote-tracking branch 'origin/main' into compiler-tests/infra-fix 2026-10-18 10:31:34 +02:00
pnpm-workspace.yaml chore(deps): upgrade Vitest to 5 and migrate benchmarks to the bench fixture (#8723) 2026-10-16 00:41:32 +02:00
prettier.config.js ci: enable renovate automerge, pin actions (#2012) 2024-07-23 11:13:39 +10:00
README.md docs: use the dynamic README header endpoint (#7940) 2026-08-03 21:03:29 +02:00
top-10-how-to-guides.md docs: Identify top 10 how-to docs, add deployment guide (#4701) 2025-07-18 15:15:07 -06:00
tsconfig.json optimize streaming (#8204) 2026-09-16 22:38:25 +02:00

TanStack Router

TanStack Router

A modern router designed for type safety, data‑driven navigation, and seamless developer experience.

  • End‑to-end type safety (routes, params, loaders)
  • Schema‑driven search params with validation
  • Built‑in caching, prefetching & invalidation
  • Nested layouts, transitions & error boundaries

Read the Router Docs →

TanStack Start

TanStack Start

A full‑stack framework built on Router, designed for server rendering, streaming, and production‑ready deployments.

  • Full‑document SSR & streaming
  • Server functions & end‑to‑end type safety
  • Deployment‑ready bundling & builds
  • All the power of TanStack Router, plus full‑stack features

Read the Start Docs →


npm downloads GitHub stars Bundle size

semantic-release Best of JS Follow @TanStack

Get Involved

Partners

CodeRabbit Cloudflare Netlify
Neon Clerk Convex
Sentry Prisma Strapi
Router & you?

We're looking for TanStack Router & Start Partners to join our mission! Partner with us to push the boundaries of TanStack Router & Start and build amazing things together.

LET'S CHAT

Explore the TanStack Ecosystem

… and more at TanStack.com »