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 0814bc3da2
test(start-plugin-core): Vite dev import protection gaps (onViolation, start entry, split routes, non-JS modules, edits, traces)
Dev server tests (tests/importProtection/dev.test.ts):
- onViolation that returns nothing keeps the warning; with behavior
  "error", an onViolation that does not return false does not allow the
  import (denied file and specifier).
- A denied import reached only from the start entry (src/start.ts) is
  mocked and logged.
- A split route component using a denied file, directly or through a module
  only the split module imports, is mocked and logged at each use (Start's
  whole plugin).
- An .mdx module (stand-in compiler plugin) importing a denied file, directly
  or through a module, is mocked and logged at each importer.
- A denied specifier added to an importer by an edit is a mock the edited
  module can import.
- An edit of a CSS module and a JSON module updates without an HMR error.
- A use of a specifier denied by a custom pattern rule in a JSX module is
  located on its source line.
- Full-bundle dev (bundledDev): denied imports are mocked in the client
  bundle and logged (no import-protection test covered bundledDev).
- With maxTraceDepth, the trace ends at the importer, each step naming the
  import of the next.
- Control: a module the client loads after the server rendered is logged.
start-apps.ts: startProtectedDevServer gains an additive `bundledDev` option.

Pins (test.fails, NEW main bugs):
- Dev ignores maxTraceDepth: the module graph trace replaces the cut trace
  (vite/import-protection-plugin/plugin.ts rebuildAndAnnotateTrace).
- Dev: an .mdx (non-JS) module importing a denied specifier fails to load
  with "[vite] The "code" property of ModuleInfo is not supported."
  (resolveExportsForDeniedSpecifier falls back to getModuleInfo().code).
- With server.perEnvironmentStartEndDuringDev, the first request of another
  environment clears every environment's state (buildStart clearEnvState),
  so violations of modules the client loads afterwards are discarded.

Kills: spc:4741, 4763, 4524, 4639, 4579, 4609, 4611, 4174, 4182, 4529,
4530, 4536, 4542, 4510, 4551, 4552, 4553, 4556, 4497, 4494, 4474, 4484,
4037, 4043, 4045, 4047, 4049, 4052, 4054, 4056, 4059, 4070, 4071, 4076,
4077, 4078, 4081, 4085, 4086, 4088, 4089, 4090, 4094, 4098, 4099, 4103,
4107, 4110, 4114, 4115, 4213, 4035, 4036, 4039, 4040, 4042, 4048, 4061,
4063, 4065, 4074, 4075, 4092, 4096, 4100, 4111, 4212, 4214, 4215, 4217,
4221, 4222 (module graph trace and clearEnvState keys by pin flip).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
History 2026-10-17 19:44:10 +02:00
.agents/skills
.changeset
.devcontainer
.github
.nx/workflows
_artifacts
benchmarks
docs
e2e
examples
gpt
media
packages
scripts
skills/bundle-size-optimization
.coderabbit.yaml
.gitattributes
.gitignore
.npmrc
.nvmrc
.prettierignore
AGENTS.md
CONTRIBUTING.md
DEBUGGING.md
eslint.config.js
how-to-guides-implementation-plan.md
how-to-testing-plan.md
knip.json
labeler-config.yml
LICENSE
nx.json
package.json
pnpm-lock.yaml
pnpm-workspace.yaml
prettier.config.js
README.md
top-10-how-to-guides.md
tsconfig.json

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 »