From faec323dc5f6e1edf08779ef50cdf935843ddcd1 Mon Sep 17 00:00:00 2001
From: Flo
Date: Thu, 17 Sep 2026 10:05:30 +0200
Subject: [PATCH 001/127] fix(router-core): missing deepEqual signature changes
in replace-equal-deep benchmark (#8462)
---
packages/router-core/tests/replace-equal-deep.bench.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/router-core/tests/replace-equal-deep.bench.ts b/packages/router-core/tests/replace-equal-deep.bench.ts
index bfcf65feff..86639cb26d 100644
--- a/packages/router-core/tests/replace-equal-deep.bench.ts
+++ b/packages/router-core/tests/replace-equal-deep.bench.ts
@@ -189,7 +189,7 @@ expect(nullReplaceEqualDeep(emptyNull, {})).toBe(emptyNull)
expect(
nullReplaceEqualDeep(searchWithConstructorKey, searchWithConstructorKeyCopy),
).toBe(searchWithConstructorKey)
-expect(deepEqual(search, searchCopy, { partial: true })).toBe(true)
+expect(deepEqual(search, searchCopy, true)).toBe(true)
expect(isPlainObject(search)).toBe(true)
expect(isPlainObject(emptyNull)).toBe(true)
expect(isPlainObject(searchWithConstructorKey)).toBe(true)
@@ -524,7 +524,7 @@ describe('deepEqual', () => {
bench('equal flat search (partial)', () => {
for (let i = 0; i < iterations; i++) {
- sink = deepEqual(search, searchCopy, { partial: true })
+ sink = deepEqual(search, searchCopy, true)
}
})
From 6faf2bf292a547bd2c357b2db882cf90c8374618 Mon Sep 17 00:00:00 2001
From: Flo
Date: Thu, 17 Sep 2026 10:26:33 +0200
Subject: [PATCH 002/127] ci: skip benchmarks for package test-only PRs (#8463)
---
.github/workflows/client-nav-benchmarks.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/client-nav-benchmarks.yml b/.github/workflows/client-nav-benchmarks.yml
index 7eedc222ae..06e7e733b8 100644
--- a/.github/workflows/client-nav-benchmarks.yml
+++ b/.github/workflows/client-nav-benchmarks.yml
@@ -18,6 +18,9 @@ on:
pull_request:
paths:
- 'packages/**'
+ - '!packages/**/tests/**'
+ - '!packages/**/__tests__/**'
+ - '!packages/**/*.test.*'
- 'benchmarks/**'
workflow_dispatch:
From 2fb77232309d34cd179dd526b25020b791b53721 Mon Sep 17 00:00:00 2001
From: Flo
Date: Thu, 17 Sep 2026 11:19:08 +0200
Subject: [PATCH 003/127] perf(benchmarks): compress bundle-size outputs once
(#8453)
* perf(benchmarks): compress bundle-size outputs once
* add link to readme in skill
* ci: apply automated fixes
* fix(benchmarks): persist timing flag in measurement command
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
---
benchmarks/bundle-size/README.md | 23 +++
benchmarks/bundle-size/package.json | 4 +-
scripts/benchmarks/bundle-size/compress.mjs | 64 +++++++
.../benchmarks/bundle-size/compress.test.mjs | 179 ++++++++++++++++++
scripts/benchmarks/bundle-size/measure.mjs | 111 ++++++-----
scripts/benchmarks/bundle-size/run.mjs | 3 +
scripts/benchmarks/bundle-size/run.test.mjs | 8 +
scripts/benchmarks/bundle-size/timings.mjs | 20 ++
.../benchmarks/bundle-size/timings.test.mjs | 35 ++++
skills/bundle-size-optimization/SKILL.md | 5 +
10 files changed, 399 insertions(+), 53 deletions(-)
create mode 100644 scripts/benchmarks/bundle-size/compress.mjs
create mode 100644 scripts/benchmarks/bundle-size/compress.test.mjs
create mode 100644 scripts/benchmarks/bundle-size/timings.mjs
create mode 100644 scripts/benchmarks/bundle-size/timings.test.mjs
diff --git a/benchmarks/bundle-size/README.md b/benchmarks/bundle-size/README.md
index e5986f106c..b5dfc9c4d9 100644
--- a/benchmarks/bundle-size/README.md
+++ b/benchmarks/bundle-size/README.md
@@ -65,6 +65,29 @@ Full stdout and stderr stay in the log files. A positive bundle-size delta does
For agent runs, use `pnpm --silent benchmark:bundle-size:run ...` to omit the package-manager command echo.
+### Phase Timings
+
+To diagnose measurement time, request a fresh run:
+
+```bash
+pnpm benchmark:bundle-size:run --scenario react-router.minimal --analysis --timings
+```
+
+The runner directly executes `measure.mjs` on every invocation, rebuilding the selected scenarios and recording fresh timings in `measure.log`. Its package-build step still uses Nx and may restore cached packages. Use `--skip-package-builds` only when those packages are already built and unchanged.
+
+`measure.mjs` also accepts `--timings` directly. Alternatively, set `BUNDLE_SIZE_TIMINGS=1`. Timing lines go to stderr with the prefix `[bundle-size:timing]` followed by JSON containing `phase`, `durationMs`, and, for scenario phases, `scenario`. They are diagnostics only and do not add fields to the size metrics.
+
+The cached `pnpm benchmark:bundle-size` / Nx build path can replay terminal output from an earlier execution, including old timing lines. Setting `BUNDLE_SIZE_TIMINGS=1` does not invalidate that cache or guarantee fresh timings. Use the direct runner above for timing investigations; refreshing `current.json` after a cache hit does not remeasure build time.
+
+- `package-builds`: elapsed time for the package-build invocation, including Nx startup/cache handling; omitted when package builds are skipped.
+- `scenario-build`: elapsed time for each scenario's build and cleanup.
+- `manifest-resolution`: manifest discovery, parsing, entry selection, and collection of all/initial JS file lists.
+- `gzip` / `brotli`: accumulated codec time across distinct files for each scenario, using Node's default compression settings. File reads and summation are excluded; initial files reuse already measured sizes.
+- `analysis`: source attribution, when `--analysis` is enabled.
+- `overall`: measurement execution through report/history writing. Module imports, process startup, and the outer runner's tests/report command are excluded.
+
+Phases that start also report elapsed work on failure; compression reports partial accumulated times before propagating the error. Timing records alone do not indicate success. `overall` contains the other phases, so nested timings must not be added to it. The phase breakdown also excludes overhead such as file reads and result writing, so its sum is not expected to equal `overall`.
+
## Compare Optimization Candidates
Before you change the implementation, save a named baseline:
diff --git a/benchmarks/bundle-size/package.json b/benchmarks/bundle-size/package.json
index 3705df05fc..283f675e44 100644
--- a/benchmarks/bundle-size/package.json
+++ b/benchmarks/bundle-size/package.json
@@ -4,7 +4,7 @@
"type": "module",
"scripts": {
"build": "node ../../scripts/benchmarks/bundle-size/measure.mjs --skip-package-builds --measurements-only",
- "test:unit": "node --test ../../scripts/benchmarks/bundle-size/pr-report.test.mjs ../../scripts/benchmarks/bundle-size/run.test.mjs ../../scripts/benchmarks/bundle-size/report.test.mjs ../../scripts/benchmarks/bundle-size/build.test.mjs"
+ "test:unit": "node --test ../../scripts/benchmarks/bundle-size/pr-report.test.mjs ../../scripts/benchmarks/bundle-size/run.test.mjs ../../scripts/benchmarks/bundle-size/report.test.mjs ../../scripts/benchmarks/bundle-size/build.test.mjs ../../scripts/benchmarks/bundle-size/compress.test.mjs ../../scripts/benchmarks/bundle-size/timings.test.mjs"
},
"nx": {
"targets": {
@@ -14,6 +14,8 @@
"^buildProduction",
"dependentTaskOutputs",
"{workspaceRoot}/scripts/benchmarks/bundle-size/measure.mjs",
+ "{workspaceRoot}/scripts/benchmarks/bundle-size/compress.mjs",
+ "{workspaceRoot}/scripts/benchmarks/bundle-size/timings.mjs",
"{workspaceRoot}/scripts/benchmarks/bundle-size/report.mjs",
{
"runtime": "node --version"
diff --git a/scripts/benchmarks/bundle-size/compress.mjs b/scripts/benchmarks/bundle-size/compress.mjs
new file mode 100644
index 0000000000..f30d8794ca
--- /dev/null
+++ b/scripts/benchmarks/bundle-size/compress.mjs
@@ -0,0 +1,64 @@
+import fs from 'node:fs'
+import path from 'node:path'
+import { brotliCompressSync, gzipSync } from 'node:zlib'
+
+function sumSizes(files) {
+ let rawBytes = 0
+ let gzipBytes = 0
+ let brotliBytes = 0
+
+ for (const file of files) {
+ rawBytes += file.rawBytes
+ gzipBytes += file.gzipBytes
+ brotliBytes += file.brotliBytes
+ }
+
+ return { rawBytes, gzipBytes, brotliBytes, files }
+}
+
+// Keep the cache local to one measurement: rebuilds can reuse filenames.
+export function measureFileSizes(baseDir, jsFiles, initialJsFiles, onTiming) {
+ const measured = new Map()
+ let gzipMs = 0
+ let brotliMs = 0
+
+ function measureFile(file) {
+ let sizes = measured.get(file)
+ if (sizes) {
+ return sizes
+ }
+
+ const content = fs.readFileSync(path.join(baseDir, file))
+ const gzipStarted = onTiming ? performance.now() : 0
+ let gzipBytes
+ try {
+ gzipBytes = gzipSync(content).byteLength
+ } finally {
+ if (onTiming) {
+ gzipMs += performance.now() - gzipStarted
+ }
+ }
+ const brotliStarted = onTiming ? performance.now() : 0
+ let brotliBytes
+ try {
+ brotliBytes = brotliCompressSync(content).byteLength
+ } finally {
+ if (onTiming) {
+ brotliMs += performance.now() - brotliStarted
+ }
+ }
+
+ sizes = { file, rawBytes: content.byteLength, gzipBytes, brotliBytes }
+ measured.set(file, sizes)
+ return sizes
+ }
+
+ try {
+ const sizes = sumSizes(jsFiles.map(measureFile))
+ const initialSizes = sumSizes(initialJsFiles.map(measureFile))
+ return { sizes, initialSizes }
+ } finally {
+ onTiming?.('gzip', gzipMs)
+ onTiming?.('brotli', brotliMs)
+ }
+}
diff --git a/scripts/benchmarks/bundle-size/compress.test.mjs b/scripts/benchmarks/bundle-size/compress.test.mjs
new file mode 100644
index 0000000000..a73b93b77c
--- /dev/null
+++ b/scripts/benchmarks/bundle-size/compress.test.mjs
@@ -0,0 +1,179 @@
+import assert from 'node:assert/strict'
+import fs from 'node:fs'
+import { syncBuiltinESMExports } from 'node:module'
+import os from 'node:os'
+import path from 'node:path'
+import test from 'node:test'
+import zlib, { brotliCompressSync, gzipSync } from 'node:zlib'
+import { measureFileSizes } from './compress.mjs'
+
+// Independent reference: compress both lists separately, as the CLI did before.
+function legacySizes(baseDir, fileList) {
+ const result = { rawBytes: 0, gzipBytes: 0, brotliBytes: 0, files: [] }
+ for (const file of fileList) {
+ const content = fs.readFileSync(path.join(baseDir, file))
+ const sizes = {
+ file,
+ rawBytes: content.byteLength,
+ gzipBytes: gzipSync(content).byteLength,
+ brotliBytes: brotliCompressSync(content).byteLength,
+ }
+ result.rawBytes += sizes.rawBytes
+ result.gzipBytes += sizes.gzipBytes
+ result.brotliBytes += sizes.brotliBytes
+ result.files.push(sizes)
+ }
+ return result
+}
+
+function fixture(t) {
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-compress-'))
+ t.after(() => fs.rmSync(dir, { recursive: true, force: true }))
+ for (const [file, content] of Object.entries({
+ 'entry.js': 'import "./shared.mjs"; console.log("héllo 🌍");\n'.repeat(30),
+ 'shared.mjs': 'export const shared = "shared chunk";\n'.repeat(100),
+ 'lazy.js': 'export default "lazy route";\n'.repeat(20),
+ 'empty.js': '',
+ })) {
+ fs.writeFileSync(path.join(dir, file), content)
+ }
+ return dir
+}
+
+test('matches legacy per-chunk compression and initial totals exactly', (t) => {
+ const dir = fixture(t)
+ const all = ['entry.js', 'shared.mjs', 'lazy.js', 'empty.js']
+ for (const initial of [
+ [],
+ ['entry.js'],
+ ['shared.mjs', 'entry.js'],
+ all,
+ ['empty.js'],
+ ]) {
+ assert.deepEqual(measureFileSizes(dir, all, initial), {
+ sizes: legacySizes(dir, all),
+ initialSizes: legacySizes(dir, initial),
+ })
+ }
+ assert.deepEqual(measureFileSizes(dir, [], []), {
+ sizes: legacySizes(dir, []),
+ initialSizes: legacySizes(dir, []),
+ })
+})
+
+test('preserves list order and multiplicity, including initial-only files', (t) => {
+ const dir = fixture(t)
+ const all = ['lazy.js', 'entry.js', 'entry.js']
+ const initial = ['shared.mjs', 'entry.js', 'entry.js']
+ assert.deepEqual(measureFileSizes(dir, all, initial), {
+ sizes: legacySizes(dir, all),
+ initialSizes: legacySizes(dir, initial),
+ })
+})
+
+test('remeasures changed files on subsequent calls and propagates read errors', (t) => {
+ const dir = fixture(t)
+ const files = ['entry.js']
+ const before = measureFileSizes(dir, files, files)
+ fs.writeFileSync(path.join(dir, 'entry.js'), 'export default "rebuilt"')
+ const after = measureFileSizes(dir, files, files)
+ assert.notDeepEqual(after, before)
+ assert.deepEqual(after, {
+ sizes: legacySizes(dir, files),
+ initialSizes: legacySizes(dir, files),
+ })
+ assert.throws(() => measureFileSizes(dir, files, ['missing.js']), {
+ code: 'ENOENT',
+ })
+})
+
+test('reports gzip and brotli separately without changing measured output', (t) => {
+ const dir = fixture(t)
+ const all = ['entry.js', 'shared.mjs', 'lazy.js']
+ const initial = ['entry.js', 'shared.mjs']
+ const timings = []
+ const result = measureFileSizes(dir, all, initial, (phase, durationMs) => {
+ timings.push({ phase, durationMs })
+ })
+ assert.deepEqual(result, measureFileSizes(dir, all, initial))
+ assert.deepEqual(
+ timings.map(({ phase }) => phase),
+ ['gzip', 'brotli'],
+ )
+ for (const { durationMs } of timings) {
+ assert.ok(Number.isFinite(durationMs) && durationMs >= 0)
+ }
+})
+
+test('reads and compresses each distinct file only once per measurement', (t) => {
+ const dir = fixture(t)
+ const all = ['entry.js', 'shared.mjs', 'lazy.js', 'entry.js']
+ const initial = ['shared.mjs', 'entry.js', 'empty.js', 'entry.js']
+ const expected = {
+ sizes: legacySizes(dir, all),
+ initialSizes: legacySizes(dir, initial),
+ }
+ const read = t.mock.method(fs, 'readFileSync')
+ const gzip = t.mock.method(zlib, 'gzipSync')
+ const brotli = t.mock.method(zlib, 'brotliCompressSync')
+ syncBuiltinESMExports()
+ t.after(() => {
+ t.mock.restoreAll()
+ syncBuiltinESMExports()
+ })
+
+ for (let measurement = 1; measurement <= 2; measurement++) {
+ assert.deepEqual(measureFileSizes(dir, all, initial), expected)
+ for (const operation of [read, gzip, brotli]) {
+ assert.equal(operation.mock.callCount(), 4 * measurement)
+ }
+ }
+})
+
+test('reports completed compression time when a later file cannot be read', (t) => {
+ const dir = fixture(t)
+ let now = 10
+ t.mock.method(performance, 'now', () => now++)
+ const timings = []
+ assert.throws(
+ () =>
+ measureFileSizes(dir, ['entry.js', 'missing.js'], [], (...entry) => {
+ timings.push(entry)
+ }),
+ { code: 'ENOENT' },
+ )
+ assert.deepEqual(timings, [
+ ['gzip', 1],
+ ['brotli', 1],
+ ])
+})
+
+for (const codec of ['gzipSync', 'brotliCompressSync']) {
+ test(`reports time spent in failed ${codec} and preserves the original exception`, (t) => {
+ const dir = fixture(t)
+ const failure = new Error('codec failed')
+ let now = 20
+ t.mock.method(performance, 'now', () => now++)
+ t.mock.method(zlib, codec, () => {
+ throw failure
+ })
+ syncBuiltinESMExports()
+ t.after(() => {
+ t.mock.restoreAll()
+ syncBuiltinESMExports()
+ })
+
+ const timings = []
+ assert.throws(
+ () =>
+ measureFileSizes(dir, ['entry.js'], [], (...entry) => {
+ timings.push(entry)
+ }),
+ (error) => error === failure,
+ )
+ assert.deepEqual(timings, [
+ ['gzip', 1],
+ ['brotli', codec === 'gzipSync' ? 0 : 1],
+ ])
+ })
+}
diff --git a/scripts/benchmarks/bundle-size/measure.mjs b/scripts/benchmarks/bundle-size/measure.mjs
index d6ed9eeba9..73631eb90b 100644
--- a/scripts/benchmarks/bundle-size/measure.mjs
+++ b/scripts/benchmarks/bundle-size/measure.mjs
@@ -7,11 +7,12 @@ import path from 'node:path'
import { fileURLToPath, pathToFileURL } from 'node:url'
import { parseArgs as parseNodeArgs } from 'node:util'
import vm from 'node:vm'
-import { brotliCompressSync, gzipSync } from 'node:zlib'
import { execFileSync } from 'node:child_process'
import { build } from 'vite'
import { writeReport } from './report.mjs'
+import { measureFileSizes } from './compress.mjs'
+import { createTimings } from './timings.mjs'
const BENCHMARK_NAME = 'Bundle Size (gzip)'
@@ -168,6 +169,7 @@ function parseArgs(argv) {
sourcemap: { type: 'boolean' },
'skip-package-builds': { type: 'boolean' },
'measurements-only': { type: 'boolean' },
+ timings: { type: 'boolean' },
},
})
@@ -182,6 +184,7 @@ function parseArgs(argv) {
sourcemap: values.sourcemap === true,
skipPackageBuilds: values['skip-package-builds'] === true,
measurementsOnly: values['measurements-only'] === true,
+ timings: values.timings === true || process.env.BUNDLE_SIZE_TIMINGS === '1',
}
}
@@ -313,38 +316,6 @@ function collectAllViteJsFiles(manifest) {
return [...files].sort()
}
-function sizesForFiles(baseDir, fileList) {
- let rawBytes = 0
- let gzipBytes = 0
- let brotliBytes = 0
- const files = []
-
- for (const relativeFile of fileList) {
- const fullPath = path.join(baseDir, relativeFile)
- const content = fs.readFileSync(fullPath)
- const rawByteLength = content.byteLength
- const gzipByteLength = gzipSync(content).byteLength
- const brotliByteLength = brotliCompressSync(content).byteLength
-
- rawBytes += rawByteLength
- gzipBytes += gzipByteLength
- brotliBytes += brotliByteLength
- files.push({
- file: relativeFile,
- rawBytes: rawByteLength,
- gzipBytes: gzipByteLength,
- brotliBytes: brotliByteLength,
- })
- }
-
- return {
- rawBytes,
- gzipBytes,
- brotliBytes,
- files,
- }
-}
-
async function findManifestFiles(rootDir) {
const manifestPaths = []
@@ -880,7 +851,16 @@ async function appendHistoryFile({ historyPath, measuredAtIso, sha, benches }) {
async function main() {
const args = parseArgs(process.argv.slice(2))
+ const timings = args.timings ? createTimings() : undefined
+ const finishOverall = timings?.start('overall')
+ try {
+ await measure(args, timings)
+ } finally {
+ finishOverall?.()
+ }
+}
+async function measure(args, timings) {
if (
args.measurementsOnly &&
(args.sha || args.measuredAt || args.appendHistory)
@@ -905,11 +885,19 @@ async function main() {
: new Date().toISOString()
const startedAt = Date.now()
const scenarios = filterScenarios(args.scenario)
- const packageBuildProjects = buildRequiredPackages({
- repoRoot,
- scenarios,
- skipPackageBuilds: args.skipPackageBuilds,
- })
+ const finishPackageBuilds = args.skipPackageBuilds
+ ? undefined
+ : timings?.start('package-builds')
+ let packageBuildProjects
+ try {
+ packageBuildProjects = buildRequiredPackages({
+ repoRoot,
+ scenarios,
+ skipPackageBuilds: args.skipPackageBuilds,
+ })
+ } finally {
+ finishPackageBuilds?.()
+ }
await fsp.mkdir(resultsDir, { recursive: true })
await fsp.mkdir(distDir, { recursive: true })
@@ -920,18 +908,32 @@ async function main() {
const root = path.join(scenariosRoot, scenario.dir)
const outDir = path.join(distDir, scenario.outDir || scenario.dir)
- await buildScenario({
- root,
- outDir,
- scenario,
- sourcemap: args.sourcemap || args.analysis,
- })
+ const finishBuild = timings?.start('scenario-build', scenario.id)
+ try {
+ await buildScenario({
+ root,
+ outDir,
+ scenario,
+ sourcemap: args.sourcemap || args.analysis,
+ })
+ } finally {
+ finishBuild?.()
+ }
- const bundleInfo = await resolveBundleFiles({ outDir, scenario })
- const sizes = sizesForFiles(bundleInfo.manifestOutDir, bundleInfo.jsFiles)
- const initialSizes = sizesForFiles(
+ const finishManifest = timings?.start('manifest-resolution', scenario.id)
+ let bundleInfo
+ try {
+ bundleInfo = await resolveBundleFiles({ outDir, scenario })
+ } finally {
+ finishManifest?.()
+ }
+ const { sizes, initialSizes } = measureFileSizes(
bundleInfo.manifestOutDir,
+ bundleInfo.jsFiles,
bundleInfo.initialJsFiles,
+ timings
+ ? (phase, durationMs) => timings.record(phase, durationMs, scenario.id)
+ : undefined,
)
const initialFileSet = new Set(bundleInfo.initialJsFiles)
const files = sizes.files.map((file) => ({
@@ -961,10 +963,15 @@ async function main() {
}
if (args.analysis) {
- metric.sources = sourceAttributionForFiles(
- bundleInfo.manifestOutDir,
- bundleInfo.jsFiles,
- )
+ const finishAnalysis = timings?.start('analysis', scenario.id)
+ try {
+ metric.sources = sourceAttributionForFiles(
+ bundleInfo.manifestOutDir,
+ bundleInfo.jsFiles,
+ )
+ } finally {
+ finishAnalysis?.()
+ }
}
metrics.push(metric)
@@ -977,7 +984,7 @@ async function main() {
measuredAt: measuredAtIso,
status: {
state: 'success',
- command: `node ${path.relative(repoRoot, fileURLToPath(import.meta.url))}${args.scenario ? ` --scenario ${args.scenario}` : ''}${args.analysis ? ' --analysis' : ''}${args.sourcemap ? ' --sourcemap' : ''}${args.skipPackageBuilds ? ' --skip-package-builds' : ''}`,
+ command: `node ${path.relative(repoRoot, fileURLToPath(import.meta.url))}${args.scenario ? ` --scenario ${args.scenario}` : ''}${args.analysis ? ' --analysis' : ''}${args.sourcemap ? ' --sourcemap' : ''}${args.timings ? ' --timings' : ''}${args.skipPackageBuilds ? ' --skip-package-builds' : ''}`,
scenarioFilter: args.scenario || null,
measuredScenarios: scenarios.map((scenario) => scenario.id),
packageBuildProjects,
diff --git a/scripts/benchmarks/bundle-size/run.mjs b/scripts/benchmarks/bundle-size/run.mjs
index 3e9d67cbfe..74d44e9fb8 100644
--- a/scripts/benchmarks/bundle-size/run.mjs
+++ b/scripts/benchmarks/bundle-size/run.mjs
@@ -49,6 +49,7 @@ export function run(argv, execute = spawnSync) {
'dist-dir': { type: 'string' },
analysis: { type: 'boolean' },
sourcemap: { type: 'boolean' },
+ timings: { type: 'boolean' },
'skip-package-builds': { type: 'boolean' },
help: { type: 'boolean', short: 'h' },
},
@@ -65,6 +66,7 @@ export function run(argv, execute = spawnSync) {
--dist-dir Override the emitted bundle directory
--analysis Include source attribution in current.json
--sourcemap Emit hidden source maps
+ --timings Record fresh phase timings in measure.log
--skip-package-builds Reuse package builds only when they are unchanged
Named runs use /runs//current.json.
@@ -221,6 +223,7 @@ Arguments after -- go to the selected unit tests, not the measurement.`)
for (const [option, value] of Object.entries({
analysis: values.analysis,
sourcemap: values.sourcemap,
+ timings: values.timings,
'skip-package-builds': values['skip-package-builds'],
})) {
if (value) {
diff --git a/scripts/benchmarks/bundle-size/run.test.mjs b/scripts/benchmarks/bundle-size/run.test.mjs
index b4072d81de..a8b927da07 100644
--- a/scripts/benchmarks/bundle-size/run.test.mjs
+++ b/scripts/benchmarks/bundle-size/run.test.mjs
@@ -114,6 +114,7 @@ test('runs targeted tests before measurement and saves named results and logs',
assert.equal(measure.args[0], measurePath)
assert.ok(measure.args.includes('react-router.minimal,react-router.full'))
assert.ok(!measure.args.includes('--skip-package-builds'))
+ assert.ok(!measure.args.includes('--timings'))
assert.ok(!measure.args.includes('tests/path.test.ts'))
for (const { options } of calls) {
assert.equal(options.env.CI, '1')
@@ -167,6 +168,7 @@ test('accepts an external baseline and forwards measurement options', (t) => {
path.join(root, 'dist with spaces'),
'--analysis',
'--sourcemap',
+ '--timings',
'--skip-package-builds',
],
execute,
@@ -178,8 +180,10 @@ test('accepts an external baseline and forwards measurement options', (t) => {
path.join(root, 'dist with spaces'),
'--analysis',
'--sourcemap',
+ '--timings',
'--skip-package-builds',
])
+ assert.ok(calls.slice(1).every(({ args }) => !args.includes('--timings')))
assert.match(reports.join(''), /100 -> 90 \(-10\)/)
})
@@ -285,6 +289,10 @@ test('reports help and argument errors through the CLI entry point', () => {
})
assert.equal(help.status, 0)
assert.match(help.stdout, /Usage: pnpm benchmark:bundle-size:run/)
+ assert.match(
+ help.stdout,
+ /--timings\s+Record fresh phase timings in measure\.log/,
+ )
const invalid = spawnSync(process.execPath, [scriptPath, '--unknown'], {
encoding: 'utf8',
})
diff --git a/scripts/benchmarks/bundle-size/timings.mjs b/scripts/benchmarks/bundle-size/timings.mjs
new file mode 100644
index 0000000000..15d856f96b
--- /dev/null
+++ b/scripts/benchmarks/bundle-size/timings.mjs
@@ -0,0 +1,20 @@
+// Timings are diagnostics only; never include them in cacheable size metrics.
+export function createTimings(write = (line) => process.stderr.write(line)) {
+ function record(phase, durationMs, scenario) {
+ write(
+ `[bundle-size:timing] ${JSON.stringify({
+ phase,
+ ...(scenario ? { scenario } : {}),
+ durationMs: Math.round(durationMs * 1000) / 1000,
+ })}\n`,
+ )
+ }
+
+ return {
+ record,
+ start(phase, scenario) {
+ const started = performance.now()
+ return () => record(phase, performance.now() - started, scenario)
+ },
+ }
+}
diff --git a/scripts/benchmarks/bundle-size/timings.test.mjs b/scripts/benchmarks/bundle-size/timings.test.mjs
new file mode 100644
index 0000000000..8d895aadc5
--- /dev/null
+++ b/scripts/benchmarks/bundle-size/timings.test.mjs
@@ -0,0 +1,35 @@
+import assert from 'node:assert/strict'
+import test from 'node:test'
+import { createTimings } from './timings.mjs'
+
+test('emits labelled JSON timing lines with scenario context when supplied', (t) => {
+ let now = 100
+ t.mock.method(performance, 'now', () => now)
+ const lines = []
+ const timings = createTimings((line) => lines.push(line))
+ timings.record('gzip', 1.234567, 'react-router.minimal')
+ const finishOverall = timings.start('overall')
+ now = 112.345678
+ const finishScenario = timings.start('scenario-build', 'react-router.minimal')
+ now = 123.456789
+ finishScenario()
+ now = 150.123456
+ finishOverall()
+
+ const records = lines.map((line) => {
+ assert.ok(line.startsWith('[bundle-size:timing] '))
+ assert.ok(line.endsWith('\n'))
+ return JSON.parse(line.slice('[bundle-size:timing] '.length))
+ })
+ assert.deepEqual(records[0], {
+ phase: 'gzip',
+ scenario: 'react-router.minimal',
+ durationMs: 1.235,
+ })
+ assert.deepEqual(records[1], {
+ phase: 'scenario-build',
+ scenario: 'react-router.minimal',
+ durationMs: 11.111,
+ })
+ assert.deepEqual(records[2], { phase: 'overall', durationMs: 50.123 })
+})
diff --git a/skills/bundle-size-optimization/SKILL.md b/skills/bundle-size-optimization/SKILL.md
index d0f1ec574e..34f7494efe 100644
--- a/skills/bundle-size-optimization/SKILL.md
+++ b/skills/bundle-size-optimization/SKILL.md
@@ -147,3 +147,8 @@ Rolldown removes code only when unused and side-effect-free. Property reads may
- Skipping behavior or benchmark tests because the change is “only bundle size.”
- Skipping hunk-level attribution and keeping changes only because the full candidate improved.
- Trading runtime performance, security, readability, or maintainability for bytes.
+
+## Meta work
+
+If you need to work on the bundle size measurements / workflow themselves,
+read `benchmarks/bundle-size/README.md`
From ac223be01377f09fa8fd70ff52c9ba4b5dbcddfc Mon Sep 17 00:00:00 2001
From: Flo
Date: Thu, 17 Sep 2026 11:46:56 +0200
Subject: [PATCH 004/127] fix(benchmarks): limit targeted bundle reports to
measured scenarios (#8456)
---
benchmarks/bundle-size/README.md | 4 +
scripts/benchmarks/bundle-size/diff.mjs | 5 +-
scripts/benchmarks/bundle-size/run.mjs | 2 +
scripts/benchmarks/bundle-size/run.test.mjs | 157 ++++++++++++++++++--
4 files changed, 155 insertions(+), 13 deletions(-)
diff --git a/benchmarks/bundle-size/README.md b/benchmarks/bundle-size/README.md
index b5dfc9c4d9..b5f7404480 100644
--- a/benchmarks/bundle-size/README.md
+++ b/benchmarks/bundle-size/README.md
@@ -114,6 +114,8 @@ Without `--name`, runs replace `current.json` and the logs for the steps they ru
Emitted bundles still use the shared `dist/` directory. To retain emitted bundles for a candidate, pass a separate `--dist-dir`.
`--baseline` accepts a run name or a JSON file path, such as `--baseline ./baseline.json`.
+With `--scenario`, the comparison reports only the scenarios measured in the current run, even when the baseline contains more scenarios. Selected scenarios missing from the baseline remain visible with `n/a` for their baseline and deltas.
+Without `--scenario`, comparisons include scenarios from either result file.
`--results-dir ` changes the results root, including the location of named runs.
Use the same scenario selection and measurement flags for the baseline and candidate.
@@ -131,6 +133,8 @@ pnpm benchmark:bundle-size:diff --baseline /tmp/base-current.json --id react-rou
pnpm benchmark:bundle-size:history --id react-router.minimal --top-deltas 20
```
+Use `pnpm benchmark:bundle-size:diff --baseline /tmp/base-current.json --current-only` to compare only scenarios present in the current results. This applies to both text and `--json` output; an explicit `--id` takes precedence.
+
For source attribution, run an analysis build. This uses hidden source maps and writes source estimates into `current.json`; those estimates are for investigation only, not tracking.
```bash
diff --git a/scripts/benchmarks/bundle-size/diff.mjs b/scripts/benchmarks/bundle-size/diff.mjs
index bd698bb9eb..154c43ccd5 100644
--- a/scripts/benchmarks/bundle-size/diff.mjs
+++ b/scripts/benchmarks/bundle-size/diff.mjs
@@ -13,6 +13,7 @@ const { values } = parseArgs({
default: 'benchmarks/bundle-size/results/current.json',
},
id: { type: 'string' },
+ 'current-only': { type: 'boolean' },
json: { type: 'boolean' },
},
})
@@ -33,7 +34,9 @@ const baselineById = byId(readCurrent(values.baseline))
const currentById = byId(readCurrent(values.current))
const ids = values.id
? [values.id]
- : [...new Set([...baselineById.keys(), ...currentById.keys()])].sort()
+ : values['current-only']
+ ? [...currentById.keys()].sort()
+ : [...new Set([...baselineById.keys(), ...currentById.keys()])].sort()
const rows = ids.map((id) => {
const baseline = baselineById.get(id)
diff --git a/scripts/benchmarks/bundle-size/run.mjs b/scripts/benchmarks/bundle-size/run.mjs
index 74d44e9fb8..2e6d42c977 100644
--- a/scripts/benchmarks/bundle-size/run.mjs
+++ b/scripts/benchmarks/bundle-size/run.mjs
@@ -72,6 +72,7 @@ export function run(argv, execute = spawnSync) {
Named runs use /runs//current.json.
Without --name, current.json is replaced in the results root.
Logs stay beside current.json; failures print a bounded log tail.
+With --scenario, comparisons report only the scenarios measured in this run.
Arguments after -- go to the selected unit tests, not the measurement.`)
return 0
}
@@ -244,6 +245,7 @@ Arguments after -- go to the selected unit tests, not the measurement.`)
'--current',
currentPath,
...(baselinePath ? ['--baseline', baselinePath] : []),
+ ...(baselinePath && values.scenario ? ['--current-only'] : []),
],
false,
)
diff --git a/scripts/benchmarks/bundle-size/run.test.mjs b/scripts/benchmarks/bundle-size/run.test.mjs
index a8b927da07..335455cb5a 100644
--- a/scripts/benchmarks/bundle-size/run.test.mjs
+++ b/scripts/benchmarks/bundle-size/run.test.mjs
@@ -11,26 +11,28 @@ const scriptPath = fileURLToPath(new URL('./run.mjs', import.meta.url))
const measurePath = fileURLToPath(new URL('./measure.mjs', import.meta.url))
/** @param {string} filePath */
-function writeCurrent(filePath, gzipBytes = 100) {
+function writeCurrent(
+ filePath,
+ gzipBytes = 100,
+ ids = ['react-router.minimal'],
+) {
fs.mkdirSync(path.dirname(filePath), { recursive: true })
fs.writeFileSync(
filePath,
JSON.stringify({
- metrics: [
- {
- id: 'react-router.minimal',
- gzipBytes,
- initialGzipBytes: gzipBytes,
- rawBytes: gzipBytes * 3,
- brotliBytes: gzipBytes - 10,
- },
- ],
+ metrics: ids.map((id) => ({
+ id,
+ gzipBytes,
+ initialGzipBytes: gzipBytes,
+ rawBytes: gzipBytes * 3,
+ brotliBytes: gzipBytes - 10,
+ })),
}),
)
}
/** @param {import('node:test').TestContext} t */
-function fixture(t) {
+function fixture(t, measuredIds = ['react-router.minimal']) {
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-runner-'))
t.after(() => fs.rmSync(root, { recursive: true, force: true }))
/** @type {Array<{command: string, args: string[], options: import('./run.mjs').CommandOptions}>} */
@@ -52,7 +54,7 @@ function fixture(t) {
if (args[0] === measurePath) {
const outputDir = args[args.indexOf('--results-dir') + 1]
assert.ok(outputDir)
- writeCurrent(path.join(outputDir, 'current.json'), 90)
+ writeCurrent(path.join(outputDir, 'current.json'), 90, measuredIds)
}
if (options.stdio !== 'inherit') {
fs.writeSync(options.stdio[1], 'noisy stdout\n')
@@ -187,6 +189,137 @@ test('accepts an external baseline and forwards measurement options', (t) => {
assert.match(reports.join(''), /100 -> 90 \(-10\)/)
})
+test('targeted comparisons omit unrequested scenarios from a broader baseline', async (t) => {
+ for (const [
+ scenario,
+ measuredIds,
+ ] of /** @type {Array<[string, string[]]>} */ ([
+ ['react-router.minimal', ['react-router.minimal']],
+ ['react-router-minimal', ['react-router.minimal']],
+ [
+ ' solid-router.minimal, react-router.minimal ',
+ ['solid-router.minimal', 'react-router.minimal'],
+ ],
+ ])) {
+ await t.test(scenario, (t) => {
+ const { root, reports, execute } = fixture(t, measuredIds)
+ writeCurrent(path.join(root, 'runs/baseline/current.json'), 100, [
+ 'react-router.full',
+ 'react-router.minimal',
+ 'solid-router.minimal',
+ ])
+
+ assert.equal(
+ run(
+ [
+ '--results-dir',
+ root,
+ '--baseline',
+ 'baseline',
+ '--scenario',
+ scenario,
+ ],
+ execute,
+ ),
+ 0,
+ )
+ assert.equal(
+ reports.join(''),
+ [...measuredIds]
+ .sort()
+ .map((id) => `${id} 100 -> 90 (-10) initial=-10 raw=-30 brotli=-10\n`)
+ .join(''),
+ )
+ })
+ }
+})
+
+test('targeted comparisons keep measured scenarios missing from the baseline', (t) => {
+ const { root, reports, execute } = fixture(t)
+ writeCurrent(path.join(root, 'runs/baseline/current.json'), 100, [
+ 'react-router.full',
+ ])
+
+ assert.equal(
+ run(
+ [
+ '--results-dir',
+ root,
+ '--baseline',
+ 'baseline',
+ '--scenario',
+ 'react-router.minimal',
+ ],
+ execute,
+ ),
+ 0,
+ )
+ assert.equal(
+ reports.join(''),
+ 'react-router.minimal n/a -> 90 (n/a) initial=n/a raw=n/a brotli=n/a\n',
+ )
+})
+
+test('unfiltered comparisons retain baseline-only scenarios', (t) => {
+ const { root, reports, execute } = fixture(t)
+ writeCurrent(path.join(root, 'runs/baseline/current.json'), 100, [
+ 'react-router.full',
+ ])
+
+ assert.equal(
+ run(['--results-dir', root, '--baseline', 'baseline'], execute),
+ 0,
+ )
+ assert.equal(
+ reports.join(''),
+ 'react-router.full 100 -> n/a (n/a) initial=n/a raw=n/a brotli=n/a\n' +
+ 'react-router.minimal n/a -> 90 (n/a) initial=n/a raw=n/a brotli=n/a\n',
+ )
+})
+
+test('current-only diffs filter JSON output and preserve explicit ID selection', (t) => {
+ const { root } = fixture(t)
+ const baseline = path.join(root, 'baseline.json')
+ const current = path.join(root, 'current.json')
+ writeCurrent(baseline, 100, ['react-router.full', 'react-router.minimal'])
+ writeCurrent(current, 90, ['solid-router.minimal', 'react-router.minimal'])
+ const args = [
+ fileURLToPath(new URL('./diff.mjs', import.meta.url)),
+ '--baseline',
+ baseline,
+ '--current',
+ current,
+ '--current-only',
+ '--json',
+ ]
+ const result = spawnSync(process.execPath, args, { encoding: 'utf8' })
+ assert.equal(result.status, 0, result.stderr)
+ assert.deepEqual(JSON.parse(result.stdout), [
+ {
+ id: 'react-router.minimal',
+ baseline: 100,
+ current: 90,
+ delta: -10,
+ initialDelta: -10,
+ rawDelta: -30,
+ brotliDelta: -10,
+ },
+ { id: 'solid-router.minimal', current: 90 },
+ ])
+
+ const selected = spawnSync(
+ process.execPath,
+ [...args, '--id', 'react-router.full'],
+ {
+ encoding: 'utf8',
+ },
+ )
+ assert.equal(selected.status, 0, selected.stderr)
+ assert.deepEqual(JSON.parse(selected.stdout), [
+ { id: 'react-router.full', baseline: 100 },
+ ])
+})
+
test('stops on test failure, preserves its exit code, and prints only a bounded log tail', (t) => {
const { root, messages } = fixture(t)
let callCount = 0
From 222300b82fe6f2a5e7e7f460ae21a2e35c6230d7 Mon Sep 17 00:00:00 2001
From: Caleb Zearing
Date: Mon, 21 Sep 2026 13:15:10 -0700
Subject: [PATCH 005/127] fix(start-plugin-core): restore per route stylesheets
on Windows (#8202)
fix(start-plugin-core): normalize rspack route module paths for the Start manifest
Co-authored-by: Caleb Zearing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
---
.changeset/rsbuild-windows-route-manifest.md | 5 ++
.../src/rsbuild/normalized-client-build.ts | 18 ++++-
.../rsbuild/normalized-client-build.test.ts | 65 +++++++++++++++++++
3 files changed, 87 insertions(+), 1 deletion(-)
create mode 100644 .changeset/rsbuild-windows-route-manifest.md
diff --git a/.changeset/rsbuild-windows-route-manifest.md b/.changeset/rsbuild-windows-route-manifest.md
new file mode 100644
index 0000000000..ec78789008
--- /dev/null
+++ b/.changeset/rsbuild-windows-route-manifest.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/start-plugin-core': patch
+---
+
+Fix the Rsbuild Start manifest dropping every route's stylesheets and preloads on Windows by normalizing rspack module paths to the POSIX form the generated route tree uses.
diff --git a/packages/start-plugin-core/src/rsbuild/normalized-client-build.ts b/packages/start-plugin-core/src/rsbuild/normalized-client-build.ts
index 43a4fcd1ca..126f281f95 100644
--- a/packages/start-plugin-core/src/rsbuild/normalized-client-build.ts
+++ b/packages/start-plugin-core/src/rsbuild/normalized-client-build.ts
@@ -16,6 +16,15 @@ type RspackCompilation = Rspack.Compilation
type RspackCompilationChunk = Rspack.Chunk
type RspackModule = Rspack.Module
+const backslashRegex = /\\/g
+
+/**
+ * Convert an OS native path to the POSIX form used by the generated route tree.
+ */
+function toPosixPath(filePath: string): string {
+ return filePath.replace(backslashRegex, '/')
+}
+
/**
* Extract route file paths from rspack module identifiers.
*
@@ -46,7 +55,14 @@ function getRouteFilePathsFromModules(
if (!new URLSearchParams(query).has(tsrSplit)) continue
const nameForCondition = mod.nameForCondition()
- const routeFilePath = nameForCondition ?? resourcePart.slice(0, queryIndex)
+
+ // rspack reports module paths using the OS separator, while the generated route
+ // tree records every route `filePath` with POSIX separators. Normalize before the
+ // path becomes a manifest key, otherwise no route matches its chunk on Windows and
+ // every route loses its stylesheets and preloads.
+ const routeFilePath = toPosixPath(
+ nameForCondition ?? resourcePart.slice(0, queryIndex),
+ )
if (seen?.has(routeFilePath)) continue
diff --git a/packages/start-plugin-core/tests/rsbuild/normalized-client-build.test.ts b/packages/start-plugin-core/tests/rsbuild/normalized-client-build.test.ts
index 72139f2727..14546022a4 100644
--- a/packages/start-plugin-core/tests/rsbuild/normalized-client-build.test.ts
+++ b/packages/start-plugin-core/tests/rsbuild/normalized-client-build.test.ts
@@ -42,6 +42,46 @@ function makeCompilation(readCss: () => string | Uint8Array) {
return compilation
}
+// Rspack reports module paths using the OS native separator on Windows
+// (e.g. `C:\app\src\routes\posts.tsx`), while the generated route tree always
+// records `filePath` with POSIX separators. This compilation mimics that
+// Windows output so we can verify the route still keys its chunk correctly.
+function makeWindowsCompilation(readCss: () => string | Uint8Array) {
+ const entryChunk = {
+ name: 'index',
+ files: new Set(['index.js', 'root.css']),
+ auxiliaryFiles: new Set(),
+ groupsIterable: new Set(),
+ }
+ const routeChunk = {
+ files: new Set(['posts.js']),
+ auxiliaryFiles: new Set(['posts.css']),
+ groupsIterable: new Set(),
+ }
+ const getAssets = () => [
+ { name: 'root.css', source: { source: readCss } },
+ { name: 'posts.css', source: { source: readCss } },
+ ]
+ const compilation = {
+ entrypoints: new Map([['index', { chunks: [entryChunk] }]]),
+ chunks: new Set([entryChunk, routeChunk]),
+ chunkGraph: {
+ getChunkModules: (chunk: unknown) =>
+ chunk === routeChunk
+ ? [
+ {
+ identifier: () =>
+ 'builtin:swc-loader??ruleSet[0]!C:\\app\\src\\routes\\posts.tsx?tsr-split=component',
+ nameForCondition: () => 'C:\\app\\src\\routes\\posts.tsx',
+ },
+ ]
+ : [],
+ },
+ getAssets,
+ } as unknown as Rspack.Compilation
+ return compilation
+}
+
describe('normalizeRspackClientBuild', () => {
test('keeps route stylesheet links with inline CSS disabled by default', () => {
const compilation = makeCompilation(() => '.card{color:red}')
@@ -106,4 +146,29 @@ describe('normalizeRspackClientBuild', () => {
}
},
)
+
+ test('keys the route chunk by a POSIX path when rspack reports OS native module paths', () => {
+ const compilation = makeWindowsCompilation(() => '.card{color:red}')
+ const clientBuild = normalizeRspackClientBuild(compilation)
+
+ expect(
+ clientBuild.chunksByFileName.get('posts.js')?.routeFilePaths,
+ ).toEqual(['C:/app/src/routes/posts.tsx'])
+ })
+
+ test('gives a route its stylesheet and preload when rspack reports OS native module paths', () => {
+ const compilation = makeWindowsCompilation(() => '.card{color:red}')
+ const clientBuild = normalizeRspackClientBuild(compilation)
+ const manifest = buildStartManifest({
+ clientBuild,
+ routeTreeRoutes: {
+ __root__: {},
+ '/posts': { filePath: 'C:/app/src/routes/posts.tsx' },
+ },
+ basePath: '/assets',
+ })
+
+ expect(manifest.routes['/posts']?.css).toEqual(['/assets/posts.css'])
+ expect(manifest.routes['/posts']?.preloads).toEqual(['/assets/posts.js'])
+ })
})
From fe7f1fd0e6ef73c3f341dd2338b406749538a85d Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 21 Sep 2026 22:20:15 +0200
Subject: [PATCH 006/127] ci: Version Packages (#8477)
ci: changeset release
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
.changeset/rsbuild-windows-route-manifest.md | 5 -----
examples/react/start-bare/package.json | 2 +-
examples/react/start-basic-auth/package.json | 2 +-
examples/react/start-basic-authjs/package.json | 2 +-
examples/react/start-basic-cloudflare/package.json | 2 +-
examples/react/start-basic-react-query/package.json | 2 +-
examples/react/start-basic-rsbuild/package.json | 2 +-
examples/react/start-basic-static/package.json | 2 +-
examples/react/start-basic/package.json | 2 +-
examples/react/start-bun/package.json | 2 +-
examples/react/start-clerk-basic/package.json | 2 +-
examples/react/start-convex-trellaux/package.json | 2 +-
examples/react/start-counter/package.json | 2 +-
examples/react/start-i18n-paraglide/package.json | 2 +-
examples/react/start-large/package.json | 2 +-
examples/react/start-material-ui/package.json | 2 +-
examples/react/start-next-migration/package.json | 2 +-
examples/react/start-rscs/package.json | 2 +-
.../package.json | 2 +-
examples/react/start-supabase-basic/package.json | 2 +-
examples/react/start-tailwind-v4/package.json | 2 +-
examples/react/start-trellaux/package.json | 2 +-
examples/react/start-workos/package.json | 2 +-
examples/solid/start-basic-auth/package.json | 2 +-
examples/solid/start-basic-authjs/package.json | 2 +-
examples/solid/start-basic-cloudflare/package.json | 2 +-
examples/solid/start-basic-netlify/package.json | 2 +-
examples/solid/start-basic-nitro/package.json | 2 +-
examples/solid/start-basic-solid-query/package.json | 2 +-
examples/solid/start-basic-static/package.json | 2 +-
examples/solid/start-basic/package.json | 2 +-
examples/solid/start-bun/package.json | 2 +-
examples/solid/start-convex-better-auth/package.json | 2 +-
examples/solid/start-counter/package.json | 2 +-
examples/solid/start-i18n-paraglide/package.json | 2 +-
examples/solid/start-large/package.json | 2 +-
.../package.json | 2 +-
examples/solid/start-supabase-basic/package.json | 2 +-
examples/solid/start-tailwind-v4/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 7 +++++++
packages/react-start-rsc/package.json | 2 +-
packages/react-start/CHANGELOG.md | 8 ++++++++
packages/react-start/package.json | 2 +-
packages/solid-start/CHANGELOG.md | 7 +++++++
packages/solid-start/package.json | 2 +-
packages/start-plugin-core/CHANGELOG.md | 6 ++++++
packages/start-plugin-core/package.json | 2 +-
packages/vue-start/CHANGELOG.md | 7 +++++++
packages/vue-start/package.json | 2 +-
49 files changed, 78 insertions(+), 48 deletions(-)
delete mode 100644 .changeset/rsbuild-windows-route-manifest.md
diff --git a/.changeset/rsbuild-windows-route-manifest.md b/.changeset/rsbuild-windows-route-manifest.md
deleted file mode 100644
index ec78789008..0000000000
--- a/.changeset/rsbuild-windows-route-manifest.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/start-plugin-core': patch
----
-
-Fix the Rsbuild Start manifest dropping every route's stylesheets and preloads on Windows by normalizing rspack module paths to the POSIX form the generated route tree uses.
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index ce3a89fd68..197481022e 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index 72710a9d50..81f0c83208 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -16,7 +16,7 @@
"@prisma/client": "^7.0.0",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index 5332a96d16..dd0507fafa 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -13,7 +13,7 @@
"@auth/core": "^0.41.1",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"start-authjs": "^1.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index 0c96dd0ca9..66746d5b9d 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -14,7 +14,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index daf7c83170..a56fad4cbf 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -16,7 +16,7 @@
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-rsbuild/package.json b/examples/react/start-basic-rsbuild/package.json
index ff6f97a1a4..da56a79f60 100644
--- a/examples/react/start-basic-rsbuild/package.json
+++ b/examples/react/start-basic-rsbuild/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index 9276c1665b..e1bd3b958a 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"@tanstack/start-static-server-functions": "^1.167.37",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 48b48dade3..72dbecf15e 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index a204b130e3..58d64d6541 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -18,7 +18,7 @@
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.1.1",
"react-dom": "^19.1.1",
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index 97c2f818b8..d574a0432c 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -13,7 +13,7 @@
"@clerk/tanstack-react-start": "^0.27.14",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index b086e1361e..a74c6296da 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -18,7 +18,7 @@
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index ca42a88d13..f162d4e4ca 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index fa951ceb07..691291f332 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"@tanstack/react-devtools": "^0.7.0",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index 0f1a3359bb..63fc5cd0c9 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index 82a68c4775..c66291fb17 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -17,7 +17,7 @@
"@mui/material": "6.4.7",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-next-migration/package.json b/examples/react/start-next-migration/package.json
index 48a5db46d1..c59375f2db 100644
--- a/examples/react/start-next-migration/package.json
+++ b/examples/react/start-next-migration/package.json
@@ -13,7 +13,7 @@
},
"dependencies": {
"@tanstack/react-router": "^1.170.38",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"iron-session": "^9.0.0",
"next": "16.3.4",
"react": "^19.2.3",
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index 9a7960ed25..6c92fb248c 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index b43b1b8861..f07e1656e2 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index 8bf094d0ed..4a056a37ec 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -17,7 +17,7 @@
"@supabase/supabase-js": "^2.48.1",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index 675f3db646..e8540a8a73 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 76c362eb4b..1fba60f4e9 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index 1d68e74632..c912ef8e12 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -16,7 +16,7 @@
"@radix-ui/themes": "^3.3.0",
"@tanstack/react-router": "^1.170.38",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.56",
+ "@tanstack/react-start": "^1.168.57",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json
index 79c9d3ecdb..6d447f50e7 100644
--- a/examples/solid/start-basic-auth/package.json
+++ b/examples/solid/start-basic-auth/package.json
@@ -16,7 +16,7 @@
"@prisma/client": "^7.0.0",
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json
index 49511a05ad..679723e9de 100644
--- a/examples/solid/start-basic-authjs/package.json
+++ b/examples/solid/start-basic-authjs/package.json
@@ -13,7 +13,7 @@
"@auth/core": "^0.41.1",
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.10",
"start-authjs": "^1.0.0",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json
index 3e5a2ef79e..d42bf4f2cd 100644
--- a/examples/solid/start-basic-cloudflare/package.json
+++ b/examples/solid/start-basic-cloudflare/package.json
@@ -14,7 +14,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json
index f2cf549404..eb5509fe35 100644
--- a/examples/solid/start-basic-netlify/package.json
+++ b/examples/solid/start-basic-netlify/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json
index ef3fa3a998..373f8e3f42 100644
--- a/examples/solid/start-basic-nitro/package.json
+++ b/examples/solid/start-basic-nitro/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json
index ce09a1f67e..504fd1e767 100644
--- a/examples/solid/start-basic-solid-query/package.json
+++ b/examples/solid/start-basic-solid-query/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-router-ssr-query": "^1.167.3",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json
index 20f43dd6e5..649beed13b 100644
--- a/examples/solid/start-basic-static/package.json
+++ b/examples/solid/start-basic-static/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"@tanstack/start-static-server-functions": "^1.167.37",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json
index 61fe51dec7..c12b6f5245 100644
--- a/examples/solid/start-basic/package.json
+++ b/examples/solid/start-basic/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json
index a4cc5eb8cb..9a8122e752 100644
--- a/examples/solid/start-bun/package.json
+++ b/examples/solid/start-bun/package.json
@@ -18,7 +18,7 @@
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-router-ssr-query": "^1.167.3",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"@tanstack/router-plugin": "^1.168.40",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
diff --git a/examples/solid/start-convex-better-auth/package.json b/examples/solid/start-convex-better-auth/package.json
index 2f7db4ed88..60881b59ad 100644
--- a/examples/solid/start-convex-better-auth/package.json
+++ b/examples/solid/start-convex-better-auth/package.json
@@ -15,7 +15,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"better-auth": "^1.6.19",
"clsx": "^2.1.1",
"convex": "^1.28.2",
diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json
index 9950628bcd..957831f21b 100644
--- a/examples/solid/start-counter/package.json
+++ b/examples/solid/start-counter/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json
index e304a0fbd1..29a01c3200 100644
--- a/examples/solid/start-i18n-paraglide/package.json
+++ b/examples/solid/start-i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"@tanstack/solid-devtools": "^0.7.0",
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-large/package.json b/examples/solid/start-large/package.json
index 3adcaf907a..7493ce627d 100644
--- a/examples/solid/start-large/package.json
+++ b/examples/solid/start-large/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-streaming-data-from-server-functions/package.json b/examples/solid/start-streaming-data-from-server-functions/package.json
index a51e5b7829..48cdbea77c 100644
--- a/examples/solid/start-streaming-data-from-server-functions/package.json
+++ b/examples/solid/start-streaming-data-from-server-functions/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.10",
"zod": "^4.4.3"
},
diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json
index c2df01371d..17fe16afb9 100644
--- a/examples/solid/start-supabase-basic/package.json
+++ b/examples/solid/start-supabase-basic/package.json
@@ -16,7 +16,7 @@
"@supabase/supabase-js": "^2.48.1",
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.9",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/start-tailwind-v4/package.json b/examples/solid/start-tailwind-v4/package.json
index 4dd8e97c08..4947a8d930 100644
--- a/examples/solid/start-tailwind-v4/package.json
+++ b/examples/solid/start-tailwind-v4/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.36",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.54",
+ "@tanstack/solid-start": "^1.168.55",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
"zod": "^4.4.3"
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index 2919c4e879..ca44b1a31d 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/react-start-rsc
+## 0.1.56
+
+### Patch Changes
+
+- Updated dependencies [[`222300b`](https://github.com/TanStack/router/commit/222300b82fe6f2a5e7e7f460ae21a2e35c6230d7)]:
+ - @tanstack/start-plugin-core@1.171.47
+
## 0.1.55
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index ae593ed6f7..97b0c83185 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.55",
+ "version": "0.1.56",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index 18d437117f..387e26fb56 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/react-start
+## 1.168.57
+
+### Patch Changes
+
+- Updated dependencies [[`222300b`](https://github.com/TanStack/router/commit/222300b82fe6f2a5e7e7f460ae21a2e35c6230d7)]:
+ - @tanstack/start-plugin-core@1.171.47
+ - @tanstack/react-start-rsc@0.1.56
+
## 1.168.56
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index 6ac67a4dbd..5a26227e26 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.56",
+ "version": "1.168.57",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start/CHANGELOG.md b/packages/solid-start/CHANGELOG.md
index d234f8f514..16bf8e9704 100644
--- a/packages/solid-start/CHANGELOG.md
+++ b/packages/solid-start/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/solid-start
+## 1.168.55
+
+### Patch Changes
+
+- Updated dependencies [[`222300b`](https://github.com/TanStack/router/commit/222300b82fe6f2a5e7e7f460ae21a2e35c6230d7)]:
+ - @tanstack/start-plugin-core@1.171.47
+
## 1.168.54
### Patch Changes
diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json
index a7e22858ec..7162f6edc7 100644
--- a/packages/solid-start/package.json
+++ b/packages/solid-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start",
- "version": "1.168.54",
+ "version": "1.168.55",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-plugin-core/CHANGELOG.md b/packages/start-plugin-core/CHANGELOG.md
index 7236af6571..9e444715c2 100644
--- a/packages/start-plugin-core/CHANGELOG.md
+++ b/packages/start-plugin-core/CHANGELOG.md
@@ -1,5 +1,11 @@
# @tanstack/start-plugin-core
+## 1.171.47
+
+### Patch Changes
+
+- [#8202](https://github.com/TanStack/router/pull/8202) [`222300b`](https://github.com/TanStack/router/commit/222300b82fe6f2a5e7e7f460ae21a2e35c6230d7) - Fix the Rsbuild Start manifest dropping every route's stylesheets and preloads on Windows by normalizing rspack module paths to the POSIX form the generated route tree uses.
+
## 1.171.46
### Patch Changes
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index dc88254aeb..ac3af33d38 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-plugin-core",
- "version": "1.171.46",
+ "version": "1.171.47",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md
index 872b188fb1..40b54afc04 100644
--- a/packages/vue-start/CHANGELOG.md
+++ b/packages/vue-start/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/vue-start
+## 1.168.54
+
+### Patch Changes
+
+- Updated dependencies [[`222300b`](https://github.com/TanStack/router/commit/222300b82fe6f2a5e7e7f460ae21a2e35c6230d7)]:
+ - @tanstack/start-plugin-core@1.171.47
+
## 1.168.53
### Patch Changes
diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json
index babdb4e20d..4c962af10e 100644
--- a/packages/vue-start/package.json
+++ b/packages/vue-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start",
- "version": "1.168.53",
+ "version": "1.168.54",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
From 73bfc153eef460e9b670556215a5adb2b5cbf542 Mon Sep 17 00:00:00 2001
From: Flo
Date: Wed, 23 Sep 2026 14:00:26 +0200
Subject: [PATCH 007/127] perf(react-router): avoid redundant link hydration
updates (#8435)
* perf(react-router): avoid redundant link hydration updates
* refactor(react-router): hide hydration flag behind internal overload
---
.changeset/large-rockets-push.md | 5 +
packages/react-router/src/ClientOnly.tsx | 16 +-
packages/react-router/src/link.tsx | 2 +-
.../tests/link-hydration.test.tsx | 203 ++++++++++++++++++
4 files changed, 223 insertions(+), 3 deletions(-)
create mode 100644 .changeset/large-rockets-push.md
create mode 100644 packages/react-router/tests/link-hydration.test.tsx
diff --git a/.changeset/large-rockets-push.md b/.changeset/large-rockets-push.md
new file mode 100644
index 0000000000..99f158c890
--- /dev/null
+++ b/.changeset/large-rockets-push.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/react-router': patch
+---
+
+Avoid hydration-triggered rerenders for links that do not compare URL hashes while preserving hash-sensitive active state and ClientOnly behavior.
diff --git a/packages/react-router/src/ClientOnly.tsx b/packages/react-router/src/ClientOnly.tsx
index c139b05d0a..010a6d3117 100644
--- a/packages/react-router/src/ClientOnly.tsx
+++ b/packages/react-router/src/ClientOnly.tsx
@@ -56,8 +56,20 @@ export function ClientOnly({ children, fallback = null }: ClientOnlyProps) {
* ```
* @returns True if the JS has been hydrated already, false otherwise.
*/
-export function useHydrated(): boolean {
- return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot)
+export function useHydrated(): boolean
+/**
+ * @internal
+ * callers whose output does not depend on hydration can keep the
+ * same snapshot on both sides, avoiding an unnecessary post-hydration render.
+ */
+export function useHydrated(enabled: boolean): boolean
+/** @internal */
+export function useHydrated(enabled = true): boolean {
+ return React.useSyncExternalStore(
+ subscribe,
+ getSnapshot,
+ enabled ? getServerSnapshot : getSnapshot,
+ )
}
function subscribe() {
diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx
index 26ec05a848..94bf0f5ad1 100644
--- a/packages/react-router/src/link.tsx
+++ b/packages/react-router/src/link.tsx
@@ -257,7 +257,7 @@ export function useLinkProps<
} = options as typeof options & { to?: string }
// eslint-disable-next-line react-hooks/rules-of-hooks
- const isHydrated = useHydrated()
+ const isHydrated = useHydrated(!!activeOptions?.includeHash)
// eslint-disable-next-line react-hooks/rules-of-hooks
const [stableSearch, stableParams, stableActiveOptions] = useStableValues(
diff --git a/packages/react-router/tests/link-hydration.test.tsx b/packages/react-router/tests/link-hydration.test.tsx
new file mode 100644
index 0000000000..497464b3f8
--- /dev/null
+++ b/packages/react-router/tests/link-hydration.test.tsx
@@ -0,0 +1,203 @@
+import React from 'react'
+import { renderToString } from 'react-dom/server'
+import { hydrateRoot } from 'react-dom/client'
+import { act } from '@testing-library/react'
+import { expect, test, vi } from 'vitest'
+import {
+ Link,
+ RouterContextProvider,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+} from '../src'
+
+test('only hash-sensitive links need a second hydration render', async () => {
+ const rootRoute = createRootRoute()
+ const router = createRouter({
+ routeTree: rootRoute.addChildren([
+ createRoute({ getParentRoute: () => rootRoute, path: '/target' }),
+ ]),
+ history: createMemoryHistory({ initialEntries: ['/target#section'] }),
+ })
+ await router.load()
+ const serverRouter = createRouter({
+ routeTree: router.routeTree,
+ history: createMemoryHistory({ initialEntries: ['/target'] }),
+ isServer: true,
+ })
+ await serverRouter.load()
+ const ordinary = vi.fn(({ isActive }: { isActive: boolean }) =>
+ String(isActive),
+ )
+ const hashSensitive = vi.fn(({ isActive }: { isActive: boolean }) =>
+ String(isActive),
+ )
+ const tree = (includeHash = false, contextRouter = router) => (
+
+
+ {ordinary}
+
+
+ {hashSensitive}
+
+
+ )
+ const container = document.createElement('div')
+ document.body.append(container)
+ container.innerHTML = renderToString(tree(false, serverRouter))
+ expect(container.querySelector('[data-testid="ordinary"]')?.textContent).toBe(
+ 'true',
+ )
+ expect(container.querySelector('[data-testid="hash"]')?.textContent).toBe(
+ 'false',
+ )
+ ordinary.mockClear()
+ hashSensitive.mockClear()
+ const onRecoverableError = vi.fn()
+ const diagnostics = vi.spyOn(console, 'error').mockImplementation(() => {})
+ const serverAnchor = container.querySelector('[data-testid="ordinary"]')
+ let root: ReturnType | undefined
+ try {
+ await act(() => {
+ root = hydrateRoot(container, tree(), { onRecoverableError })
+ })
+ expect(ordinary).toHaveBeenCalledTimes(1)
+ expect(container.querySelector('[data-testid="ordinary"]')).toBe(
+ serverAnchor,
+ )
+ expect(hashSensitive.mock.calls.map(([state]) => state.isActive)).toEqual([
+ false,
+ true,
+ ])
+ expect(container.querySelector('[data-testid="hash"]')).toHaveAttribute(
+ 'aria-current',
+ 'page',
+ )
+ expect(container.querySelector('[data-testid="hash"]')).toHaveAttribute(
+ 'title',
+ 'active',
+ )
+ await act(() => root!.render(tree(true)))
+ expect(
+ container.querySelector('[data-testid="ordinary"]'),
+ ).not.toHaveAttribute('aria-current')
+ expect(container.querySelector('[data-testid="ordinary"]')).toHaveAttribute(
+ 'title',
+ 'inactive',
+ )
+ await act(() => root!.render(tree(false)))
+ expect(container.querySelector('[data-testid="ordinary"]')).toHaveAttribute(
+ 'aria-current',
+ 'page',
+ )
+ expect(onRecoverableError).not.toHaveBeenCalled()
+ expect(diagnostics).not.toHaveBeenCalled()
+ } finally {
+ await act(() => root?.unmount())
+ router.history.destroy()
+ serverRouter.history.destroy()
+ diagnostics.mockRestore()
+ container.remove()
+ }
+})
+
+test('hash-sensitive links retain the server snapshot in a delayed hydration boundary', async () => {
+ const rootRoute = createRootRoute()
+ const routeTree = rootRoute.addChildren([
+ createRoute({ getParentRoute: () => rootRoute, path: '/target' }),
+ ])
+ const serverRouter = createRouter({
+ routeTree,
+ history: createMemoryHistory({ initialEntries: ['/target'] }),
+ isServer: true,
+ })
+ const clientRouter = createRouter({
+ routeTree,
+ history: createMemoryHistory({ initialEntries: ['/target#section'] }),
+ })
+ await Promise.all([serverRouter.load(), clientRouter.load()])
+ let ready = true
+ let resolve!: () => void
+ const pending = new Promise((done) => {
+ resolve = done
+ })
+ const ordinary = vi.fn(() => 'ordinary')
+ const hashSensitive = vi.fn(({ isActive }: { isActive: boolean }) =>
+ String(isActive),
+ )
+ function DeferredLinks() {
+ if (!ready) {
+ throw pending
+ }
+ return (
+ <>
+ {ordinary}
+
+ {hashSensitive}
+
+ >
+ )
+ }
+ const tree = (router: typeof clientRouter) => (
+
+ Loading
}>
+
+
+
+ )
+ const container = document.createElement('div')
+ document.body.append(container)
+ container.innerHTML = renderToString(tree(serverRouter))
+ const serverAnchor = container.querySelector('a')
+ ordinary.mockClear()
+ hashSensitive.mockClear()
+ ready = false
+ const onRecoverableError = vi.fn()
+ const diagnostics = vi.spyOn(console, 'error').mockImplementation(() => {})
+ let root: ReturnType | undefined
+ try {
+ await act(() => {
+ root = hydrateRoot(container, tree(clientRouter), { onRecoverableError })
+ })
+ expect(ordinary).not.toHaveBeenCalled()
+ expect(hashSensitive).not.toHaveBeenCalled()
+ await act(async () => {
+ ready = true
+ resolve()
+ await pending
+ })
+ expect(ordinary).toHaveBeenCalledTimes(1)
+ expect(hashSensitive.mock.calls.map(([state]) => state.isActive)).toEqual([
+ false,
+ true,
+ ])
+ expect(container.querySelector('a')).toBe(serverAnchor)
+ expect(container.querySelectorAll('a')[1]).toHaveAttribute(
+ 'aria-current',
+ 'page',
+ )
+ expect(onRecoverableError).not.toHaveBeenCalled()
+ expect(diagnostics).not.toHaveBeenCalled()
+ } finally {
+ await act(() => root?.unmount())
+ serverRouter.history.destroy()
+ clientRouter.history.destroy()
+ diagnostics.mockRestore()
+ container.remove()
+ }
+})
From ddad69a4a4b18c19e3fcc510ac1e21f9dab883a7 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 23 Sep 2026 15:28:58 +0200
Subject: [PATCH 008/127] ci: Version Packages (#8486)
ci: changeset release
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
.changeset/large-rockets-push.md | 5 -----
.../react/authenticated-routes-firebase/package.json | 2 +-
examples/react/authenticated-routes/package.json | 2 +-
.../react/basic-default-search-params/package.json | 2 +-
examples/react/basic-devtools-panel/package.json | 2 +-
examples/react/basic-file-based/package.json | 2 +-
examples/react/basic-non-nested-devtools/package.json | 2 +-
.../react/basic-react-query-file-based/package.json | 2 +-
examples/react/basic-react-query/package.json | 2 +-
examples/react/basic-ssr-file-based/package.json | 2 +-
.../react/basic-ssr-streaming-file-based/package.json | 2 +-
examples/react/basic-virtual-file-based/package.json | 2 +-
.../react/basic-virtual-inside-file-based/package.json | 2 +-
examples/react/basic/package.json | 2 +-
examples/react/deferred-data/package.json | 2 +-
examples/react/i18n-paraglide/package.json | 2 +-
examples/react/kitchen-sink-file-based/package.json | 2 +-
.../kitchen-sink-react-query-file-based/package.json | 2 +-
examples/react/kitchen-sink-react-query/package.json | 2 +-
examples/react/kitchen-sink/package.json | 2 +-
examples/react/large-file-based/package.json | 2 +-
examples/react/location-masking/package.json | 2 +-
examples/react/navigation-blocking/package.json | 2 +-
.../react/quickstart-esbuild-file-based/package.json | 2 +-
examples/react/quickstart-file-based/package.json | 2 +-
.../react/quickstart-rspack-file-based/package.json | 2 +-
.../react/quickstart-webpack-file-based/package.json | 2 +-
examples/react/quickstart/package.json | 2 +-
.../react/router-monorepo-react-query/package.json | 2 +-
.../packages/router/package.json | 2 +-
.../react/router-monorepo-simple-lazy/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/react/router-monorepo-simple/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/react/scroll-restoration/package.json | 2 +-
examples/react/search-validator-adapters/package.json | 2 +-
examples/react/start-bare/package.json | 4 ++--
examples/react/start-basic-auth/package.json | 4 ++--
examples/react/start-basic-authjs/package.json | 4 ++--
examples/react/start-basic-cloudflare/package.json | 4 ++--
examples/react/start-basic-react-query/package.json | 4 ++--
examples/react/start-basic-rsbuild/package.json | 4 ++--
examples/react/start-basic-static/package.json | 4 ++--
examples/react/start-basic/package.json | 4 ++--
examples/react/start-bun/package.json | 4 ++--
examples/react/start-clerk-basic/package.json | 4 ++--
examples/react/start-convex-trellaux/package.json | 4 ++--
examples/react/start-counter/package.json | 4 ++--
examples/react/start-i18n-paraglide/package.json | 4 ++--
examples/react/start-large/package.json | 4 ++--
examples/react/start-material-ui/package.json | 4 ++--
examples/react/start-next-migration/package.json | 4 ++--
examples/react/start-rscs/package.json | 4 ++--
.../package.json | 4 ++--
examples/react/start-supabase-basic/package.json | 4 ++--
examples/react/start-tailwind-v4/package.json | 4 ++--
examples/react/start-trellaux/package.json | 4 ++--
examples/react/start-workos/package.json | 4 ++--
examples/react/view-transitions/package.json | 2 +-
examples/react/with-framer-motion/package.json | 2 +-
examples/react/with-trpc-react-query/package.json | 2 +-
examples/react/with-trpc/package.json | 2 +-
packages/react-router/CHANGELOG.md | 6 ++++++
packages/react-router/package.json | 2 +-
packages/react-start-client/CHANGELOG.md | 7 +++++++
packages/react-start-client/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 7 +++++++
packages/react-start-rsc/package.json | 2 +-
packages/react-start-server/CHANGELOG.md | 7 +++++++
packages/react-start-server/package.json | 2 +-
packages/react-start/CHANGELOG.md | 10 ++++++++++
packages/react-start/package.json | 2 +-
72 files changed, 125 insertions(+), 93 deletions(-)
delete mode 100644 .changeset/large-rockets-push.md
diff --git a/.changeset/large-rockets-push.md b/.changeset/large-rockets-push.md
deleted file mode 100644
index 99f158c890..0000000000
--- a/.changeset/large-rockets-push.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/react-router': patch
----
-
-Avoid hydration-triggered rerenders for links that do not compare URL hashes while preserving hash-sensitive active state and ClientOnly behavior.
diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json
index 5a2dd24144..73fa665077 100644
--- a/examples/react/authenticated-routes-firebase/package.json
+++ b/examples/react/authenticated-routes-firebase/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"firebase": "^11.4.0",
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index ac4c79626d..b958329866 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index c09f5a4e42..b3d020db16 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-devtools-panel/package.json b/examples/react/basic-devtools-panel/package.json
index 01127e38ee..9cb9638a8d 100644
--- a/examples/react/basic-devtools-panel/package.json
+++ b/examples/react/basic-devtools-panel/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.67.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index 32597ca25d..317d8378c8 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/basic-non-nested-devtools/package.json b/examples/react/basic-non-nested-devtools/package.json
index 5cd3457922..a8dfcdc76b 100644
--- a/examples/react/basic-non-nested-devtools/package.json
+++ b/examples/react/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 2a4148c136..623ad075d4 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index b314bfc5c4..64eea90b33 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 19c34de508..6bbdac76b1 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -11,7 +11,7 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/router-plugin": "^1.168.40",
"compression": "^1.8.0",
"express": "^5.2.1",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index 190f226f66..a72fa5c3f8 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -11,7 +11,7 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/router-plugin": "^1.168.40",
"compression": "^1.8.0",
"express": "^5.2.1",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index 681a77c011..9881a1a322 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"@tanstack/virtual-file-routes": "^1.162.0",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index 5b739b829f..157c32c0a9 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"@tanstack/virtual-file-routes": "^1.162.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 501c432f16..460cae32f4 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index 35f3af4399..02d9aeffd9 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json
index fac0be9548..014a0f2378 100644
--- a/examples/react/i18n-paraglide/package.json
+++ b/examples/react/i18n-paraglide/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.1.1",
"react-dom": "^19.1.1",
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index f1992c0157..ce4bc0eec5 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"immer": "^10.1.1",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index 40f1866e31..ee69914c6a 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"immer": "^10.1.1",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index 92ae795961..2778c1c1e9 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index 23b489366a..38a99e95ba 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index 32f14c0d79..c9eeb1c1b3 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index 5d755394f1..1104cdd075 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -12,7 +12,7 @@
"@radix-ui/react-dialog": "^1.1.6",
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index ae9bac9a06..f2a8b477a5 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json
index 7fd805bce2..f0ee7663c0 100644
--- a/examples/react/quickstart-esbuild-file-based/package.json
+++ b/examples/react/quickstart-esbuild-file-based/package.json
@@ -9,7 +9,7 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index 732790fb1c..d9b2530d1e 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index 12df148bf3..633269b165 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"postcss": "^8.5.1",
"react": "^19.0.0",
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index 83438e8eb5..1a5bd570f3 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -7,7 +7,7 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index c159029401..fcd2da032a 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json
index 52f15cd866..08d38884b7 100644
--- a/examples/react/router-monorepo-react-query/package.json
+++ b/examples/react/router-monorepo-react-query/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/router-monorepo-react-query/packages/router/package.json b/examples/react/router-monorepo-react-query/packages/router/package.json
index 6806a7961c..4b3313c57e 100644
--- a/examples/react/router-monorepo-react-query/packages/router/package.json
+++ b/examples/react/router-monorepo-react-query/packages/router/package.json
@@ -11,7 +11,7 @@
"@router-mono-react-query/post-query": "workspace:*",
"@tanstack/history": "^1.162.4",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json
index 1ac497e230..46f0b2e271 100644
--- a/examples/react/router-monorepo-simple-lazy/package.json
+++ b/examples/react/router-monorepo-simple-lazy/package.json
@@ -8,7 +8,7 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/package.json b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
index e9ed02c574..96910e4f39 100644
--- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,7 +9,7 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json
index 78c38fa25c..be2c12d34a 100644
--- a/examples/react/router-monorepo-simple/package.json
+++ b/examples/react/router-monorepo-simple/package.json
@@ -8,7 +8,7 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json
index 926f2b1db3..cb8222f91d 100644
--- a/examples/react/router-monorepo-simple/packages/router/package.json
+++ b/examples/react/router-monorepo-simple/packages/router/package.json
@@ -9,7 +9,7 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index dfd65f61b2..99eed8b357 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-virtual": "^3.13.0",
"react": "^19.0.0",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 5ec3a48650..231b268bdc 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"@tanstack/valibot-adapter": "^1.167.0",
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index 197481022e..6fa39c3423 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index 81f0c83208..af1c40f4fe 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index dd0507fafa..a5e58de81c 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"start-authjs": "^1.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index 66746d5b9d..a4d17b909b 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index a56fad4cbf..54cbeeab85 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -13,10 +13,10 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-rsbuild/package.json b/examples/react/start-basic-rsbuild/package.json
index da56a79f60..bb2c175c32 100644
--- a/examples/react/start-basic-rsbuild/package.json
+++ b/examples/react/start-basic-rsbuild/package.json
@@ -10,9 +10,9 @@
"start": "srvx --prod -s ../client dist/server/index.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index e1bd3b958a..3574c5cea0 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"@tanstack/start-static-server-functions": "^1.167.37",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 72dbecf15e..961d21451a 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index 58d64d6541..34956d9ff6 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -15,10 +15,10 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.1.1",
"react-dom": "^19.1.1",
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index d574a0432c..090593c7cc 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@clerk/tanstack-react-start": "^0.27.14",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index a74c6296da..fb9ce5bee4 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -15,10 +15,10 @@
"@convex-dev/react-query": "0.0.0-alpha.8",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index f162d4e4ca..b7dcf18aec 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index 691291f332..c8b714368b 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index 63fc5cd0c9..ef3221f15d 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index c66291fb17..120b5deff1 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -15,9 +15,9 @@
"@emotion/styled": "11.14.0",
"@fontsource-variable/roboto": "5.2.5",
"@mui/material": "6.4.7",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-next-migration/package.json b/examples/react/start-next-migration/package.json
index c59375f2db..87d6633c68 100644
--- a/examples/react/start-next-migration/package.json
+++ b/examples/react/start-next-migration/package.json
@@ -12,8 +12,8 @@
"test:e2e": "playwright test"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-start": "^1.168.58",
"iron-session": "^9.0.0",
"next": "16.3.4",
"react": "^19.2.3",
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index 6c92fb248c..c4af666482 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index f07e1656e2..c134912d54 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index 4a056a37ec..1db4e6dd6a 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -15,9 +15,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index e8540a8a73..b1eb226102 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 1fba60f4e9..65b0629c2b 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index c912ef8e12..5d58c347b4 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -14,9 +14,9 @@
"license": "MIT",
"dependencies": {
"@radix-ui/themes": "^3.3.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.57",
+ "@tanstack/react-start": "^1.168.58",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json
index 986add9cb8..ee48312eb4 100644
--- a/examples/react/view-transitions/package.json
+++ b/examples/react/view-transitions/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"react": "^19.0.0",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index 12b55bf048..7f6bca1157 100644
--- a/examples/react/with-framer-motion/package.json
+++ b/examples/react/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"framer-motion": "^11.18.2",
"react": "^19.0.0",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index 8f4fc275b6..94e69c6992 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"@trpc/client": "^11.4.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index f1632d8133..13a419b0de 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.38",
+ "@tanstack/react-router": "^1.170.39",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/router-plugin": "^1.168.40",
"@trpc/client": "^11.4.3",
diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md
index 94d54a4bd7..9d0d463bc3 100644
--- a/packages/react-router/CHANGELOG.md
+++ b/packages/react-router/CHANGELOG.md
@@ -1,5 +1,11 @@
# @tanstack/react-router
+## 1.170.39
+
+### Patch Changes
+
+- [#8435](https://github.com/TanStack/router/pull/8435) [`73bfc15`](https://github.com/TanStack/router/commit/73bfc153eef460e9b670556215a5adb2b5cbf542) - Avoid hydration-triggered rerenders for links that do not compare URL hashes while preserving hash-sensitive active state and ClientOnly behavior.
+
## 1.170.38
### Patch Changes
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index 63624917f5..a1cc6e0f2e 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-router",
- "version": "1.170.38",
+ "version": "1.170.39",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-client/CHANGELOG.md b/packages/react-start-client/CHANGELOG.md
index 15995d2c0f..1155719836 100644
--- a/packages/react-start-client/CHANGELOG.md
+++ b/packages/react-start-client/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/react-start-client
+## 1.168.37
+
+### Patch Changes
+
+- Updated dependencies [[`73bfc15`](https://github.com/TanStack/router/commit/73bfc153eef460e9b670556215a5adb2b5cbf542)]:
+ - @tanstack/react-router@1.170.39
+
## 1.168.36
### Patch Changes
diff --git a/packages/react-start-client/package.json b/packages/react-start-client/package.json
index b6ff394f09..0a60883f1f 100644
--- a/packages/react-start-client/package.json
+++ b/packages/react-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-client",
- "version": "1.168.36",
+ "version": "1.168.37",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index ca44b1a31d..7867be3565 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/react-start-rsc
+## 0.1.57
+
+### Patch Changes
+
+- Updated dependencies [[`73bfc15`](https://github.com/TanStack/router/commit/73bfc153eef460e9b670556215a5adb2b5cbf542)]:
+ - @tanstack/react-router@1.170.39
+
## 0.1.56
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index 97b0c83185..f698c78588 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.56",
+ "version": "0.1.57",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-server/CHANGELOG.md b/packages/react-start-server/CHANGELOG.md
index 5bc820d2cb..857ed88089 100644
--- a/packages/react-start-server/CHANGELOG.md
+++ b/packages/react-start-server/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/react-start-server
+## 1.167.44
+
+### Patch Changes
+
+- Updated dependencies [[`73bfc15`](https://github.com/TanStack/router/commit/73bfc153eef460e9b670556215a5adb2b5cbf542)]:
+ - @tanstack/react-router@1.170.39
+
## 1.167.43
### Patch Changes
diff --git a/packages/react-start-server/package.json b/packages/react-start-server/package.json
index 20d4704d95..c756eee40f 100644
--- a/packages/react-start-server/package.json
+++ b/packages/react-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-server",
- "version": "1.167.43",
+ "version": "1.167.44",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index 387e26fb56..11cf3a6c31 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/react-start
+## 1.168.58
+
+### Patch Changes
+
+- Updated dependencies [[`73bfc15`](https://github.com/TanStack/router/commit/73bfc153eef460e9b670556215a5adb2b5cbf542)]:
+ - @tanstack/react-router@1.170.39
+ - @tanstack/react-start-client@1.168.37
+ - @tanstack/react-start-rsc@0.1.57
+ - @tanstack/react-start-server@1.167.44
+
## 1.168.57
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index 5a26227e26..bae48b3dbe 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.57",
+ "version": "1.168.58",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
From 0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47 Mon Sep 17 00:00:00 2001
From: Flo
Date: Fri, 25 Sep 2026 16:16:41 +0200
Subject: [PATCH 009/127] fix(router-core): retire invalidated loader
reservations (#8460)
---
.changeset/retire-invalidated-reservations.md | 5 ++
packages/router-core/src/router.ts | 11 +++-
.../invalidation-reserved-flight.test.ts | 55 +++++++++++++++++++
3 files changed, 68 insertions(+), 3 deletions(-)
create mode 100644 .changeset/retire-invalidated-reservations.md
create mode 100644 packages/router-core/tests/invalidation-reserved-flight.test.ts
diff --git a/.changeset/retire-invalidated-reservations.md b/.changeset/retire-invalidated-reservations.md
new file mode 100644
index 0000000000..ed37b81e13
--- /dev/null
+++ b/.changeset/retire-invalidated-reservations.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/router-core': patch
+---
+
+Abort reserved loader generations with no remaining owners when invalidation removes them from discovery, ensuring their public abort signals are retired.
diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts
index 1974690b39..97e060fd57 100644
--- a/packages/router-core/src/router.ts
+++ b/packages/router-core/src/router.ts
@@ -2516,11 +2516,11 @@ export class RouterCore<
this._cache.forEach(consider)
preloads?.forEach((matches) => matches.forEach(consider))
this._tx?.[3 /* matches */].forEach(consider)
- const discardedPreloads: Array = []
+ const abort: Array = []
for (const [controller, matches] of preloads ?? []) {
if (matches.some((match) => invalidIds.has(match.id))) {
preloads!.delete(controller)
- discardedPreloads.push(controller)
+ abort.push(controller)
}
}
const invalidate = (d: MakeRouteMatch) => {
@@ -2557,9 +2557,14 @@ export class RouterCore<
// The superseding load must not discover any same-ID generation selected
// for replacement. Existing owners release it in their normal order.
for (const id of invalidIds) {
+ const flight = this._flights?.get(id)
this._flights?.delete(id)
+ // A reserved discovery has no remaining match owner to retire it later.
+ if (flight && !flight[2 /* leases */]) {
+ abort.push(flight[1 /* controller */])
+ }
}
- for (const controller of discardedPreloads) {
+ for (const controller of abort) {
controller.abort()
}
diff --git a/packages/router-core/tests/invalidation-reserved-flight.test.ts b/packages/router-core/tests/invalidation-reserved-flight.test.ts
new file mode 100644
index 0000000000..d9f3aff105
--- /dev/null
+++ b/packages/router-core/tests/invalidation-reserved-flight.test.ts
@@ -0,0 +1,55 @@
+import { expect, test, vi } from 'vitest'
+import { createMemoryHistory } from '@tanstack/history'
+import { BaseRootRoute, BaseRoute, createControlledPromise } from '../src'
+import { createTestRouter } from './routerTestUtils'
+
+test('invalidation retires a zero-owner reservation before a blocked successor completes', async () => {
+ const started = createControlledPromise()
+ const data = createControlledPromise()
+ const entered = createControlledPromise()
+ const before = createControlledPromise()
+ let signal: AbortSignal | undefined
+ const root = new BaseRootRoute({})
+ const home = new BaseRoute({ getParentRoute: () => root, path: '/' })
+ const target = new BaseRoute({
+ getParentRoute: () => root,
+ path: '/target',
+ validateSearch: (search: Record) => ({
+ blocked: !!search.blocked,
+ }),
+ beforeLoad: ({ search }) => {
+ if (search.blocked) {
+ entered.resolve()
+ return before
+ }
+ return undefined
+ },
+ loader: ({ abortController }) => {
+ signal = abortController.signal
+ started.resolve()
+ return data
+ },
+ })
+ const router = createTestRouter({
+ routeTree: root.addChildren([home, target]),
+ history: createMemoryHistory({ initialEntries: ['/'] }),
+ })
+ await router.load()
+ const first = router.navigate({ to: '/target', search: { blocked: false } })
+ await started
+ const second = router.navigate({ to: '/target', search: { blocked: true } })
+ await entered
+ expect(signal?.aborted).toBe(false)
+ const aborted = vi.fn()
+ signal!.addEventListener('abort', aborted)
+ const invalidation = router.invalidate({
+ filter: (match) => match.routeId === target.id,
+ })
+ await router.navigate({ to: '/' })
+ before.resolve()
+ data.resolve('obsolete data')
+ await Promise.all([first, second, invalidation])
+ expect(signal?.aborted).toBe(true)
+ expect(aborted).toHaveBeenCalledOnce()
+ expect(router.state.location.pathname).toBe('/')
+})
From 76a7c0bfadb42d5f7fe7b9e1748acc7333178c91 Mon Sep 17 00:00:00 2001
From: Sarah Gerrard
Date: Fri, 25 Sep 2026 07:34:47 -0700
Subject: [PATCH 010/127] perf(start-client-core): avoid unused middleware
array (#8353)
---
.changeset/start-middleware-registration.md | 5 ++
.../start-client-core/src/createServerFn.ts | 11 ++--
.../tests/createServerFn.test.ts | 54 +++++++++++++++++++
3 files changed, 65 insertions(+), 5 deletions(-)
create mode 100644 .changeset/start-middleware-registration.md
create mode 100644 packages/start-client-core/tests/createServerFn.test.ts
diff --git a/.changeset/start-middleware-registration.md b/.changeset/start-middleware-registration.md
new file mode 100644
index 0000000000..a8a8e30b27
--- /dev/null
+++ b/.changeset/start-middleware-registration.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/start-client-core': patch
+---
+
+Avoid an unused array when registering server-function middleware.
diff --git a/packages/start-client-core/src/createServerFn.ts b/packages/start-client-core/src/createServerFn.ts
index bfa48039cf..c363fdad78 100644
--- a/packages/start-client-core/src/createServerFn.ts
+++ b/packages/start-client-core/src/createServerFn.ts
@@ -102,13 +102,14 @@ export const createServerFn: CreateServerFn = (options, __opts) => {
// this is primarily useful for letting users create their own abstractions on top of `createServerFn`
const newMiddleware = [...(resolvedOptions.middleware || [])]
- middleware.map((m) => {
- if (TSS_SERVER_FUNCTION_FACTORY in m) {
- if (m.options.middleware) {
- newMiddleware.push(...m.options.middleware)
+ // forEach skips holes and ignores items appended during iteration
+ middleware.forEach((item) => {
+ if (TSS_SERVER_FUNCTION_FACTORY in item) {
+ if (item.options.middleware) {
+ newMiddleware.push(...item.options.middleware)
}
} else {
- newMiddleware.push(m)
+ newMiddleware.push(item)
}
})
diff --git a/packages/start-client-core/tests/createServerFn.test.ts b/packages/start-client-core/tests/createServerFn.test.ts
new file mode 100644
index 0000000000..5958720a7b
--- /dev/null
+++ b/packages/start-client-core/tests/createServerFn.test.ts
@@ -0,0 +1,54 @@
+import { expect, test } from 'vitest'
+import { createMiddleware } from '../src/createMiddleware'
+import { createServerFn } from '../src/createServerFn'
+
+test('appends factory middleware in order without changing source builders', () => {
+ const first = createMiddleware({ type: 'function' })
+ const second = createMiddleware({ type: 'function' })
+ const third = createMiddleware({ type: 'function' })
+ const factory = createServerFn().middleware([second])
+ const base = createServerFn({ method: 'POST' }).middleware([first])
+ const middlewares = Object.freeze([factory, third, second])
+
+ const combined = base.middleware(middlewares)
+
+ expect(combined.options.middleware).toEqual([first, second, third, second])
+ expect(combined.options.method).toBe('POST')
+ expect(base.options.middleware).toEqual([first])
+ expect(factory.options.middleware).toEqual([second])
+ expect(middlewares).toEqual([factory, third, second])
+ expect(combined.middleware([]).options.middleware).toEqual([
+ first,
+ second,
+ third,
+ second,
+ ])
+})
+
+test('ignores empty slots in a middleware array', () => {
+ const middleware = createMiddleware({ type: 'function' })
+ const middlewares: Array = []
+ middlewares[1] = middleware
+
+ expect(createServerFn().middleware(middlewares).options.middleware).toEqual([
+ middleware,
+ ])
+ expect(0 in middlewares).toBe(false)
+})
+
+test('does not register middleware appended while reading the input', () => {
+ const first = createMiddleware({ type: 'function' })
+ const second = createMiddleware({ type: 'function' })
+ const middlewares = [first]
+ Object.defineProperty(middlewares, 0, {
+ get() {
+ middlewares.push(second)
+ return first
+ },
+ })
+
+ expect(createServerFn().middleware(middlewares).options.middleware).toEqual([
+ first,
+ ])
+ expect(middlewares).toHaveLength(2)
+})
From f5ffd3884ba26778a2a8ce53b379a5bded231676 Mon Sep 17 00:00:00 2001
From: Flo
Date: Fri, 25 Sep 2026 16:45:51 +0200
Subject: [PATCH 011/127] perf(router): skip unused link preload cleanup across
adapters (#8436)
* perf(react-router): skip unused link preload cleanup
* perf(react-router): use timer-only cleanup for intent preloading
* Revert "perf(react-router): use timer-only cleanup for intent preloading"
This reverts commit b5f46eac5fc8c74ff2e2618362973fd2f8540255.
* perf(react-router): skip unused link preload cleanup [Self-Healing CI Rerun]
* perf(solid-router,vue-router): skip unused preload cleanup
---------
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
---
.changeset/brown-dots-grab.md | 7 ++
packages/react-router/src/link.tsx | 13 ++-
packages/react-router/tests/link.test.tsx | 29 ++++++
packages/solid-router/src/link.tsx | 8 +-
packages/solid-router/src/utils.ts | 20 +++-
packages/solid-router/tests/link.test.tsx | 111 ++++++++++++++++++++
packages/vue-router/src/link.tsx | 2 +
packages/vue-router/src/utils.ts | 13 ++-
packages/vue-router/tests/link.test.tsx | 117 ++++++++++++++++++++++
9 files changed, 311 insertions(+), 9 deletions(-)
create mode 100644 .changeset/brown-dots-grab.md
diff --git a/.changeset/brown-dots-grab.md b/.changeset/brown-dots-grab.md
new file mode 100644
index 0000000000..d43d6e6a28
--- /dev/null
+++ b/.changeset/brown-dots-grab.md
@@ -0,0 +1,7 @@
+---
+'@tanstack/react-router': patch
+'@tanstack/solid-router': patch
+'@tanstack/vue-router': patch
+---
+
+Skip unused Link preload cleanup when preloading is disabled and ignore queued viewport notifications after their effect has been cleaned up.
diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx
index 94bf0f5ad1..aa958ef31c 100644
--- a/packages/react-router/src/link.tsx
+++ b/packages/react-router/src/link.tsx
@@ -383,10 +383,15 @@ export function useLinkProps<
// the element. The cleanup also cancels a pending intent timer.
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useEffect(() => {
+ // Disabled preloading creates neither an observer nor an intent timer.
+ if (!preload) {
+ return
+ }
if (preload === 'render' && !hasRenderFetched.current) {
hasRenderFetched.current = true
preloadLink(router, _options)
}
+ let active = true
let observer: IntersectionObserver | undefined
if (
preload === 'viewport' &&
@@ -394,12 +399,18 @@ export function useLinkProps<
typeof IntersectionObserver === 'function'
) {
observer = new IntersectionObserver(
- (entries) => enqueuePreload(entries.pop()),
+ (entries) => {
+ // A queued observer notification can arrive after disconnect().
+ if (active) {
+ enqueuePreload(entries.pop())
+ }
+ },
{ rootMargin: '100px' },
)
observer.observe(innerRef.current)
}
return () => {
+ active = false
observer?.disconnect()
cancelPreload(innerRef)
}
diff --git a/packages/react-router/tests/link.test.tsx b/packages/react-router/tests/link.test.tsx
index 897b6d9414..46e6cb8685 100644
--- a/packages/react-router/tests/link.test.tsx
+++ b/packages/react-router/tests/link.test.tsx
@@ -5426,6 +5426,35 @@ describe('Link', () => {
fireEvent.mouseLeave(viewportLink)
await vi.advanceTimersByTimeAsync(50)
expect(preloadRouteSpy).not.toHaveBeenCalled()
+
+ // An effect with preloading disabled owns no resources. Re-enabling it
+ // must still install cancellation for a newly scheduled intent timer.
+ fireEvent.click(screen.getByRole('button', { name: 'Use intent' }))
+ fireEvent.mouseEnter(viewportLink)
+ await vi.advanceTimersByTimeAsync(49)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+ fireEvent.click(screen.getByRole('button', { name: 'Disable preload' }))
+ await vi.advanceTimersByTimeAsync(1)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+
+ fireEvent.click(screen.getByRole('button', { name: 'Use intent' }))
+ fireEvent.mouseEnter(viewportLink)
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).toHaveBeenCalledTimes(1)
+
+ preloadRouteSpy.mockClear()
+ fireEvent.click(screen.getByRole('button', { name: 'Disable preload' }))
+ initialIoCallback(
+ [
+ {
+ isIntersecting: true,
+ target: viewportLink,
+ } as unknown as IntersectionObserverEntry,
+ ],
+ {} as IntersectionObserver,
+ )
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
})
test("Router.preload='render', should trigger the route loader on render", async () => {
diff --git a/packages/solid-router/src/link.tsx b/packages/solid-router/src/link.tsx
index a5fc4bca57..a26483706c 100644
--- a/packages/solid-router/src/link.tsx
+++ b/packages/solid-router/src/link.tsx
@@ -373,7 +373,13 @@ export function useLinkProps<
}
}
- useIntersectionObserver(ref, enqueuePreload, () => preload() !== 'viewport')
+ useIntersectionObserver(
+ ref,
+ enqueuePreload,
+ () => preload() !== 'viewport',
+ // Intent preloading still needs timer cleanup without an observer.
+ () => !!preload(),
+ )
Solid.createEffect(() => {
if (hasRenderFetched) {
diff --git a/packages/solid-router/src/utils.ts b/packages/solid-router/src/utils.ts
index 5d38caca31..f4a2067a6b 100644
--- a/packages/solid-router/src/utils.ts
+++ b/packages/solid-router/src/utils.ts
@@ -10,6 +10,7 @@ import * as Solid from 'solid-js'
* @param ref - The ref to observe
* @param callback - The callback to call when the intersection changes
* @param disabled - Whether observation is disabled
+ * @param cleanupWhenDisabled - Whether cleanup is needed without an observer (defaults to true)
* @returns The IntersectionObserver instance
* @example
* ```tsx
@@ -27,6 +28,7 @@ export function useIntersectionObserver(
ref: Solid.Accessor,
callback: (entry?: IntersectionObserverEntry) => void,
disabled: Solid.Accessor,
+ cleanupWhenDisabled?: Solid.Accessor,
): Solid.Accessor {
const isIntersectionObserverAvailable =
typeof IntersectionObserver === 'function'
@@ -35,21 +37,29 @@ export function useIntersectionObserver(
Solid.createEffect(() => {
const r = ref()
if (disabled() || !r || !isIntersectionObserverAvailable) {
- Solid.onCleanup(() => callback())
+ if (cleanupWhenDisabled?.() ?? true) {
+ Solid.onCleanup(() => callback())
+ }
return
}
- observerRef = new IntersectionObserver(
+ let active = true
+ const observer = new IntersectionObserver(
(entries) => {
- callback(entries.pop())
+ // Queued notifications can arrive after this effect has cleaned up.
+ if (active) {
+ callback(entries.pop())
+ }
},
{ rootMargin: '100px' },
)
- observerRef.observe(r)
+ observerRef = observer
+ observer.observe(r)
Solid.onCleanup(() => {
- observerRef?.disconnect()
+ active = false
+ observer.disconnect()
callback()
})
})
diff --git a/packages/solid-router/tests/link.test.tsx b/packages/solid-router/tests/link.test.tsx
index 0ac4042149..78c4b02347 100644
--- a/packages/solid-router/tests/link.test.tsx
+++ b/packages/solid-router/tests/link.test.tsx
@@ -34,6 +34,7 @@ import {
useRouteContext,
useSearch,
} from '../src'
+import { useIntersectionObserver } from '../src/utils'
import {
getIntersectionObserverMock,
getSearchParamsFromURI,
@@ -5291,6 +5292,116 @@ describe('Link', () => {
expect(ioDisconnectMock).not.toHaveBeenCalled() // it should not disconnect again
})
+ test.each([undefined, false, true])(
+ 'disabled observers honor the cleanup condition (%s)',
+ (cleanupWhenDisabled) => {
+ const callback = vi.fn()
+ const view = render(() => {
+ const [element, setElement] = Solid.createSignal(null)
+ useIntersectionObserver(
+ element,
+ callback,
+ () => true,
+ cleanupWhenDisabled === undefined
+ ? undefined
+ : () => cleanupWhenDisabled,
+ )
+ return
+ })
+ callback.mockClear()
+ view.unmount()
+ if (cleanupWhenDisabled === false) {
+ expect(callback).not.toHaveBeenCalled()
+ } else {
+ expect(callback).toHaveBeenCalledWith()
+ }
+ },
+ )
+
+ test.each(['intent', 'viewport'] as const)(
+ 'preserves %s timer cleanup across mode changes and unmount',
+ async (mode) => {
+ const [preload, setPreload] = Solid.createSignal<
+ false | 'intent' | 'viewport'
+ >()
+ const rootRoute = createRootRoute()
+ const indexRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/',
+ component: () => (
+
+ Preload Link
+
+ ),
+ })
+ const aboutRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/about',
+ })
+ const router = createRouter({
+ routeTree: rootRoute.addChildren([indexRoute, aboutRoute]),
+ history,
+ })
+ const preloadRouteSpy = vi.spyOn(router, 'preloadRoute')
+ const view = render(() => )
+ const link = await screen.findByRole('link', { name: 'Preload Link' })
+ const notify = (callback: IntersectionObserverCallback) => {
+ callback(
+ [
+ {
+ isIntersecting: true,
+ target: link,
+ } as unknown as IntersectionObserverEntry,
+ ],
+ {} as IntersectionObserver,
+ )
+ }
+ const trigger = () => {
+ if (mode === 'intent') {
+ fireEvent.mouseEnter(link)
+ } else {
+ notify(ioCallback)
+ }
+ }
+ vi.useFakeTimers()
+
+ setPreload(mode)
+ await Promise.resolve()
+ const oldObserver = mode === 'viewport' ? ioCallback : undefined
+ trigger()
+ await vi.advanceTimersByTimeAsync(49)
+ setPreload(false)
+ await Promise.resolve()
+ if (oldObserver) {
+ notify(oldObserver)
+ }
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+
+ setPreload(mode)
+ await Promise.resolve()
+ if (oldObserver) {
+ // The mode matches again, but the previous observer is still obsolete.
+ notify(oldObserver)
+ }
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+ trigger()
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).toHaveBeenCalledOnce()
+
+ preloadRouteSpy.mockClear()
+ trigger()
+ const lastObserver = mode === 'viewport' ? ioCallback : undefined
+ view.unmount()
+ if (lastObserver) {
+ notify(lastObserver)
+ }
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+ },
+ )
+
test('Link.preload="viewport" should respect preloadDelay', async () => {
const rootRoute = createRootRoute()
const indexRoute = createRoute({
diff --git a/packages/vue-router/src/link.tsx b/packages/vue-router/src/link.tsx
index 6d2fea690c..cb964c7381 100644
--- a/packages/vue-router/src/link.tsx
+++ b/packages/vue-router/src/link.tsx
@@ -298,6 +298,8 @@ function useLinkPropsImpl(
ref,
enqueuePreload,
() => preload.value !== 'viewport',
+ // Intent preloading still needs timer cleanup without an observer.
+ () => !!preload.value,
)
Vue.watchEffect(() => {
diff --git a/packages/vue-router/src/utils.ts b/packages/vue-router/src/utils.ts
index 8787649d8b..c5e3796384 100644
--- a/packages/vue-router/src/utils.ts
+++ b/packages/vue-router/src/utils.ts
@@ -33,6 +33,7 @@ export const usePrevious = (fn: () => boolean) => {
* @param ref - The ref to observe
* @param callback - The callback to call when the intersection changes
* @param disabled - Whether observation is disabled
+ * @param cleanupWhenDisabled - Whether cleanup is needed without an observer (defaults to true)
* @returns The IntersectionObserver instance
* @example
* ```tsx
@@ -50,6 +51,7 @@ export function useIntersectionObserver(
ref: Vue.Ref,
callback: (entry?: IntersectionObserverEntry) => void,
disabled: () => boolean,
+ cleanupWhenDisabled?: () => boolean,
): Vue.Ref {
const isIntersectionObserverAvailable =
typeof IntersectionObserver === 'function'
@@ -59,13 +61,19 @@ export function useIntersectionObserver(
Vue.watchEffect((onCleanup) => {
const r = ref.value
if (disabled() || !r || !isIntersectionObserverAvailable) {
- onCleanup(() => callback())
+ if (cleanupWhenDisabled?.() ?? true) {
+ onCleanup(() => callback())
+ }
return
}
+ let active = true
const observer = new IntersectionObserver(
(entries) => {
- callback(entries.pop())
+ // Queued notifications can arrive after this effect has cleaned up.
+ if (active) {
+ callback(entries.pop())
+ }
},
{ rootMargin: '100px' },
)
@@ -74,6 +82,7 @@ export function useIntersectionObserver(
observer.observe(r)
onCleanup(() => {
+ active = false
observer.disconnect()
observerRef.value = null
callback()
diff --git a/packages/vue-router/tests/link.test.tsx b/packages/vue-router/tests/link.test.tsx
index e80aec01ef..48fe82e2bb 100644
--- a/packages/vue-router/tests/link.test.tsx
+++ b/packages/vue-router/tests/link.test.tsx
@@ -5545,6 +5545,123 @@ describe('Link', () => {
expect(ioDisconnectMock).not.toHaveBeenCalled() // it should not disconnect again
})
+ test.each([undefined, false, true])(
+ 'disabled observers honor the cleanup condition (%s)',
+ async (cleanupWhenDisabled) => {
+ const callback = vi.fn()
+ const TestComponent = Vue.defineComponent({
+ setup() {
+ const element = Vue.ref(null)
+ useIntersectionObserver(
+ element,
+ callback,
+ () => true,
+ cleanupWhenDisabled === undefined
+ ? undefined
+ : () => cleanupWhenDisabled,
+ )
+ return () =>
+ },
+ })
+ const view = render( )
+ await Vue.nextTick()
+ callback.mockClear()
+ view.unmount()
+ if (cleanupWhenDisabled === false) {
+ expect(callback).not.toHaveBeenCalled()
+ } else {
+ expect(callback).toHaveBeenCalledWith()
+ }
+ },
+ )
+
+ test.each(['intent', 'viewport'] as const)(
+ 'preserves %s timer cleanup across mode changes and unmount',
+ async (mode) => {
+ const preload = Vue.ref()
+ const RouteComponent = Vue.defineComponent({
+ setup() {
+ return () => (
+
+ Preload Link
+
+ )
+ },
+ })
+ const rootRoute = createRootRoute()
+ const indexRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/',
+ component: RouteComponent,
+ })
+ const aboutRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/about',
+ })
+ const router = createRouter({
+ routeTree: rootRoute.addChildren([indexRoute, aboutRoute]),
+ history,
+ })
+ const preloadRouteSpy = vi.spyOn(router, 'preloadRoute')
+ const view = render( )
+ const link = await screen.findByRole('link', { name: 'Preload Link' })
+ const notify = (callback: IntersectionObserverCallback) => {
+ callback(
+ [
+ {
+ isIntersecting: true,
+ target: link,
+ } as unknown as IntersectionObserverEntry,
+ ],
+ {} as IntersectionObserver,
+ )
+ }
+ const trigger = async () => {
+ if (mode === 'intent') {
+ await fireEvent.mouseEnter(link)
+ } else {
+ notify(ioCallback)
+ }
+ }
+ vi.useFakeTimers()
+
+ preload.value = mode
+ await Vue.nextTick()
+ const oldObserver = mode === 'viewport' ? ioCallback : undefined
+ await trigger()
+ await vi.advanceTimersByTimeAsync(49)
+ preload.value = false
+ await Vue.nextTick()
+ if (oldObserver) {
+ notify(oldObserver)
+ }
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+
+ preload.value = mode
+ await Vue.nextTick()
+ if (oldObserver) {
+ // The mode matches again, but the previous observer is still obsolete.
+ notify(oldObserver)
+ }
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+ await trigger()
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).toHaveBeenCalledOnce()
+
+ preloadRouteSpy.mockClear()
+ await trigger()
+ const lastObserver = mode === 'viewport' ? ioCallback : undefined
+ view.unmount()
+ if (lastObserver) {
+ notify(lastObserver)
+ }
+ await vi.advanceTimersByTimeAsync(50)
+ expect(preloadRouteSpy).not.toHaveBeenCalled()
+ },
+ )
+
test('Link.preload="viewport" should respect preloadDelay', async () => {
const rootRoute = createRootRoute()
const indexRoute = createRoute({
From e81845ff1e4fc66d4e4a87f086be65906f7adb94 Mon Sep 17 00:00:00 2001
From: Flo
Date: Fri, 25 Sep 2026 17:02:09 +0200
Subject: [PATCH 012/127] fix(start): parse path params before server route
handlers (#8434)
---
.changeset/hungry-cooks-go.md | 5 +
.../server-routes/src/routeTree.gen.ts | 52 +++++++++++
.../routes/api/parsed-params.$id.$childId.tsx | 51 ++++++++++
.../src/routes/api/parsed-params.$id.ts | 16 ++++
.../server-routes/tests/server-routes.spec.ts | 40 ++++++++
.../src/createStartHandler.ts | 53 ++++++++---
.../tests/createStartHandler.test.ts | 93 +++++++++++++++++++
7 files changed, 295 insertions(+), 15 deletions(-)
create mode 100644 .changeset/hungry-cooks-go.md
create mode 100644 e2e/react-start/server-routes/src/routes/api/parsed-params.$id.$childId.tsx
create mode 100644 e2e/react-start/server-routes/src/routes/api/parsed-params.$id.ts
diff --git a/.changeset/hungry-cooks-go.md b/.changeset/hungry-cooks-go.md
new file mode 100644
index 0000000000..5bf60c3afc
--- /dev/null
+++ b/.changeset/hungry-cooks-go.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/start-server-core': patch
+---
+
+Apply route path parameter parsers, including parent-route parsers, before invoking server route handlers so runtime parameters agree with their inferred types.
diff --git a/e2e/react-start/server-routes/src/routeTree.gen.ts b/e2e/react-start/server-routes/src/routeTree.gen.ts
index 2454c3bb32..7ae1e4f551 100644
--- a/e2e/react-start/server-routes/src/routeTree.gen.ts
+++ b/e2e/react-start/server-routes/src/routeTree.gen.ts
@@ -20,7 +20,9 @@ import { Route as ApiOnlyAnyRouteImport } from './routes/api/only-any'
import { Route as MethodsIndexRouteImport } from './routes/methods/index'
import { Route as MethodsOnlyAnyRouteImport } from './routes/methods/only-any'
import { Route as ApiParamsFooRouteRouteImport } from './routes/api/params/$foo/route'
+import { Route as ApiParsedParamsIdRouteImport } from './routes/api/parsed-params.$id'
import { Route as ApiParamsFooBarRouteImport } from './routes/api/params/$foo/$bar'
+import { Route as ApiParsedParamsIdChildIdRouteImport } from './routes/api/parsed-params.$id.$childId'
const IndexRoute = IndexRouteImport.update({
id: '/',
@@ -77,11 +79,22 @@ const ApiParamsFooRouteRoute = ApiParamsFooRouteRouteImport.update({
path: '/api/params/$foo',
getParentRoute: () => rootRouteImport,
} as any)
+const ApiParsedParamsIdRoute = ApiParsedParamsIdRouteImport.update({
+ id: '/api/parsed-params/$id',
+ path: '/api/parsed-params/$id',
+ getParentRoute: () => rootRouteImport,
+} as any)
const ApiParamsFooBarRoute = ApiParamsFooBarRouteImport.update({
id: '/$bar',
path: '/$bar',
getParentRoute: () => ApiParamsFooRouteRoute,
} as any)
+const ApiParsedParamsIdChildIdRoute =
+ ApiParsedParamsIdChildIdRouteImport.update({
+ id: '/$childId',
+ path: '/$childId',
+ getParentRoute: () => ApiParsedParamsIdRoute,
+ } as any)
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
@@ -95,7 +108,9 @@ export interface FileRoutesByFullPath {
'/methods/only-any': typeof MethodsOnlyAnyRoute
'/methods/': typeof MethodsIndexRoute
'/api/params/$foo': typeof ApiParamsFooRouteRouteWithChildren
+ '/api/parsed-params/$id': typeof ApiParsedParamsIdRouteWithChildren
'/api/params/$foo/$bar': typeof ApiParamsFooBarRoute
+ '/api/parsed-params/$id/$childId': typeof ApiParsedParamsIdChildIdRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
@@ -108,7 +123,9 @@ export interface FileRoutesByTo {
'/methods/only-any': typeof MethodsOnlyAnyRoute
'/methods': typeof MethodsIndexRoute
'/api/params/$foo': typeof ApiParamsFooRouteRouteWithChildren
+ '/api/parsed-params/$id': typeof ApiParsedParamsIdRouteWithChildren
'/api/params/$foo/$bar': typeof ApiParamsFooBarRoute
+ '/api/parsed-params/$id/$childId': typeof ApiParsedParamsIdChildIdRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
@@ -123,7 +140,9 @@ export interface FileRoutesById {
'/methods/only-any': typeof MethodsOnlyAnyRoute
'/methods/': typeof MethodsIndexRoute
'/api/params/$foo': typeof ApiParamsFooRouteRouteWithChildren
+ '/api/parsed-params/$id': typeof ApiParsedParamsIdRouteWithChildren
'/api/params/$foo/$bar': typeof ApiParamsFooBarRoute
+ '/api/parsed-params/$id/$childId': typeof ApiParsedParamsIdChildIdRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
@@ -139,7 +158,9 @@ export interface FileRouteTypes {
| '/methods/only-any'
| '/methods/'
| '/api/params/$foo'
+ | '/api/parsed-params/$id'
| '/api/params/$foo/$bar'
+ | '/api/parsed-params/$id/$childId'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
@@ -152,7 +173,9 @@ export interface FileRouteTypes {
| '/methods/only-any'
| '/methods'
| '/api/params/$foo'
+ | '/api/parsed-params/$id'
| '/api/params/$foo/$bar'
+ | '/api/parsed-params/$id/$childId'
id:
| '__root__'
| '/'
@@ -166,7 +189,9 @@ export interface FileRouteTypes {
| '/methods/only-any'
| '/methods/'
| '/api/params/$foo'
+ | '/api/parsed-params/$id'
| '/api/params/$foo/$bar'
+ | '/api/parsed-params/$id/$childId'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
@@ -179,6 +204,7 @@ export interface RootRouteChildren {
ApiMiddlewareContextRoute: typeof ApiMiddlewareContextRoute
ApiOnlyAnyRoute: typeof ApiOnlyAnyRoute
ApiParamsFooRouteRoute: typeof ApiParamsFooRouteRouteWithChildren
+ ApiParsedParamsIdRoute: typeof ApiParsedParamsIdRouteWithChildren
}
declare module '@tanstack/react-router' {
@@ -260,6 +286,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ApiParamsFooRouteRouteImport
parentRoute: typeof rootRouteImport
}
+ '/api/parsed-params/$id': {
+ id: '/api/parsed-params/$id'
+ path: '/api/parsed-params/$id'
+ fullPath: '/api/parsed-params/$id'
+ preLoaderRoute: typeof ApiParsedParamsIdRouteImport
+ parentRoute: typeof rootRouteImport
+ }
'/api/params/$foo/$bar': {
id: '/api/params/$foo/$bar'
path: '/$bar'
@@ -267,6 +300,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ApiParamsFooBarRouteImport
parentRoute: typeof ApiParamsFooRouteRoute
}
+ '/api/parsed-params/$id/$childId': {
+ id: '/api/parsed-params/$id/$childId'
+ path: '/$childId'
+ fullPath: '/api/parsed-params/$id/$childId'
+ preLoaderRoute: typeof ApiParsedParamsIdChildIdRouteImport
+ parentRoute: typeof ApiParsedParamsIdRoute
+ }
}
}
@@ -295,6 +335,17 @@ const ApiParamsFooRouteRouteChildren: ApiParamsFooRouteRouteChildren = {
const ApiParamsFooRouteRouteWithChildren =
ApiParamsFooRouteRoute._addFileChildren(ApiParamsFooRouteRouteChildren)
+interface ApiParsedParamsIdRouteChildren {
+ ApiParsedParamsIdChildIdRoute: typeof ApiParsedParamsIdChildIdRoute
+}
+
+const ApiParsedParamsIdRouteChildren: ApiParsedParamsIdRouteChildren = {
+ ApiParsedParamsIdChildIdRoute: ApiParsedParamsIdChildIdRoute,
+}
+
+const ApiParsedParamsIdRouteWithChildren =
+ ApiParsedParamsIdRoute._addFileChildren(ApiParsedParamsIdRouteChildren)
+
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
MethodsRouteRoute: MethodsRouteRouteWithChildren,
@@ -305,6 +356,7 @@ const rootRouteChildren: RootRouteChildren = {
ApiMiddlewareContextRoute: ApiMiddlewareContextRoute,
ApiOnlyAnyRoute: ApiOnlyAnyRoute,
ApiParamsFooRouteRoute: ApiParamsFooRouteRouteWithChildren,
+ ApiParsedParamsIdRoute: ApiParsedParamsIdRouteWithChildren,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
diff --git a/e2e/react-start/server-routes/src/routes/api/parsed-params.$id.$childId.tsx b/e2e/react-start/server-routes/src/routes/api/parsed-params.$id.$childId.tsx
new file mode 100644
index 0000000000..06697a22cc
--- /dev/null
+++ b/e2e/react-start/server-routes/src/routes/api/parsed-params.$id.$childId.tsx
@@ -0,0 +1,51 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { createMiddleware } from '@tanstack/react-start'
+
+const handleInvalidParams = createMiddleware().server(async ({ next }) => {
+ try {
+ return await next()
+ } catch (error) {
+ if (error instanceof Error && error.message === 'Invalid child id') {
+ return new Response(error.message, { status: 400 })
+ }
+ throw error
+ }
+})
+
+export const Route = createFileRoute('/api/parsed-params/$id/$childId')({
+ params: {
+ parse: (params) => {
+ const childId = Number(params.childId)
+ if (!Number.isFinite(childId)) {
+ throw new Error('Invalid child id')
+ }
+ return { childId }
+ },
+ stringify: (params) => ({ childId: String(params.childId) }),
+ },
+ server: {
+ handlers: ({ createHandlers }) =>
+ createHandlers({
+ GET: {
+ middleware: [handleInvalidParams],
+ handler: ({ params, request, next }) => {
+ if (new URL(request.url).searchParams.has('render')) {
+ return next({ context: { handlerParams: params } })
+ }
+ const id: number = params.id
+ const childId: number = params.childId
+ return Response.json({ id, childId })
+ },
+ },
+ }),
+ },
+ loader: ({ params, serverContext }) => ({
+ loaderParams: params,
+ handlerParams: serverContext?.handlerParams,
+ }),
+ component: () => (
+
+ {JSON.stringify(Route.useLoaderData())}
+
+ ),
+})
diff --git a/e2e/react-start/server-routes/src/routes/api/parsed-params.$id.ts b/e2e/react-start/server-routes/src/routes/api/parsed-params.$id.ts
new file mode 100644
index 0000000000..0e5f0ab8a9
--- /dev/null
+++ b/e2e/react-start/server-routes/src/routes/api/parsed-params.$id.ts
@@ -0,0 +1,16 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/api/parsed-params/$id')({
+ params: {
+ parse: (params) => ({ id: Number(params.id) }),
+ stringify: (params) => ({ id: String(params.id) }),
+ },
+ server: {
+ handlers: {
+ GET: ({ params }) => {
+ const id: number = params.id
+ return Response.json({ id })
+ },
+ },
+ },
+})
diff --git a/e2e/react-start/server-routes/tests/server-routes.spec.ts b/e2e/react-start/server-routes/tests/server-routes.spec.ts
index 97249fd733..0ede9eaac8 100644
--- a/e2e/react-start/server-routes/tests/server-routes.spec.ts
+++ b/e2e/react-start/server-routes/tests/server-routes.spec.ts
@@ -1,6 +1,46 @@
import { expect } from '@playwright/test'
import { test } from '@tanstack/router-e2e-utils'
+test('server handlers receive parsed path params (issue #8431)', async ({
+ request,
+}) => {
+ const response = await request.get('/api/parsed-params/44')
+
+ expect(response.status()).toBe(200)
+ expect(await response.json()).toEqual({ id: 44 })
+})
+
+test('createHandlers receives parsed parent and child path params', async ({
+ request,
+}) => {
+ const response = await request.get('/api/parsed-params/44/2')
+
+ expect(response.status()).toBe(200)
+ expect(await response.json()).toEqual({ id: 44, childId: 2 })
+})
+
+test('handler middleware can catch path parameter parsing errors', async ({
+ request,
+}) => {
+ const response = await request.get('/api/parsed-params/44/invalid')
+
+ expect(response.status()).toBe(400)
+ expect(await response.text()).toBe('Invalid child id')
+})
+
+test('parsed path params agree when a server handler defers to rendering', async ({
+ page,
+}) => {
+ await page.goto('/api/parsed-params/44/2?render')
+
+ const result = page.getByTestId('parsed-params')
+ await expect(result).toBeVisible()
+ expect(JSON.parse((await result.textContent())!)).toEqual({
+ loaderParams: { id: 44, childId: 2 },
+ handlerParams: { id: 44, childId: 2 },
+ })
+})
+
test('merge-middleware-context', async ({ page }) => {
await page.goto('/merge-middleware-context')
diff --git a/packages/start-server-core/src/createStartHandler.ts b/packages/start-server-core/src/createStartHandler.ts
index 84af2d4558..4c3ba81eca 100644
--- a/packages/start-server-core/src/createStartHandler.ts
+++ b/packages/start-server-core/src/createStartHandler.ts
@@ -45,6 +45,7 @@ import type {
AnyRequestMiddleware,
AnyStartInstanceOptions,
RouteMethod,
+ RouteMethodHandlerFn,
RouterEntry,
StartEntry,
} from '@tanstack/start-client-core'
@@ -906,6 +907,32 @@ async function handleRedirectResponse(
return ssrResponse
}
+function withParsedParams(
+ handler: RouteMethodHandlerFn,
+ matchedRoutes: ReadonlyArray,
+): TODO {
+ if (
+ !matchedRoutes.some(
+ (route) => route.options.params?.parse ?? route.options.parseParams,
+ )
+ ) {
+ return handler
+ }
+
+ return (ctx: TODO) => {
+ // Parse inside the pipeline so middleware can catch errors. Keep the raw
+ // params for app-router validation when the handler defers to rendering.
+ const params = Object.assign(Object.create(null), ctx.params)
+ for (const route of matchedRoutes) {
+ const parse = route.options.params?.parse ?? route.options.parseParams
+ if (parse) {
+ Object.assign(params, parse(params))
+ }
+ }
+ return handler({ ...ctx, params })
+ }
+}
+
async function handleServerRoutes({
getRouter,
request,
@@ -975,27 +1002,23 @@ async function handleServerRoutes({
if (handler) {
const mayDefer = !!foundRoute.options.component
- if (typeof handler === 'function') {
- if (!mayDefer) {
- terminalHandler = handler
- terminalNext = throwIfMayNotDefer
- } else {
- routeMiddlewares.push(handler)
- }
- } else {
+ if (typeof handler !== 'function') {
if (handler.middleware?.length) {
const handlerMiddlewares = flattenMiddlewares(handler.middleware)
for (const m of handlerMiddlewares) {
routeMiddlewares.push(m.options.server)
}
}
- if (handler.handler) {
- if (!mayDefer) {
- terminalHandler = handler.handler
- terminalNext = throwIfMayNotDefer
- } else {
- routeMiddlewares.push(handler.handler)
- }
+ }
+ const routeHandler =
+ typeof handler === 'function' ? handler : handler.handler
+ if (routeHandler) {
+ const parsedHandler = withParsedParams(routeHandler, matchedRoutes)
+ if (!mayDefer) {
+ terminalHandler = parsedHandler
+ terminalNext = throwIfMayNotDefer
+ } else {
+ routeMiddlewares.push(parsedHandler)
}
}
}
diff --git a/packages/start-server-core/tests/createStartHandler.test.ts b/packages/start-server-core/tests/createStartHandler.test.ts
index 18bbbcb9f2..8044b6b52f 100644
--- a/packages/start-server-core/tests/createStartHandler.test.ts
+++ b/packages/start-server-core/tests/createStartHandler.test.ts
@@ -1626,6 +1626,99 @@ describe('createStartHandler direct server routes', () => {
expect(render).not.toHaveBeenCalled()
})
+ it.each(
+ [false, true].flatMap((component) =>
+ ['function', 'object'].flatMap((handlerKind) =>
+ ['params.parse', 'parseParams'].map((parserKind) => ({
+ component,
+ handlerKind,
+ parserKind,
+ })),
+ ),
+ ),
+ )(
+ 'parses server handler params (component=$component, handler=$handlerKind, parser=$parserKind)',
+ async ({ component, handlerKind, parserKind }) => {
+ const parse = (params: { itemId: string }) => ({
+ itemId: Number(params.itemId),
+ })
+ const routeHandler = vi.fn(({ params }: any) => Response.json(params))
+ startMocks.router = makeRouter({
+ path: '/items/$itemId',
+ component: component ? () => null : undefined,
+ ...(parserKind === 'params.parse'
+ ? { params: { parse } }
+ : { parseParams: parse }),
+ server: {
+ handlers: {
+ GET:
+ handlerKind === 'function'
+ ? routeHandler
+ : { handler: routeHandler },
+ },
+ },
+ })
+ const render = vi.fn(() => new Response('must not render'))
+ const handler = createStartHandler(render)
+
+ const response = await handler(
+ new Request('http://localhost/items/42'),
+ {},
+ )
+
+ expect(response.status).toBe(200)
+ await expect(response.json()).resolves.toEqual({ itemId: 42 })
+ expect(routeHandler).toHaveBeenCalledOnce()
+ expect(render).not.toHaveBeenCalled()
+ },
+ )
+
+ it.each(['route', 'handler'] as const)(
+ 'lets %s middleware catch terminal handler parameter parsing errors',
+ async (placement) => {
+ const error = new Error('Invalid item id')
+ const middleware = createMiddleware().server(async ({ next }) => {
+ try {
+ return await next()
+ } catch (caught) {
+ expect(caught).toBe(error)
+ return new Response(error.message, { status: 400 })
+ }
+ })
+ const routeHandler = vi.fn(() => new Response('must not run'))
+ startMocks.router = makeRouter({
+ path: '/items/$itemId',
+ component: undefined,
+ params: {
+ parse: () => {
+ throw error
+ },
+ },
+ server: {
+ ...(placement === 'route' ? { middleware: [middleware] } : {}),
+ handlers: {
+ GET:
+ placement === 'handler'
+ ? { middleware: [middleware], handler: routeHandler }
+ : routeHandler,
+ },
+ },
+ })
+ const render = vi.fn(() => new Response('must not render'))
+ const handler = createStartHandler(render)
+
+ const response = await handler(
+ new Request('http://localhost/items/nope'),
+ {},
+ )
+
+ expect(response.status).toBe(400)
+ await expect(response.text()).resolves.toBe('Invalid item id')
+ expect(routeHandler).not.toHaveBeenCalled()
+ expect(render).not.toHaveBeenCalled()
+ },
+ )
+
it.each(['route', 'handler'] as const)(
'runs %s middleware instead of incorrectly taking the direct path',
async (placement) => {
From bb4423e09872aee4f2544600d0eba3303fc7db56 Mon Sep 17 00:00:00 2001
From: Flo
Date: Fri, 25 Sep 2026 20:43:16 +0200
Subject: [PATCH 013/127] bench(client-nav): add React and Solid hydration
scenarios (#8439)
* bench(client-nav): add React hydration scenario
* fix(benchmarks): await React hydration completion under instrumentation
* bench(client-nav): add Solid and Vue hydration scenarios
* ci: apply automated fixes
* bench(client-nav): split Vue hydration into a separate PR
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
---
benchmarks/README.md | 5 +-
benchmarks/client-nav/README.md | 81 ++++-
benchmarks/client-nav/package.json | 4 +
.../scenarios/hydration/react/fixture.ts | 31 ++
.../hydration/react/generate-fixture.mjs | 23 ++
.../hydration/react/hydration.test.ts | 106 ++++++
.../scenarios/hydration/react/project.json | 40 +++
.../scenarios/hydration/react/settle.ts | 35 ++
.../scenarios/hydration/react/setup.ts | 307 ++++++++++++++++
.../scenarios/hydration/react/speed.bench.ts | 23 ++
.../scenarios/hydration/react/src/app.tsx | 216 +++++++++++
.../scenarios/hydration/react/src/client.tsx | 83 +++++
.../scenarios/hydration/react/src/server.tsx | 29 ++
.../scenarios/hydration/react/tsconfig.json | 10 +
.../scenarios/hydration/react/vite.config.ts | 36 ++
.../hydration/react/vite.server.config.ts | 26 ++
.../scenarios/hydration/solid/fixture.ts | 35 ++
.../hydration/solid/generate-fixture.mjs | 30 ++
.../hydration/solid/hydration.test.ts | 85 +++++
.../scenarios/hydration/solid/project.json | 40 +++
.../scenarios/hydration/solid/setup.ts | 339 ++++++++++++++++++
.../scenarios/hydration/solid/speed.bench.ts | 23 ++
.../scenarios/hydration/solid/src/app.tsx | 213 +++++++++++
.../scenarios/hydration/solid/src/client.tsx | 91 +++++
.../scenarios/hydration/solid/src/server.tsx | 40 +++
.../scenarios/hydration/solid/tsconfig.json | 10 +
.../scenarios/hydration/solid/vite.config.ts | 38 ++
.../hydration/solid/vite.server.config.ts | 29 ++
28 files changed, 2020 insertions(+), 8 deletions(-)
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/fixture.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/generate-fixture.mjs
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/hydration.test.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/project.json
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/settle.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/setup.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/speed.bench.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/src/app.tsx
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/src/client.tsx
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/src/server.tsx
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/tsconfig.json
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/vite.config.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/react/vite.server.config.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/fixture.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/generate-fixture.mjs
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/hydration.test.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/project.json
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/setup.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/speed.bench.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/src/app.tsx
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/src/client.tsx
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/src/server.tsx
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/tsconfig.json
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/vite.config.ts
create mode 100644 benchmarks/client-nav/scenarios/hydration/solid/vite.server.config.ts
diff --git a/benchmarks/README.md b/benchmarks/README.md
index 96cd63f850..7e9a5f4248 100644
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -1,6 +1,7 @@
# CPU simulation benchmarks
-`client-nav` measures navigation in Node/jsdom; `ssr` measures server requests.
+`client-nav` measures navigation, mounting, and React/Solid hydration in
+Node/jsdom; `ssr` measures server requests.
Both suites run through the CodSpeed Vitest integration in CPU simulation mode.
## Worker runtime
@@ -81,7 +82,7 @@ gh workflow run client-nav-benchmarks.yml --ref
Wait for each workflow run to finish before dispatching the next repetition at
the same commit. The workflow also runs memory benchmarks; exclude those results
when assessing CPU repeatability. Check that every repetition has all expected
-CPU results (currently 132), rather than inherited results from an earlier run.
+CPU results (currently 134), rather than inherited results from an earlier run.
Compare each benchmark's minimum and maximum across repetitions; keep input data,
navigation/request counts, builds, dependencies and Node version fixed when
testing runtime configuration changes.
diff --git a/benchmarks/client-nav/README.md b/benchmarks/client-nav/README.md
index c8ebbf06bc..b49bc02376 100644
--- a/benchmarks/client-nav/README.md
+++ b/benchmarks/client-nav/README.md
@@ -9,10 +9,11 @@ Cross-framework client-side CPU benchmarks for:
The benchmarks run in jsdom against production builds of real apps, and are
tracked in CI by CodSpeed (simulation mode).
-> **Scope:** these benchmarks cover the standalone client router only. The
-> client side of TanStack Start (hydration of a server-rendered document,
-> streamed payload consumption, server-function calls from the client, ...) is
-> not covered here; the server side of Start is covered by `benchmarks/ssr`.
+> **Scope:** these benchmarks cover the client router. The hydration
+> scenarios also cover DOM hydration and the Router state-restoration path
+> used by Start. Start-specific entry-point initialization, streamed payload
+> arrival and client server-function calls are not included. Server request work
+> is covered by `benchmarks/ssr`.
## Layout
@@ -38,7 +39,7 @@ scenarios///
routes/
```
-Scenario apps use file-based routing (`@tanstack/router-plugin`) with a
+Navigation scenario apps use file-based routing (`@tanstack/router-plugin`) with a
generated `routeTree.gen.ts`, like a regular user app. Each scenario uses one
app per framework instead of sharing routes in the baseline app. This keeps
route-tree size and router options isolated so one scenario cannot shift
@@ -57,9 +58,10 @@ be attributed to a specific feature area.
| `control-flow` | Loader-thrown `redirect` (including a 2-hop chain), `notFound()` with `notFoundComponent`, loader errors with `errorComponent`, and boundary reset on recovery navigation. |
| `head` | `HeadContent` per-navigation work: nested route `head()` evaluation, title/meta/link dedupe across matches, and head tag DOM updates during navigation. |
| `history` | History push/replace/back/forward traversal, location masking, registered-but-never-blocking `useBlocker`, and `useCanGoBack`/`useLocation` subscriptions. |
+| `hydration` | Initial DOM hydration: execute the SSR payload, restore `beforeLoad` context and loader data, and hydrate 192 ordinary and eight hash-sensitive Links through their follow-up effects in React and Solid. |
| `links` | Per-navigation cost of ~200 mounted ` `s: link prop building, active-state recompute across `activeOptions` variants, `activeProps` swaps, and `useMatchRoute` probes (the `MatchRoute` component is avoided: vue-router's implementation leaks one subscription per render). |
| `loaders` | Client loader dispatch: always-stale re-runs (`staleTime: 0`), cached revisits (re-run once per lap by the `invalidate` step), `loaderDeps`-keyed caching, `router.invalidate()`, and `useLoaderData` selectors. |
-| `mount` | Cold start: `createRouter` (route-tree processing) + first render + initial `router.load()` + unmount, with a fresh router per mount. The only scenario measuring router creation. |
+| `mount` | Cold start: `createRouter` (route-tree processing) + first render + initial `router.load()` + unmount, with a fresh router per mount. |
| `nested-params` | Deep nesting (8 dynamic levels): per-level `params.parse`/`stringify`, `beforeLoad` context accumulation across matches, and per-level `useParams`/`useRouteContext` subscriptions. Param values include characters requiring percent-encoding (as do `route-tree-scale`'s), so segment encode/decode paths run on every navigation. |
| `preload` | Intent preloading from hover events, programmatic `router.preloadRoute`, deterministic preload cache behavior (`defaultPreloadStaleTime: 0`), and commit-time cache maintenance. |
| `rewrites` | Composed client-side location rewrites: router `basepath` plus a locale input/output rewrite pair, running on every href build and location parse (the client analog of the SSR `rewrites` scenario). |
@@ -68,6 +70,9 @@ be attributed to a specific feature area.
## Conventions
+The hydration scenario has the separate lifecycle described below. The other
+scenarios follow these navigation/mount conventions:
+
- Apps are built with `NODE_ENV=production` (`minify: false`) into `dist/app.js`; benches import the built bundle, so production package builds and production JSX output are measured, not dev transforms.
- Scenarios behave like a real user app: navigation happens through ` ` clicks dispatched on real anchor elements (unless a scenario specifically measures the imperative API), the router uses the default browser history, and `scrollRestoration` is enabled.
- Each benchmark iteration advances a fixed, circular sequence of steps; every step awaits the router's `onRendered` event, so render work is included and steps cannot overlap. No two consecutive steps may target the same location, and the sequence ends back on the initial route.
@@ -116,6 +121,70 @@ Typecheck benchmark sources (baseline + scenarios):
CI=1 NX_DAEMON=false pnpm nx run @benchmarks/client-nav:test:types --outputStyle=stream --skipRemoteCache
```
+## Hydration
+
+`scenarios/hydration/{react,solid}` provide the same initial-hydration
+workload: 192 ordinary Links, eight hash-sensitive Links, and three matched
+routes with three `beforeLoad` contexts and two loader results. The server URL
+has no fragment; the client URL has `#details`, matching half of the hash-sensitive Links.
+
+```bash
+CI=1 NX_DAEMON=false pnpm nx run @benchmarks/client-nav-hydration-react:test:perf --outputStyle=stream --skipRemoteCache
+CI=1 NX_DAEMON=false pnpm nx run @benchmarks/client-nav-hydration-react:test:unit --outputStyle=stream --skipRemoteCache
+CI=1 NX_DAEMON=false pnpm nx run @benchmarks/client-nav-hydration-react:test:types:client --outputStyle=stream --skipRemoteCache
+```
+
+Replace `react` with `solid` to run the other adapter.
+
+The build generates static HTML and its real Router SSR bootstrap scripts once
+with `createRequestHandler` and the adapter's streaming renderer. Generation
+fully consumes the response and runs outside the CodSpeed action. The measured
+worker only reads these artifacts; it does not import a server renderer or start a server.
+
+Each invocation uses a fresh jsdom window and a fresh evaluation of the complete
+production client bundle in that window's realm. HTML parsing, bundle evaluation,
+and the initial document lifecycle finish in untimed setup. This resets module
+state as well as the DOM, avoiding cached hydration promises and cross-realm
+payload objects. The bundle and bootstrap scripts are compiled once, so this
+measures a fresh application with warm code, not JavaScript download/parse cost.
+
+The timed region executes the serialized payload, creates the router and its
+small code-based route tree, calls the public client `hydrate` API, and hydrates
+the existing DOM with the framework's native renderer:
+
+- **React:** a separate completion component signals from its post-hydration
+ effect, after the same snapshot transition as hash-sensitive Links. The harness
+ awaits that signal and two idle React scheduler turns, then checks the expected
+ active links. Concurrent hydration can take as many turns as needed under CPU
+ instrumentation, with a 60-second failure watchdog.
+- **Solid:** execute the native hydration bootstrap and retain the server's
+ component/key hierarchy. Wait for mount, the router's rendered event, active-link
+ effects, and two idle turns. DOM identity assertions include every workload
+ element so template fallback cannot silently replace server nodes.
+
+Solid bounds settlement to 100 turns. Ending at the hydration call or the
+first mount would miss post-hydration Link updates.
+Timer turns use `setImmediate`; scrolling is a no-op
+because this is CPU simulation rather than browser layout/paint measurement.
+
+Untimed assertions verify restored contexts and every loader row, zero client
+`beforeLoad`/loader calls, expected hrefs/active state, original DOM-node identity,
+working event handlers, and absence of hydration errors. Root unmount, pending
+task cancellation, and window disposal also run outside measurement. Diagnostic
+tests count Link renders or reactive evaluations and check they stop before the
+measured region ends; counting is disabled in the timed workload.
+
+CodSpeed uses suite `beforeEach`/`afterEach` hooks. Ordinary Vitest instead
+installs Tinybench's public Task iteration hooks from its stage-level `setup`.
+Using only stage-level setup would let later iterations reuse an already
+hydrated document. The hydration unit tests cover fresh-state setup through
+both paths.
+
+Each scenario is included in its framework's aggregate build and CodSpeed run.
+Land the benchmark independently to establish main's baseline before comparing a
+hydration optimization. Regenerate each revision's artifacts with identical
+fixture data and dependencies; do not pin an old hydration wire format forever.
+
## Isolated route-tree construction
`scenarios/route-tree-scale` measures navigation over an existing tree, not
diff --git a/benchmarks/client-nav/package.json b/benchmarks/client-nav/package.json
index 84f0dc9807..0b2a4cd5b3 100644
--- a/benchmarks/client-nav/package.json
+++ b/benchmarks/client-nav/package.json
@@ -64,6 +64,7 @@
"@benchmarks/client-nav-control-flow-react",
"@benchmarks/client-nav-head-react",
"@benchmarks/client-nav-history-react",
+ "@benchmarks/client-nav-hydration-react",
"@benchmarks/client-nav-links-react",
"@benchmarks/client-nav-loaders-react",
"@benchmarks/client-nav-mount-react",
@@ -92,6 +93,7 @@
"@benchmarks/client-nav-control-flow-solid",
"@benchmarks/client-nav-head-solid",
"@benchmarks/client-nav-history-solid",
+ "@benchmarks/client-nav-hydration-solid",
"@benchmarks/client-nav-links-solid",
"@benchmarks/client-nav-loaders-solid",
"@benchmarks/client-nav-mount-solid",
@@ -201,6 +203,8 @@
"@benchmarks/client-nav-history-react",
"@benchmarks/client-nav-history-solid",
"@benchmarks/client-nav-history-vue",
+ "@benchmarks/client-nav-hydration-react",
+ "@benchmarks/client-nav-hydration-solid",
"@benchmarks/client-nav-links-react",
"@benchmarks/client-nav-links-solid",
"@benchmarks/client-nav-links-vue",
diff --git a/benchmarks/client-nav/scenarios/hydration/react/fixture.ts b/benchmarks/client-nav/scenarios/hydration/react/fixture.ts
new file mode 100644
index 0000000000..950c870a1c
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/fixture.ts
@@ -0,0 +1,31 @@
+export const ordinaryLinkCount = 192
+export const hashLinkCount = 8
+export const serverUrl = '/teams/team-7/items/item-42?view=summary'
+export const clientUrl = `${serverUrl}#details`
+
+export interface Diagnostics {
+ beforeLoads: number
+ loaders: number
+ mounted: boolean
+ clicks: number
+ ordinaryRenders: number
+ hashRenders: number
+ countRenders: boolean
+}
+
+export function createDiagnostics(countRenders = false): Diagnostics {
+ return {
+ beforeLoads: 0,
+ loaders: 0,
+ mounted: false,
+ clicks: 0,
+ ordinaryRenders: 0,
+ hashRenders: 0,
+ countRenders,
+ }
+}
+
+export interface FixtureArtifact {
+ html: string
+ scripts: Array
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/generate-fixture.mjs b/benchmarks/client-nav/scenarios/hydration/react/generate-fixture.mjs
new file mode 100644
index 0000000000..fbc67c5a08
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/generate-fixture.mjs
@@ -0,0 +1,23 @@
+import assert from 'node:assert/strict'
+import { writeFile } from 'node:fs/promises'
+import { JSDOM } from 'jsdom'
+
+if (process.env.NODE_ENV !== 'production') {
+ throw new Error('Generate the hydration fixture in production mode')
+}
+const { renderFixture } = await import('./dist/server/server.js')
+const html = await renderFixture()
+const dom = new JSDOM(html)
+try {
+ const scriptElements = [...dom.window.document.querySelectorAll('script')]
+ assert.ok(scriptElements.length > 0)
+ assert.ok(scriptElements.every((script) => !script.src))
+ const scripts = scriptElements.map((script) => script.textContent)
+ assert.ok(scripts.some((script) => script.includes('$_TSR')))
+ await writeFile(
+ new URL('./dist/fixture.json', import.meta.url),
+ JSON.stringify({ html, scripts }),
+ )
+} finally {
+ dom.window.close()
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/hydration.test.ts b/benchmarks/client-nav/scenarios/hydration/react/hydration.test.ts
new file mode 100644
index 0000000000..295f9ceb80
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/hydration.test.ts
@@ -0,0 +1,106 @@
+import { expect, test } from 'vitest'
+import { hashLinkCount, ordinaryLinkCount } from './fixture'
+import { setup } from './setup'
+import { settleHydration } from './settle'
+
+const turn = () => new Promise((resolve) => setImmediate(resolve))
+
+test('restores data and context into fresh DOMs and includes follow-up renders', async () => {
+ const scenario = setup({ countRenders: true })
+ for (let iteration = 0; iteration < 3; iteration++) {
+ await scenario.before()
+ try {
+ expect(scenario.snapshot().diagnostics.mounted).toBe(false)
+ expect(scenario.snapshot().matches).toBeUndefined()
+ await scenario.run()
+ const completed = scenario.snapshot()
+ // Supports both main's extra Link update and the optimized snapshot.
+ expect([ordinaryLinkCount, ordinaryLinkCount * 2]).toContain(
+ completed.diagnostics.ordinaryRenders,
+ )
+ expect(completed.diagnostics.hashRenders).toBeGreaterThanOrEqual(
+ hashLinkCount + hashLinkCount / 2,
+ )
+ for (let index = 0; index < 4; index++) {
+ await turn()
+ }
+ expect(scenario.snapshot()).toEqual(completed)
+ await expect(scenario.run()).rejects.toThrow('newly prepared sample')
+ } finally {
+ await scenario.after()
+ }
+ }
+})
+
+test('installs per-iteration preparation for the ordinary Vitest runner', async () => {
+ const scenario = setup()
+ const task: Parameters[0] = {
+ opts: {},
+ }
+ scenario.installIterationHooks(task)
+ for (let iteration = 0; iteration < 2; iteration++) {
+ await task.opts.beforeEach!()
+ try {
+ expect(scenario.snapshot().diagnostics.mounted).toBe(false)
+ await scenario.run()
+ } finally {
+ await task.opts.afterEach!()
+ }
+ }
+})
+
+test('rejects an empty measurement and still releases its sample', async () => {
+ const scenario = setup()
+ await scenario.before()
+ await expect(scenario.after()).rejects.toThrow(
+ 'Hydration sample was not completed',
+ )
+ await scenario.before()
+ try {
+ await scenario.run()
+ } finally {
+ await scenario.after()
+ }
+})
+
+test('waits for a commit and scheduler work lasting more than 100 turns', async () => {
+ let committed = false
+ const commit = (async () => {
+ for (let index = 0; index < 150; index++) {
+ await turn()
+ }
+ committed = true
+ })()
+ let remainingCallbacks = 150
+ await settleHydration(
+ commit,
+ () => {
+ expect(committed).toBe(true)
+ return remainingCallbacks-- <= 0
+ },
+ () => 'delayed commit',
+ )
+ expect(remainingCallbacks).toBeLessThan(0)
+})
+
+test('retains a watchdog for a commit that never completes', async () => {
+ await expect(
+ settleHydration(
+ new Promise(() => {}),
+ () => true,
+ () => 'commit pending',
+ 10,
+ ),
+ ).rejects.toThrow('Hydration did not settle within 10ms: commit pending')
+})
+
+test('retains a watchdog when scheduler work never becomes idle', async () => {
+ await expect(
+ settleHydration(
+ Promise.resolve(),
+ () => false,
+ () => 'callbacks pending',
+ 10,
+ ),
+ ).rejects.toThrow('Hydration did not settle within 10ms: callbacks pending')
+})
diff --git a/benchmarks/client-nav/scenarios/hydration/react/project.json b/benchmarks/client-nav/scenarios/hydration/react/project.json
new file mode 100644
index 0000000000..ece8f2de66
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/project.json
@@ -0,0 +1,40 @@
+{
+ "name": "@benchmarks/client-nav-hydration-react",
+ "projectType": "application",
+ "targets": {
+ "build:client": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": [
+ { "projects": ["@tanstack/react-router"], "target": "build" }
+ ],
+ "options": {
+ "command": "NODE_ENV=production vite build --config {projectRoot}/vite.server.config.ts && NODE_ENV=production node {projectRoot}/generate-fixture.mjs && NODE_ENV=production vite build --config {projectRoot}/vite.config.ts"
+ }
+ },
+ "test:unit": {
+ "executor": "nx:run-commands",
+ "dependsOn": ["build:client"],
+ "options": {
+ "command": "vitest run --config ./scenarios/hydration/react/vite.config.ts",
+ "cwd": "benchmarks/client-nav"
+ }
+ },
+ "test:perf": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": ["build:client"],
+ "options": {
+ "command": "NODE_ENV=production vitest bench --run --config ./scenarios/hydration/react/vite.config.ts",
+ "cwd": "benchmarks/client-nav"
+ }
+ },
+ "test:types:client": {
+ "executor": "nx:run-commands",
+ "dependsOn": [
+ { "projects": ["@tanstack/react-router"], "target": "build" }
+ ],
+ "options": { "command": "tsc -p {projectRoot}/tsconfig.json --noEmit" }
+ }
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/settle.ts b/benchmarks/client-nav/scenarios/hydration/react/settle.ts
new file mode 100644
index 0000000000..cc4c09a72d
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/settle.ts
@@ -0,0 +1,35 @@
+const turn = () => new Promise((resolve) => setImmediate(resolve))
+
+export async function settleHydration(
+ committed: Promise,
+ isIdle: () => boolean,
+ describeProgress: () => string,
+ timeoutMs = 60_000,
+) {
+ let timeoutError: Error | undefined
+ let watchdog: ReturnType | undefined
+ const timeout = new Promise((_, reject) => {
+ watchdog = setTimeout(() => {
+ timeoutError = new Error(
+ `Hydration did not settle within ${timeoutMs}ms: ${describeProgress()}`,
+ )
+ reject(timeoutError)
+ }, timeoutMs)
+ })
+ try {
+ // Concurrent hydration can need many more scheduler turns under CPU
+ // instrumentation. Await its commit instead of limiting successful work
+ // to an arbitrary number of event-loop polls.
+ await Promise.race([committed, timeout])
+ let idleTurns = 0
+ while (idleTurns < 2) {
+ await turn()
+ if (timeoutError) {
+ throw timeoutError
+ }
+ idleTurns = isIdle() ? idleTurns + 1 : 0
+ }
+ } finally {
+ clearTimeout(watchdog)
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/setup.ts b/benchmarks/client-nav/scenarios/hydration/react/setup.ts
new file mode 100644
index 0000000000..caaa539991
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/setup.ts
@@ -0,0 +1,307 @@
+import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
+import { fileURLToPath } from 'node:url'
+import { Script } from 'node:vm'
+import { JSDOM, VirtualConsole } from 'jsdom'
+import { clientUrl, hashLinkCount, ordinaryLinkCount } from './fixture'
+import { settleHydration } from './settle'
+import type { FixtureArtifact } from './fixture'
+import type * as Client from './src/client'
+
+type ClientApp = typeof Client
+type TaskHooks = {
+ opts: {
+ beforeEach?: () => void | Promise
+ afterEach?: () => void | Promise
+ }
+}
+
+const turn = () => new Promise((resolve) => setImmediate(resolve))
+
+export function setup({ countRenders = false } = {}) {
+ // Compile once, outside measurement. Evaluation below creates fresh objects
+ // in each window's realm; neither the payload nor module state is reused.
+ const artifact: FixtureArtifact = JSON.parse(
+ readFileSync(new URL('./dist/fixture.json', import.meta.url), 'utf8'),
+ )
+ const clientPath = new URL('./dist/client/client.js', import.meta.url)
+ const clientScript = new Script(readFileSync(clientPath, 'utf8'), {
+ filename: fileURLToPath(clientPath),
+ })
+ const bootstrapScripts = artifact.scripts.map(
+ (source, index) =>
+ new Script(source, {
+ filename: `hydration-bootstrap-${index}.js`,
+ }),
+ )
+ let current: Awaited> | undefined
+
+ async function prepare() {
+ const errors: Array = []
+ const virtualConsole = new VirtualConsole()
+ virtualConsole.on('jsdomError', (error) => errors.push(String(error)))
+ virtualConsole.on('error', (...args) =>
+ errors.push(args.map(String).join(' ')),
+ )
+ const dom = new JSDOM(artifact.html, {
+ url: `http://localhost${clientUrl}`,
+ runScripts: 'outside-only',
+ virtualConsole,
+ })
+ const immediates = new Set()
+ try {
+ Object.assign(dom.window, {
+ TextEncoder,
+ TextDecoder,
+ ReadableStream,
+ WritableStream,
+ TransformStream,
+ // Let React's production scheduler use the same task-turn primitive as
+ // the existing Node client benchmarks, without a real-delay timer.
+ setImmediate(
+ callback: (...args: Array) => void,
+ ...args: Array
+ ) {
+ const handle = setImmediate(() => {
+ immediates.delete(handle)
+ callback(...args)
+ })
+ immediates.add(handle)
+ return handle
+ },
+ clearImmediate(handle: NodeJS.Immediate) {
+ immediates.delete(handle)
+ clearImmediate(handle)
+ },
+ fetch() {
+ throw new Error('Hydration attempted a network request')
+ },
+ scrollTo() {},
+ })
+ const context = dom.getInternalVMContext()
+ // jsdom has no layout/scroll implementation; only hydration CPU is measured.
+ dom.window.HTMLElement.prototype.scrollIntoView = () => {}
+ clientScript.runInContext(context)
+ const app = (dom.window as unknown as { HydrationBenchmark: ClientApp })
+ .HydrationBenchmark
+ assert.equal(app.serverEnvironment, false)
+ const anchors = Array.from(dom.window.document.querySelectorAll('a'))
+ const scriptElements = Array.from(
+ dom.window.document.querySelectorAll('script'),
+ )
+ const executingScript = { current: null as HTMLScriptElement | null }
+ Object.defineProperty(dom.window.document, 'currentScript', {
+ configurable: true,
+ get: () => executingScript.current,
+ })
+ assert.equal(anchors.length, ordinaryLinkCount + hashLinkCount)
+ const content = dom.window.document.getElementById('hydration-content')
+ assert.ok(content)
+ // Finish jsdom's initial document lifecycle before opening the measure.
+ await turn()
+ assert.equal(dom.window.document.readyState, 'complete')
+ assert.equal(app.ready(), false)
+ return {
+ dom,
+ context,
+ app,
+ anchors,
+ content,
+ scriptElements,
+ executingScript,
+ immediates,
+ errors,
+ started: false,
+ completed: false,
+ failed: false,
+ }
+ } catch (error) {
+ for (const handle of immediates) {
+ clearImmediate(handle)
+ }
+ dom.window.close()
+ throw error
+ }
+ }
+
+ async function before() {
+ if (current) {
+ throw new Error('Previous hydration sample was not disposed')
+ }
+ current = await prepare()
+ }
+
+ async function run() {
+ const sample = current
+ if (!sample || sample.started) {
+ throw new Error('Hydration requires a newly prepared sample')
+ }
+ sample.started = true
+ try {
+ // HTML parsing/module evaluation are already done. Payload execution,
+ // router initialization/restoration and React hydration are measured.
+ for (let index = 0; index < bootstrapScripts.length; index++) {
+ // SSR bootstrap scripts remove their own script element after running.
+ sample.executingScript.current = sample.scriptElements[index]!
+ try {
+ bootstrapScripts[index]!.runInContext(sample.context)
+ } finally {
+ sample.executingScript.current = null
+ }
+ }
+ await settleHydration(
+ sample.app.start(countRenders),
+ () => sample.immediates.size === 0,
+ () => {
+ const progress = sample.app.snapshot()
+ return JSON.stringify({
+ diagnostics: progress.diagnostics,
+ errors: [...sample.errors, ...progress.errors],
+ restoredMatches: progress.matches?.length,
+ pendingSchedulerCallbacks: sample.immediates.size,
+ })
+ },
+ )
+ if (sample.errors.length) {
+ throw new Error(sample.errors.join('\n'))
+ }
+ assert.ok(
+ sample.app.ready(),
+ 'Hydration committed without the expected active links',
+ )
+ sample.completed = true
+ } catch (error) {
+ sample.failed = true
+ throw error
+ }
+ }
+
+ function snapshot() {
+ if (!current) {
+ throw new Error('No hydration sample')
+ }
+ // Normalize realm prototypes only for untimed assertions.
+ return JSON.parse(JSON.stringify(current.app.snapshot())) as ReturnType<
+ ClientApp['snapshot']
+ >
+ }
+
+ function validate() {
+ assert.ok(current?.started)
+ const { dom, anchors, content, errors } = current
+ const doc = dom.window.document
+ const result = snapshot()
+ assert.deepEqual(errors, [])
+ assert.deepEqual(result.errors, [])
+ assert.equal(result.diagnostics.beforeLoads, 0)
+ assert.equal(result.diagnostics.loaders, 0)
+ assert.equal(result.diagnostics.mounted, true)
+ assert.equal(result.location, clientUrl)
+ assert.equal(result.matches?.length, 3)
+ for (const match of result.matches) {
+ assert.equal(match.status, 'success')
+ assert.deepEqual(match.context.viewer, {
+ id: 'viewer-3',
+ name: 'Ada',
+ role: 'editor',
+ })
+ }
+ assert.deepEqual(result.matches[1]!.context.team, {
+ id: 'team-7',
+ member: 'viewer-3',
+ })
+ assert.deepEqual(result.matches[2]!.context.permissions, { edit: true })
+ assert.deepEqual(result.matches[1]!.loaderData, {
+ title: 'Team team-7',
+ categories: ['open', 'closed'],
+ })
+ const data = result.matches[2]!.loaderData as {
+ owner: string
+ selected: string
+ rows: Array<{
+ id: string
+ label: string
+ details: { score: number; open: boolean }
+ }>
+ }
+ assert.equal(data.owner, 'viewer-3')
+ assert.equal(data.selected, 'item-42')
+ assert.equal(data.rows.length, ordinaryLinkCount)
+ assert.equal(doc.getElementById('hydration-content'), content)
+ assert.equal(doc.querySelectorAll('a').length, anchors.length)
+ assert.equal(doc.getElementById('viewer')?.textContent, 'Ada')
+ assert.equal(doc.getElementById('permission')?.textContent, 'Editable')
+ for (const anchor of anchors) {
+ assert.equal(doc.getElementById(anchor.id), anchor)
+ }
+ for (let index = 0; index < ordinaryLinkCount; index++) {
+ const anchor = doc.getElementById(`ordinary-item-${index}`)!
+ assert.equal(
+ anchor.getAttribute('href'),
+ `/teams/team-7/items/item-${index}?view=summary`,
+ )
+ assert.equal(anchor.textContent, `Item ${index}`)
+ assert.equal(
+ anchor.getAttribute('data-status'),
+ index === 42 ? 'active' : null,
+ )
+ assert.deepEqual(data.rows[index], {
+ id: `item-${index}`,
+ label: `Item ${index}`,
+ details: { score: index * 3, open: index % 2 === 0 },
+ })
+ }
+ for (let index = 0; index < hashLinkCount; index++) {
+ assert.equal(
+ doc.getElementById(`hash-${index}`)?.getAttribute('data-status'),
+ index % 2 === 0 ? 'active' : null,
+ )
+ }
+ doc
+ .getElementById('interactive')!
+ .dispatchEvent(new dom.window.MouseEvent('click', { bubbles: true }))
+ assert.equal(
+ current.app.snapshot().diagnostics.clicks,
+ result.diagnostics.clicks + 1,
+ )
+ }
+
+ async function after() {
+ const sample = current
+ if (!sample) {
+ return
+ }
+ try {
+ if (!sample.failed) {
+ assert.ok(sample.completed, 'Hydration sample was not completed')
+ validate()
+ }
+ } finally {
+ current = undefined
+ try {
+ sample.app.dispose()
+ // Unmount work and its scheduled effects stay outside the measure.
+ await turn()
+ await turn()
+ } finally {
+ for (const handle of sample.immediates) {
+ clearImmediate(handle)
+ }
+ sample.dom.window.close()
+ }
+ }
+ }
+
+ return {
+ before,
+ run,
+ after,
+ snapshot,
+ // Vitest passes setup to the Tinybench Bench, where it runs once per
+ // warmup/run stage. Install the Task's public per-iteration hooks there.
+ installIterationHooks(task: TaskHooks) {
+ task.opts.beforeEach = before
+ task.opts.afterEach = after
+ },
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/speed.bench.ts b/benchmarks/client-nav/scenarios/hydration/react/speed.bench.ts
new file mode 100644
index 0000000000..6f6142b9de
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/speed.bench.ts
@@ -0,0 +1,23 @@
+import { afterEach, beforeEach, bench, describe } from 'vitest'
+import { setup } from './setup'
+
+describe('client-hydration', () => {
+ const scenario = setup()
+ // CodSpeed uses suite hooks; ordinary Vitest uses the Tinybench Task hooks
+ // installed below. Both prepare and dispose every sample outside timing.
+ beforeEach(scenario.before)
+ afterEach(scenario.after)
+ bench(
+ 'hydrate restored route state and mixed Links (react)',
+ async () => {
+ await scenario.run()
+ },
+ {
+ setup: scenario.installIterationHooks,
+ time: 5000,
+ warmupTime: 1000,
+ warmupIterations: 20,
+ throws: true,
+ },
+ )
+})
diff --git a/benchmarks/client-nav/scenarios/hydration/react/src/app.tsx b/benchmarks/client-nav/scenarios/hydration/react/src/app.tsx
new file mode 100644
index 0000000000..e9797f71fa
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/src/app.tsx
@@ -0,0 +1,216 @@
+import { useEffect } from 'react'
+import {
+ HeadContent,
+ Link,
+ Outlet,
+ Scripts,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+ useHydrated,
+} from '@tanstack/react-router'
+import {
+ clientUrl,
+ hashLinkCount,
+ ordinaryLinkCount,
+ serverUrl,
+} from '../fixture'
+import type { ReactNode } from 'react'
+import type { Diagnostics } from '../fixture'
+
+export function createFixtureRouter(
+ server: boolean,
+ diagnostics: Diagnostics,
+ onHydrated: () => void = () => {},
+) {
+ function beforeLoad() {
+ diagnostics.beforeLoads++
+ if (!server) {
+ throw new Error('Hydration reran beforeLoad instead of restoring context')
+ }
+ }
+
+ function loader() {
+ diagnostics.loaders++
+ if (!server) {
+ throw new Error('Hydration reran a loader instead of restoring data')
+ }
+ }
+
+ const root = createRootRoute({
+ beforeLoad: () => {
+ beforeLoad()
+ return { viewer: { id: 'viewer-3', name: 'Ada', role: 'editor' } }
+ },
+ head: () => ({
+ meta: [{ charSet: 'utf-8' }, { title: 'Hydration benchmark' }],
+ }),
+ shellComponent: Document,
+ })
+ const team = createRoute({
+ getParentRoute: () => root,
+ path: '/teams/$teamId',
+ beforeLoad: ({ context, params }) => {
+ beforeLoad()
+ return { team: { id: params.teamId, member: context.viewer.id } }
+ },
+ loader: ({ context }) => {
+ loader()
+ return {
+ title: `Team ${context.team.id}`,
+ categories: ['open', 'closed'],
+ }
+ },
+ component: Team,
+ })
+ const items = createRoute({
+ getParentRoute: () => team,
+ path: 'items/$itemId',
+ validateSearch: (search: Record) => ({
+ view: search.view === 'details' ? 'details' : 'summary',
+ }),
+ beforeLoad: ({ context }) => {
+ beforeLoad()
+ return { permissions: { edit: context.viewer.role === 'editor' } }
+ },
+ loader: ({ context, params }) => {
+ loader()
+ return {
+ selected: params.itemId,
+ owner: context.team.member,
+ rows: Array.from({ length: ordinaryLinkCount }, (_, index) => ({
+ id: `item-${index}`,
+ label: `Item ${index}`,
+ details: { score: index * 3, open: index % 2 === 0 },
+ })),
+ }
+ },
+ component: Items,
+ })
+
+ function Document({ children }: { children: ReactNode }) {
+ return (
+
+
+
+
+
+ {children}
+
+
+
+ )
+ }
+
+ function Team() {
+ const context = team.useRouteContext()
+ const data = team.useLoaderData()
+ return (
+
+ {data.title}
+ {context.viewer.name}
+
+
+ )
+ }
+
+ function Items() {
+ const data = items.useLoaderData()
+ const context = items.useRouteContext()
+ useEffect(() => {
+ diagnostics.mounted = true
+ }, [])
+ return (
+ <>
+
+ {context.permissions.edit ? 'Editable' : 'Read only'}
+
+ {
+ diagnostics.clicks++
+ }}
+ >
+ Ready
+
+
+
+ {data.rows.map((row) => (
+
+ {row.id}
+ {row.details.score}
+
+
+ {diagnostics.countRenders
+ ? () => {
+ diagnostics.ordinaryRenders++
+ return row.label
+ }
+ : row.label}
+
+
+
+ ))}
+
+
+
+ {Array.from({ length: hashLinkCount }, (_, index) => (
+
+ {diagnostics.countRenders
+ ? () => {
+ diagnostics.hashRenders++
+ return `Section ${index}`
+ }
+ : `Section ${index}`}
+
+ ))}
+
+
+
+ >
+ )
+ }
+
+ function HydrationComplete() {
+ const hydrated = useHydrated()
+ useEffect(() => {
+ if (hydrated) {
+ onHydrated()
+ }
+ }, [hydrated])
+ return null
+ }
+
+ return createRouter({
+ routeTree: root.addChildren([team.addChildren([items])]),
+ history: createMemoryHistory({
+ initialEntries: [server ? serverUrl : clientUrl],
+ }),
+ isServer: server,
+ scrollRestoration: false,
+ defaultHashScrollIntoView: false,
+ defaultPreload: false,
+ })
+}
+
+declare module '@tanstack/react-router' {
+ interface Register {
+ router: ReturnType
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/src/client.tsx b/benchmarks/client-nav/scenarios/hydration/react/src/client.tsx
new file mode 100644
index 0000000000..42c5a5104e
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/src/client.tsx
@@ -0,0 +1,83 @@
+import { startTransition } from 'react'
+import { hydrateRoot } from 'react-dom/client'
+import { RouterProvider } from '@tanstack/react-router'
+import { hydrate } from '@tanstack/react-router/ssr/client'
+import { isServer } from '@tanstack/router-core/isServer'
+import { createDiagnostics, hashLinkCount } from '../fixture'
+import { createFixtureRouter } from './app'
+
+export const serverEnvironment = isServer
+let router: ReturnType | undefined
+let root: ReturnType | undefined
+let diagnostics = createDiagnostics()
+const errors: Array = []
+
+export async function start(countRenders = false) {
+ if (router) {
+ throw new Error('A hydration sample must use a fresh client realm')
+ }
+ if (!window.$_TSR?.router) {
+ throw new Error('Missing SSR hydration payload')
+ }
+ diagnostics = createDiagnostics(countRenders)
+ let resolveHydrated!: () => void
+ let rejectHydrated!: (error: unknown) => void
+ const hydrated = new Promise((resolve, reject) => {
+ resolveHydrated = resolve
+ rejectHydrated = reject
+ })
+ router = createFixtureRouter(false, diagnostics, resolveHydrated)
+ // This is the same restoration path used by Start, without a module-cached
+ // RouterClient/StartClient promise or a live server in the worker.
+ await hydrate(router)
+ window.$_TSR.h()
+ startTransition(() => {
+ root = hydrateRoot(document, , {
+ onRecoverableError: (error) => {
+ errors.push(String(error))
+ rejectHydrated(error)
+ },
+ onUncaughtError: (error) => {
+ errors.push(String(error))
+ rejectHydrated(error)
+ },
+ })
+ })
+ await hydrated
+}
+
+export function ready() {
+ if (!diagnostics.mounted) {
+ return false
+ }
+ // Matching hash Links only become active in the follow-up hydration commit.
+ // Ending at the first mount effect would miss the work this scenario targets.
+ for (let index = 0; index < hashLinkCount; index += 2) {
+ if (
+ document.getElementById(`hash-${index}`)?.getAttribute('data-status') !==
+ 'active'
+ ) {
+ return false
+ }
+ }
+ return true
+}
+
+export function snapshot() {
+ const matches = router?.stores.matches.get()
+ return {
+ diagnostics: { ...diagnostics },
+ errors: [...errors],
+ location: router?.stores.location.get().href,
+ matches: matches?.map((match) => ({
+ status: match.status,
+ context: match.context,
+ loaderData: match.loaderData,
+ })),
+ }
+}
+
+export function dispose() {
+ root?.unmount()
+ router?.history.destroy()
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/src/server.tsx b/benchmarks/client-nav/scenarios/hydration/react/src/server.tsx
new file mode 100644
index 0000000000..713b0a77f2
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/src/server.tsx
@@ -0,0 +1,29 @@
+import {
+ createRequestHandler,
+ defaultStreamHandler,
+} from '@tanstack/react-router/ssr/server'
+import { isServer } from '@tanstack/router-core/isServer'
+import { createDiagnostics, serverUrl } from '../fixture'
+import { createFixtureRouter } from './app'
+
+export async function renderFixture() {
+ if ((isServer as boolean | undefined) !== true) {
+ throw new Error('Fixture generation requires the production server build')
+ }
+ const diagnostics = createDiagnostics()
+ const response = await createRequestHandler({
+ createRouter: () => createFixtureRouter(true, diagnostics),
+ request: new Request(`http://localhost${serverUrl}`),
+ })(defaultStreamHandler)
+ const html = await response.text()
+ if (
+ response.status !== 200 ||
+ diagnostics.beforeLoads !== 3 ||
+ diagnostics.loaders !== 2
+ ) {
+ throw new Error(
+ 'SSR fixture did not execute its beforeLoad and loader functions',
+ )
+ }
+ return html
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/tsconfig.json b/benchmarks/client-nav/scenarios/hydration/react/tsconfig.json
new file mode 100644
index 0000000000..23dd08de8b
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../../../tsconfig.json",
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "react",
+ "allowImportingTsExtensions": true,
+ "types": ["node", "vite/client", "vitest/globals"]
+ },
+ "include": ["./*.ts", "./src/**/*"]
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/react/vite.config.ts b/benchmarks/client-nav/scenarios/hydration/react/vite.config.ts
new file mode 100644
index 0000000000..62ab87115b
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/vite.config.ts
@@ -0,0 +1,36 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vitest/config'
+import react from '@vitejs/plugin-react'
+import codspeedPlugin from '@codspeed/vitest-plugin'
+import { cpuSimulationExecArgv } from '../../../../cpu-simulation'
+
+export default defineConfig({
+ root: fileURLToPath(new URL('.', import.meta.url)),
+ define: { 'process.env.NODE_ENV': JSON.stringify('production') },
+ plugins: [
+ !!(process.env.VITEST && process.env.WITH_INSTRUMENTATION) &&
+ codspeedPlugin(),
+ react(),
+ ],
+ resolve: { conditions: ['browser', 'production'] },
+ build: {
+ outDir: './dist/client',
+ emptyOutDir: true,
+ minify: false,
+ lib: {
+ entry: './src/client.tsx',
+ name: 'HydrationBenchmark',
+ formats: ['iife'],
+ fileName: () => 'client.js',
+ },
+ },
+ test: {
+ execArgv: cpuSimulationExecArgv(),
+ name: '@benchmarks/client-nav hydration (react)',
+ watch: false,
+ environment: 'node',
+ isolate: true,
+ include: ['hydration.test.ts'],
+ benchmark: { include: ['speed.bench.ts'] },
+ },
+})
diff --git a/benchmarks/client-nav/scenarios/hydration/react/vite.server.config.ts b/benchmarks/client-nav/scenarios/hydration/react/vite.server.config.ts
new file mode 100644
index 0000000000..fbf6a149b9
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/react/vite.server.config.ts
@@ -0,0 +1,26 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+
+export default defineConfig({
+ root: fileURLToPath(new URL('.', import.meta.url)),
+ define: { 'process.env.NODE_ENV': JSON.stringify('production') },
+ plugins: [react()],
+ resolve: { conditions: ['node', 'production'] },
+ ssr: { noExternal: true },
+ build: {
+ ssr: true,
+ outDir: './dist/server',
+ emptyOutDir: true,
+ minify: false,
+ lib: {
+ entry: './src/server.tsx',
+ formats: ['es'],
+ fileName: () => 'server.js',
+ },
+ rolldownOptions: {
+ platform: 'node',
+ external: [/^node:/, /^react(?:\/|$)/, /^react-dom(?:\/|$)/],
+ },
+ },
+})
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/fixture.ts b/benchmarks/client-nav/scenarios/hydration/solid/fixture.ts
new file mode 100644
index 0000000000..4c86d0e2f4
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/fixture.ts
@@ -0,0 +1,35 @@
+export {
+ clientUrl,
+ hashLinkCount,
+ ordinaryLinkCount,
+ serverUrl,
+} from '../react/fixture'
+export type { FixtureArtifact } from '../react/fixture'
+
+export interface Diagnostics {
+ beforeLoads: number
+ loaders: number
+ mounted: boolean
+ rendered: number
+ clicks: number
+ countUpdates: boolean
+ ordinaryEvaluations: number
+ hashEvaluations: number
+ initialHashStates: Array
+ hashStates: Array
+}
+
+export function createDiagnostics(countUpdates = false): Diagnostics {
+ return {
+ beforeLoads: 0,
+ loaders: 0,
+ mounted: false,
+ rendered: 0,
+ clicks: 0,
+ countUpdates,
+ ordinaryEvaluations: 0,
+ hashEvaluations: 0,
+ initialHashStates: [],
+ hashStates: [],
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/generate-fixture.mjs b/benchmarks/client-nav/scenarios/hydration/solid/generate-fixture.mjs
new file mode 100644
index 0000000000..63647e1be7
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/generate-fixture.mjs
@@ -0,0 +1,30 @@
+import assert from 'node:assert/strict'
+import { writeFile } from 'node:fs/promises'
+import { JSDOM } from 'jsdom'
+
+if (process.env.NODE_ENV !== 'production') {
+ throw new Error('Generate the hydration fixture in production mode')
+}
+const { renderFixture } = await import('./dist/server/server.js')
+const html = await renderFixture()
+const dom = new JSDOM(html)
+try {
+ const doc = dom.window.document
+ const scriptElements = [...doc.querySelectorAll('script')]
+ assert.ok(scriptElements.length > 0)
+ assert.ok(scriptElements.every((script) => !script.src))
+ const scripts = scriptElements.map((script) => script.textContent)
+ assert.ok(scripts.some((script) => script.includes('$_TSR')))
+ assert.ok(scripts.some((script) => script.includes('_$HY')))
+ assert.ok(doc.documentElement.hasAttribute('data-hk'))
+ assert.ok(doc.getElementById('hydration-content')?.hasAttribute('data-hk'))
+ assert.ok(
+ [...doc.querySelectorAll('a')].every((a) => a.hasAttribute('data-hk')),
+ )
+ await writeFile(
+ new URL('./dist/fixture.json', import.meta.url),
+ JSON.stringify({ html, scripts }),
+ )
+} finally {
+ dom.window.close()
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/hydration.test.ts b/benchmarks/client-nav/scenarios/hydration/solid/hydration.test.ts
new file mode 100644
index 0000000000..ca519d98bb
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/hydration.test.ts
@@ -0,0 +1,85 @@
+import { expect, test } from 'vitest'
+import { hashLinkCount, ordinaryLinkCount } from './fixture'
+import { setup } from './setup'
+
+const turn = () => new Promise((resolve) => setImmediate(resolve))
+
+test('restores fresh DOMs and route state and completes hash-link reactivity', async () => {
+ const scenario = setup({ countUpdates: true })
+ let previous: ReturnType | undefined
+ for (let iteration = 0; iteration < 3; iteration++) {
+ await scenario.before()
+ try {
+ const initial = scenario.snapshot()
+ expect(initial.matches).toBeUndefined()
+ expect(initial.diagnostics.mounted).toBe(false)
+ expect(initial.diagnostics.rendered).toBe(0)
+ expect(initial.diagnostics.clicks).toBe(0)
+ expect(initial.diagnostics.ordinaryEvaluations).toBe(0)
+ expect(initial.diagnostics.hashEvaluations).toBe(0)
+ expect(initial.diagnostics.initialHashStates).toEqual([])
+ await scenario.run()
+ const completed = scenario.snapshot()
+ expect(completed.diagnostics.ordinaryEvaluations).toBeGreaterThanOrEqual(
+ ordinaryLinkCount,
+ )
+ expect(completed.diagnostics.initialHashStates).toEqual(
+ Array.from({ length: hashLinkCount }, () => false),
+ )
+ expect(completed.diagnostics.hashStates).toEqual(
+ Array.from({ length: hashLinkCount }, (_, index) => index % 2 === 0),
+ )
+ expect(completed.diagnostics.hashEvaluations).toBeGreaterThanOrEqual(
+ hashLinkCount + hashLinkCount / 2,
+ )
+ expect(completed.hydrating).toBe(false)
+ for (let index = 0; index < 4; index++) {
+ await turn()
+ }
+ expect(scenario.snapshot()).toEqual(completed)
+ if (previous) {
+ expect(completed).toEqual(previous)
+ }
+ previous = completed
+ await expect(scenario.run()).rejects.toThrow('newly prepared sample')
+ } finally {
+ // Untimed assertions include DOM identity, all restored data/context,
+ // native event handling, and the absence of hydration diagnostics.
+ await scenario.after()
+ }
+ }
+})
+
+test('installs per-iteration preparation for the ordinary Vitest runner', async () => {
+ const scenario = setup()
+ const task: Parameters[0] = {
+ opts: {},
+ }
+ scenario.installIterationHooks(task)
+ for (let iteration = 0; iteration < 2; iteration++) {
+ await task.opts.beforeEach!()
+ try {
+ expect(scenario.snapshot().diagnostics.mounted).toBe(false)
+ expect(scenario.snapshot().diagnostics.clicks).toBe(0)
+ await scenario.run()
+ expect(scenario.snapshot().diagnostics.hashEvaluations).toBe(0)
+ } finally {
+ await task.opts.afterEach!()
+ }
+ }
+})
+
+test('rejects an empty measurement and still releases its sample', async () => {
+ const scenario = setup()
+ await scenario.before()
+ await expect(scenario.after()).rejects.toThrow(
+ 'Hydration sample was not completed',
+ )
+ await scenario.before()
+ try {
+ await expect(scenario.before()).rejects.toThrow('was not disposed')
+ await scenario.run()
+ } finally {
+ await scenario.after()
+ }
+})
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/project.json b/benchmarks/client-nav/scenarios/hydration/solid/project.json
new file mode 100644
index 0000000000..978fdc6bf7
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/project.json
@@ -0,0 +1,40 @@
+{
+ "name": "@benchmarks/client-nav-hydration-solid",
+ "projectType": "application",
+ "targets": {
+ "build:client": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": [
+ { "projects": ["@tanstack/solid-router"], "target": "build" }
+ ],
+ "options": {
+ "command": "NODE_ENV=production vite build --config {projectRoot}/vite.server.config.ts && NODE_ENV=production node {projectRoot}/generate-fixture.mjs && NODE_ENV=production vite build --config {projectRoot}/vite.config.ts"
+ }
+ },
+ "test:unit": {
+ "executor": "nx:run-commands",
+ "dependsOn": ["build:client"],
+ "options": {
+ "command": "vitest run --config ./scenarios/hydration/solid/vite.config.ts",
+ "cwd": "benchmarks/client-nav"
+ }
+ },
+ "test:perf": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": ["build:client"],
+ "options": {
+ "command": "NODE_ENV=production vitest bench --run --config ./scenarios/hydration/solid/vite.config.ts",
+ "cwd": "benchmarks/client-nav"
+ }
+ },
+ "test:types:client": {
+ "executor": "nx:run-commands",
+ "dependsOn": [
+ { "projects": ["@tanstack/solid-router"], "target": "build" }
+ ],
+ "options": { "command": "tsc -p {projectRoot}/tsconfig.json --noEmit" }
+ }
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/setup.ts b/benchmarks/client-nav/scenarios/hydration/solid/setup.ts
new file mode 100644
index 0000000000..29a86d6743
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/setup.ts
@@ -0,0 +1,339 @@
+import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
+import { fileURLToPath } from 'node:url'
+import { Script } from 'node:vm'
+import { JSDOM, VirtualConsole } from 'jsdom'
+import { clientUrl, hashLinkCount, ordinaryLinkCount } from './fixture'
+import type { FixtureArtifact } from './fixture'
+import type * as Client from './src/client'
+
+type ClientApp = typeof Client
+type TaskHooks = {
+ opts: {
+ beforeEach?: () => void | Promise
+ afterEach?: () => void | Promise
+ }
+}
+
+const turn = () => new Promise((resolve) => setImmediate(resolve))
+const maxSettleTurns = 100
+
+export function setup({ countUpdates = false } = {}) {
+ // Compile once, outside measurement; evaluate the entire production bundle
+ // anew in every window, including Solid's module-level hydration state.
+ const artifact: FixtureArtifact = JSON.parse(
+ readFileSync(new URL('./dist/fixture.json', import.meta.url), 'utf8'),
+ )
+ const clientPath = new URL('./dist/client/client.js', import.meta.url)
+ const clientScript = new Script(readFileSync(clientPath, 'utf8'), {
+ filename: fileURLToPath(clientPath),
+ })
+ const bootstrapScripts = artifact.scripts.map(
+ (source, index) =>
+ new Script(source, {
+ filename: `solid-hydration-bootstrap-${index}.js`,
+ }),
+ )
+ let current: Awaited> | undefined
+
+ async function prepare() {
+ const errors: Array = []
+ const virtualConsole = new VirtualConsole()
+ virtualConsole.on('jsdomError', (error) => errors.push(String(error)))
+ for (const event of ['error', 'warn'] as const) {
+ virtualConsole.on(event, (...args) =>
+ errors.push(args.map(String).join(' ')),
+ )
+ }
+ const dom = new JSDOM(artifact.html, {
+ url: `http://localhost${clientUrl}`,
+ runScripts: 'outside-only',
+ virtualConsole,
+ })
+ const immediates = new Set()
+ try {
+ Object.assign(dom.window, {
+ TextEncoder,
+ TextDecoder,
+ ReadableStream,
+ WritableStream,
+ TransformStream,
+ setImmediate(
+ callback: (...args: Array) => void,
+ ...args: Array
+ ) {
+ const handle = setImmediate(() => {
+ immediates.delete(handle)
+ callback(...args)
+ })
+ immediates.add(handle)
+ return handle
+ },
+ clearImmediate(handle: NodeJS.Immediate) {
+ immediates.delete(handle)
+ clearImmediate(handle)
+ },
+ fetch() {
+ throw new Error('Hydration attempted a network request')
+ },
+ scrollTo() {},
+ })
+ dom.window.addEventListener('unhandledrejection', (event) => {
+ errors.push(String(event.reason))
+ })
+ dom.window.HTMLElement.prototype.scrollIntoView = () => {}
+ const context = dom.getInternalVMContext()
+ clientScript.runInContext(context)
+ const app = (dom.window as unknown as { HydrationBenchmark: ClientApp })
+ .HydrationBenchmark
+ assert.equal(app.serverEnvironment, false)
+ assert.equal(app.solidServerEnvironment, false)
+ const doc = dom.window.document
+ const anchors = Array.from(doc.querySelectorAll('a'))
+ const scriptElements = Array.from(doc.querySelectorAll('script'))
+ assert.equal(scriptElements.length, bootstrapScripts.length)
+ const executingScript = { current: null as HTMLScriptElement | null }
+ Object.defineProperty(doc, 'currentScript', {
+ configurable: true,
+ get: () => executingScript.current,
+ })
+ assert.equal(anchors.length, ordinaryLinkCount + hashLinkCount)
+ const content = doc.getElementById('hydration-content')
+ assert.ok(content)
+ assert.ok(content.hasAttribute('data-hk'))
+ assert.ok(anchors.every((anchor) => anchor.hasAttribute('data-hk')))
+ for (let index = 0; index < hashLinkCount; index++) {
+ assert.equal(
+ doc.getElementById(`hash-${index}`)?.getAttribute('data-status'),
+ null,
+ )
+ }
+ // Production Solid can fall back to templates for missing hydration keys.
+ // Retain every workload element, not only the parent and the anchors.
+ const elements = Array.from(content.querySelectorAll('*'))
+ const documentElement = doc.documentElement
+ await turn()
+ assert.equal(doc.readyState, 'complete')
+ assert.equal(app.ready(), false)
+ assert.deepEqual(errors, [])
+ return {
+ dom,
+ context,
+ app,
+ anchors,
+ content,
+ elements,
+ documentElement,
+ scriptElements,
+ executingScript,
+ immediates,
+ errors,
+ started: false,
+ completed: false,
+ failed: false,
+ }
+ } catch (error) {
+ for (const handle of immediates) {
+ clearImmediate(handle)
+ }
+ dom.window.close()
+ throw error
+ }
+ }
+
+ async function before() {
+ if (current) {
+ throw new Error('Previous hydration sample was not disposed')
+ }
+ current = await prepare()
+ }
+
+ async function run() {
+ const sample = current
+ if (!sample || sample.started) {
+ throw new Error('Hydration requires a newly prepared sample')
+ }
+ sample.started = true
+ try {
+ // Parsing/evaluation are done. Execute both native Solid bootstrap and
+ // Router payload, then create/restore the router and hydrate the DOM.
+ for (let index = 0; index < bootstrapScripts.length; index++) {
+ // Router scripts remove document.currentScript. Keep the original
+ // script nodes and order, including Solid's bootstrap and markers.
+ sample.executingScript.current = sample.scriptElements[index]!
+ try {
+ bootstrapScripts[index]!.runInContext(sample.context)
+ } finally {
+ sample.executingScript.current = null
+ }
+ }
+ await sample.app.start(countUpdates)
+ let idleTurns = 0
+ for (let index = 0; index < maxSettleTurns; index++) {
+ await turn()
+ if (sample.errors.length) {
+ throw new Error(sample.errors.join('\n'))
+ }
+ if (sample.app.ready() && sample.immediates.size === 0) {
+ if (++idleTurns === 2) {
+ sample.completed = true
+ return
+ }
+ } else {
+ idleTurns = 0
+ }
+ }
+ throw new Error(
+ `Hydration did not settle: ${JSON.stringify(sample.app.snapshot())}`,
+ )
+ } catch (error) {
+ sample.failed = true
+ throw error
+ }
+ }
+
+ function snapshot() {
+ if (!current) {
+ throw new Error('No hydration sample')
+ }
+ // Normalize realm prototypes only for untimed assertions.
+ return JSON.parse(JSON.stringify(current.app.snapshot())) as ReturnType<
+ ClientApp['snapshot']
+ >
+ }
+
+ function validate() {
+ assert.ok(current?.started)
+ const { dom, anchors, content, elements, documentElement, errors } = current
+ const doc = dom.window.document
+ const result = snapshot()
+ assert.deepEqual(errors, [])
+ assert.equal(result.diagnostics.beforeLoads, 0)
+ assert.equal(result.diagnostics.loaders, 0)
+ assert.equal(result.diagnostics.mounted, true)
+ assert.ok(result.diagnostics.rendered > 0)
+ assert.equal(result.hydrating, false)
+ assert.equal(result.location, clientUrl)
+ assert.equal(result.resolvedLocation, clientUrl)
+ assert.equal(result.matches?.length, 3)
+ for (const match of result.matches) {
+ assert.equal(match.status, 'success')
+ assert.deepEqual(match.context.viewer, {
+ id: 'viewer-3',
+ name: 'Ada',
+ role: 'editor',
+ })
+ }
+ const teamContext = { id: 'team-7', member: 'viewer-3' }
+ assert.deepEqual(result.matches[1]!.context.team, teamContext)
+ assert.deepEqual(result.matches[2]!.context.team, teamContext)
+ assert.deepEqual(result.matches[2]!.context.permissions, { edit: true })
+ assert.deepEqual(result.matches[1]!.loaderData, {
+ title: 'Team team-7',
+ categories: ['open', 'closed'],
+ })
+ const data = result.matches[2]!.loaderData as {
+ owner: string
+ selected: string
+ rows: Array<{
+ id: string
+ label: string
+ details: { score: number; open: boolean }
+ }>
+ }
+ assert.equal(data.owner, 'viewer-3')
+ assert.equal(data.selected, 'item-42')
+ assert.equal(data.rows.length, ordinaryLinkCount)
+ assert.equal(doc.documentElement, documentElement)
+ assert.equal(doc.getElementById('hydration-content'), content)
+ const hydratedElements = Array.from(content.querySelectorAll('*'))
+ assert.equal(hydratedElements.length, elements.length)
+ elements.forEach((element, index) => {
+ assert.equal(hydratedElements[index], element)
+ })
+ assert.equal(doc.querySelectorAll('a').length, anchors.length)
+ assert.equal(doc.title, 'Hydration benchmark')
+ assert.equal(content.querySelector('h1')?.textContent, 'Team team-7')
+ assert.equal(doc.getElementById('viewer')?.textContent, 'Ada')
+ assert.equal(doc.getElementById('permission')?.textContent, 'Editable')
+ for (const anchor of anchors) {
+ assert.equal(doc.getElementById(anchor.id), anchor)
+ }
+ for (let index = 0; index < ordinaryLinkCount; index++) {
+ const anchor = doc.getElementById(`ordinary-item-${index}`)!
+ assert.equal(
+ anchor.getAttribute('href'),
+ `/teams/team-7/items/item-${index}?view=summary`,
+ )
+ assert.equal(anchor.textContent, `Item ${index}`)
+ assert.equal(
+ anchor.getAttribute('data-status'),
+ index === 42 ? 'active' : null,
+ )
+ assert.deepEqual(data.rows[index], {
+ id: `item-${index}`,
+ label: `Item ${index}`,
+ details: { score: index * 3, open: index % 2 === 0 },
+ })
+ }
+ for (let index = 0; index < hashLinkCount; index++) {
+ const anchor = doc.getElementById(`hash-${index}`)!
+ assert.equal(
+ anchor.getAttribute('data-status'),
+ index % 2 === 0 ? 'active' : null,
+ )
+ assert.equal(
+ anchor.getAttribute('href'),
+ `/teams/team-7/items/item-42?view=summary#${index % 2 === 0 ? 'details' : 'other'}`,
+ )
+ assert.equal(anchor.textContent, `Section ${index}`)
+ }
+ assert.equal(result.diagnostics.clicks, 0)
+ doc
+ .getElementById('interactive')!
+ .dispatchEvent(new dom.window.MouseEvent('click', { bubbles: true }))
+ assert.equal(current.app.snapshot().diagnostics.clicks, 1)
+ assert.deepEqual(errors, [])
+ }
+
+ async function after() {
+ const sample = current
+ if (!sample) {
+ return
+ }
+ try {
+ if (!sample.failed) {
+ assert.ok(sample.completed, 'Hydration sample was not completed')
+ validate()
+ }
+ } finally {
+ current = undefined
+ try {
+ sample.app.dispose()
+ await turn()
+ await turn()
+ if (!sample.failed) {
+ assert.deepEqual(sample.errors, [])
+ }
+ } finally {
+ for (const handle of sample.immediates) {
+ clearImmediate(handle)
+ }
+ sample.dom.window.close()
+ }
+ }
+ }
+
+ return {
+ before,
+ run,
+ after,
+ snapshot,
+ // Vitest's Bench setup runs once per warmup/run stage. Install Tinybench's
+ // public Task hooks to prepare and dispose outside every measured call.
+ installIterationHooks(task: TaskHooks) {
+ task.opts.beforeEach = before
+ task.opts.afterEach = after
+ },
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/hydration/solid/speed.bench.ts
new file mode 100644
index 0000000000..1f91ec00f3
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/speed.bench.ts
@@ -0,0 +1,23 @@
+import { afterEach, beforeEach, bench, describe } from 'vitest'
+import { setup } from './setup'
+
+describe('client-hydration', () => {
+ const scenario = setup()
+ // CodSpeed uses suite hooks; ordinary Vitest uses the Tinybench Task hooks
+ // installed below. Both prepare and dispose every sample outside timing.
+ beforeEach(scenario.before)
+ afterEach(scenario.after)
+ bench(
+ 'hydrate restored route state and mixed Links (solid)',
+ async () => {
+ await scenario.run()
+ },
+ {
+ setup: scenario.installIterationHooks,
+ time: 5000,
+ warmupTime: 1000,
+ warmupIterations: 20,
+ throws: true,
+ },
+ )
+})
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/src/app.tsx b/benchmarks/client-nav/scenarios/hydration/solid/src/app.tsx
new file mode 100644
index 0000000000..cb772d6b5b
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/src/app.tsx
@@ -0,0 +1,213 @@
+import { For, onMount } from 'solid-js'
+import { HydrationScript } from 'solid-js/web'
+import {
+ HeadContent,
+ Link,
+ Outlet,
+ Scripts,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+} from '@tanstack/solid-router'
+import {
+ clientUrl,
+ hashLinkCount,
+ ordinaryLinkCount,
+ serverUrl,
+} from '../fixture'
+import type { JSX } from 'solid-js'
+import type { Diagnostics } from '../fixture'
+
+export function createFixtureRouter(server: boolean, diagnostics: Diagnostics) {
+ function beforeLoad() {
+ diagnostics.beforeLoads++
+ if (!server) {
+ throw new Error('Hydration reran beforeLoad instead of restoring context')
+ }
+ }
+
+ function loader() {
+ diagnostics.loaders++
+ if (!server) {
+ throw new Error('Hydration reran a loader instead of restoring data')
+ }
+ }
+
+ const root = createRootRoute({
+ beforeLoad: () => {
+ beforeLoad()
+ return { viewer: { id: 'viewer-3', name: 'Ada', role: 'editor' } }
+ },
+ head: () => ({
+ meta: [{ charset: 'utf-8' }, { title: 'Hydration benchmark' }],
+ }),
+ shellComponent: Document,
+ })
+ const team = createRoute({
+ getParentRoute: () => root,
+ path: '/teams/$teamId',
+ beforeLoad: ({ context, params }) => {
+ beforeLoad()
+ return { team: { id: params.teamId, member: context.viewer.id } }
+ },
+ loader: ({ context }) => {
+ loader()
+ return {
+ title: `Team ${context.team.id}`,
+ categories: ['open', 'closed'],
+ }
+ },
+ component: Team,
+ })
+ const items = createRoute({
+ getParentRoute: () => team,
+ path: 'items/$itemId',
+ validateSearch: (search: Record) => ({
+ view: search.view === 'details' ? 'details' : 'summary',
+ }),
+ beforeLoad: ({ context }) => {
+ beforeLoad()
+ return { permissions: { edit: context.viewer.role === 'editor' } }
+ },
+ loader: ({ context, params }) => {
+ loader()
+ return {
+ selected: params.itemId,
+ owner: context.team.member,
+ rows: Array.from({ length: ordinaryLinkCount }, (_, index) => ({
+ id: `item-${index}`,
+ label: `Item ${index}`,
+ details: { score: index * 3, open: index % 2 === 0 },
+ })),
+ }
+ },
+ component: Items,
+ })
+
+ function Document(props: { children: JSX.Element }) {
+ return (
+
+
+
+
+
+
+ {props.children}
+
+
+
+ )
+ }
+
+ function Team() {
+ const context = team.useRouteContext()
+ const data = team.useLoaderData()
+ return (
+
+ {data().title}
+ {context().viewer.name}
+
+
+ )
+ }
+
+ function Items() {
+ const data = items.useLoaderData()
+ const context = items.useRouteContext()
+ onMount(() => {
+ diagnostics.mounted = true
+ })
+ return (
+ <>
+
+ {context().permissions.edit ? 'Editable' : 'Read only'}
+
+ {
+ diagnostics.clicks++
+ }}
+ >
+ Ready
+
+
+
+
+ {(row) => (
+
+ {row.id}
+ {row.details.score}
+
+
+ {diagnostics.countUpdates
+ ? (state) => {
+ // Read the getter so this unit-only probe observes
+ // Link reactivity, rather than component execution.
+ void state.isActive
+ diagnostics.ordinaryEvaluations++
+ return row.label
+ }
+ : row.label}
+
+
+
+ )}
+
+
+
+
+ index)}
+ >
+ {(index) => (
+
+ {diagnostics.countUpdates
+ ? (state) => {
+ const active = state.isActive
+ diagnostics.hashEvaluations++
+ diagnostics.initialHashStates[index] ??= active
+ diagnostics.hashStates[index] = active
+ return `Section ${index}`
+ }
+ : `Section ${index}`}
+
+ )}
+
+
+
+ >
+ )
+ }
+
+ return createRouter({
+ routeTree: root.addChildren([team.addChildren([items])]),
+ history: createMemoryHistory({
+ initialEntries: [server ? serverUrl : clientUrl],
+ }),
+ isServer: server,
+ scrollRestoration: false,
+ defaultHashScrollIntoView: false,
+ defaultPreload: false,
+ })
+}
+
+declare module '@tanstack/solid-router' {
+ interface Register {
+ router: ReturnType
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/src/client.tsx b/benchmarks/client-nav/scenarios/hydration/solid/src/client.tsx
new file mode 100644
index 0000000000..ef0f5268d6
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/src/client.tsx
@@ -0,0 +1,91 @@
+import { sharedConfig } from 'solid-js'
+import { hydrate as hydrateDOM, isServer as solidIsServer } from 'solid-js/web'
+import { RouterProvider } from '@tanstack/solid-router'
+import { hydrate } from '@tanstack/router-core/ssr/client'
+import { isServer } from '@tanstack/router-core/isServer'
+import { createDiagnostics, hashLinkCount } from '../fixture'
+import { createFixtureRouter } from './app'
+
+export const serverEnvironment = isServer
+export const solidServerEnvironment = solidIsServer
+let router: ReturnType | undefined
+let disposeRoot: (() => void) | undefined
+let unsubscribe: (() => void) | undefined
+let diagnostics = createDiagnostics()
+
+type HydrationWindow = Window & {
+ _$HY?: { done?: boolean; events?: Array; r: object }
+}
+
+export async function start(countUpdates = false) {
+ if (router) {
+ throw new Error('A hydration sample must use a fresh client realm')
+ }
+ if (!window.$_TSR?.router) {
+ throw new Error('Missing SSR hydration payload')
+ }
+ const bootstrap = (window as HydrationWindow)._$HY
+ if (!bootstrap || bootstrap.done || sharedConfig.context) {
+ throw new Error('Missing or already consumed Solid hydration bootstrap')
+ }
+ diagnostics = createDiagnostics(countUpdates)
+ router = createFixtureRouter(false, diagnostics)
+ unsubscribe = router.subscribe('onRendered', () => {
+ diagnostics.rendered++
+ })
+ // Solid's RouterClient uses this core restoration API. Await it directly so
+ // the shell has the same component/key hierarchy as the server provider.
+ await hydrate(router)
+ window.$_TSR.h()
+ disposeRoot = hydrateDOM(() => , document)
+}
+
+export function ready() {
+ if (
+ !diagnostics.mounted ||
+ !diagnostics.rendered ||
+ sharedConfig.context ||
+ router?.stores.status.get() === 'pending'
+ ) {
+ return false
+ }
+ // Each Link's onMount updates its hydration signal. Solid updates attributes
+ // through fine-grained effects, without rerendering the route components.
+ for (let index = 0; index < hashLinkCount; index++) {
+ const anchor = document.getElementById(`hash-${index}`)
+ if (
+ !anchor ||
+ anchor.getAttribute('data-status') !== (index % 2 === 0 ? 'active' : null)
+ ) {
+ return false
+ }
+ }
+ return true
+}
+
+export function snapshot() {
+ return {
+ diagnostics: {
+ ...diagnostics,
+ initialHashStates: [...diagnostics.initialHashStates],
+ hashStates: [...diagnostics.hashStates],
+ },
+ hydrating: !!sharedConfig.context,
+ location: router?.stores.location.get().href,
+ resolvedLocation: router?.stores.resolvedLocation.get()?.href,
+ matches: router?.stores.matches.get().map((match) => ({
+ status: match.status,
+ context: match.context,
+ loaderData: match.loaderData,
+ })),
+ }
+}
+
+export function dispose() {
+ try {
+ disposeRoot?.()
+ } finally {
+ unsubscribe?.()
+ router?.history.destroy()
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/src/server.tsx b/benchmarks/client-nav/scenarios/hydration/solid/src/server.tsx
new file mode 100644
index 0000000000..6052c48eac
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/src/server.tsx
@@ -0,0 +1,40 @@
+import { RouterProvider } from '@tanstack/solid-router'
+import {
+ createRequestHandler,
+ renderRouterToStream,
+} from '@tanstack/solid-router/ssr/server'
+import { isServer } from '@tanstack/router-core/isServer'
+import { isServer as solidIsServer } from 'solid-js/web'
+import { createDiagnostics, serverUrl } from '../fixture'
+import { createFixtureRouter } from './app'
+
+export async function renderFixture() {
+ if ((isServer as boolean | undefined) !== true || !solidIsServer) {
+ throw new Error('Fixture generation requires the production server build')
+ }
+ const diagnostics = createDiagnostics()
+ const response = await createRequestHandler({
+ createRouter: () => createFixtureRouter(true, diagnostics),
+ request: new Request(`http://localhost${serverUrl}`),
+ })(({ request, router, responseHeaders }) =>
+ renderRouterToStream({
+ request,
+ router,
+ responseHeaders,
+ // The route shell owns the document, as in Solid Start. Using the same
+ // provider tree on both sides preserves Solid's hydration key sequence.
+ children: () => ,
+ }),
+ )
+ const html = await response.text()
+ if (
+ response.status !== 200 ||
+ diagnostics.beforeLoads !== 3 ||
+ diagnostics.loaders !== 2
+ ) {
+ throw new Error(
+ 'SSR fixture did not execute its beforeLoad and loader functions',
+ )
+ }
+ return html
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/tsconfig.json b/benchmarks/client-nav/scenarios/hydration/solid/tsconfig.json
new file mode 100644
index 0000000000..daf27ddf12
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../../../tsconfig.json",
+ "compilerOptions": {
+ "jsx": "preserve",
+ "jsxImportSource": "solid-js",
+ "allowImportingTsExtensions": true,
+ "types": ["node", "vite/client", "vitest/globals"]
+ },
+ "include": ["./*.ts", "./src/**/*"]
+}
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/vite.config.ts b/benchmarks/client-nav/scenarios/hydration/solid/vite.config.ts
new file mode 100644
index 0000000000..16e5ff95aa
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/vite.config.ts
@@ -0,0 +1,38 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vitest/config'
+import solid from 'vite-plugin-solid'
+import codspeedPlugin from '@codspeed/vitest-plugin'
+import { cpuSimulationExecArgv } from '../../../../cpu-simulation'
+
+export default defineConfig({
+ root: fileURLToPath(new URL('.', import.meta.url)),
+ define: { 'process.env.NODE_ENV': JSON.stringify('production') },
+ plugins: [
+ !!(process.env.VITEST && process.env.WITH_INSTRUMENTATION) &&
+ codspeedPlugin(),
+ // The Node worker evaluates the prebuilt bundle and needs no JSX transform
+ // or browser test setup injected by vite-plugin-solid.
+ !process.env.VITEST && solid({ ssr: true, hot: false, dev: false }),
+ ],
+ resolve: { conditions: ['solid', 'browser', 'production'] },
+ build: {
+ outDir: './dist/client',
+ emptyOutDir: true,
+ minify: false,
+ lib: {
+ entry: './src/client.tsx',
+ name: 'HydrationBenchmark',
+ formats: ['iife'],
+ fileName: () => 'client.js',
+ },
+ },
+ test: {
+ execArgv: cpuSimulationExecArgv(),
+ name: '@benchmarks/client-nav hydration (solid)',
+ watch: false,
+ environment: 'node',
+ isolate: true,
+ include: ['hydration.test.ts'],
+ benchmark: { include: ['speed.bench.ts'] },
+ },
+})
diff --git a/benchmarks/client-nav/scenarios/hydration/solid/vite.server.config.ts b/benchmarks/client-nav/scenarios/hydration/solid/vite.server.config.ts
new file mode 100644
index 0000000000..9787cbb4e2
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/hydration/solid/vite.server.config.ts
@@ -0,0 +1,29 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vite'
+import solid from 'vite-plugin-solid'
+
+export default defineConfig({
+ root: fileURLToPath(new URL('.', import.meta.url)),
+ define: { 'process.env.NODE_ENV': JSON.stringify('production') },
+ plugins: [solid({ ssr: true, hot: false, dev: false })],
+ resolve: { conditions: ['solid', 'node', 'production'] },
+ ssr: {
+ noExternal: true,
+ resolve: { conditions: ['solid', 'node', 'production'] },
+ },
+ build: {
+ ssr: true,
+ outDir: './dist/server',
+ emptyOutDir: true,
+ minify: false,
+ lib: {
+ entry: './src/server.tsx',
+ formats: ['es'],
+ fileName: () => 'server.js',
+ },
+ rolldownOptions: {
+ platform: 'node',
+ external: [/^node:/],
+ },
+ },
+})
From 763ac8b8add670ccb31887dab6509343e4827d5a Mon Sep 17 00:00:00 2001
From: Cyril Strone <77802640+CyrilStrone@users.noreply.github.com>
Date: Sat, 26 Sep 2026 18:45:54 +0700
Subject: [PATCH 014/127] test(react-router): regression for #2072 router
context invalidation (#8499)
* test(react-router): add invalidate context regression for #2072
* cover auth logout/login via RouterProvider context with router.invalidate();
* assert beforeLoad observes fresh context in the same event handler.
* test(react-router): drive #2072 login redirect via beforeLoad
* assert invalidating the active /login match triggers the guard redirect;
* drop the explicit router.navigate that bypassed invalidation.
* test(react-router): tighten auth invalidation assertions
* test(react-router): clarify login invalidation comment
* test(react-router): assert auth observations without redundant waits
---------
Co-authored-by: Sheraff
---
.../issue-2072-context-invalidate.test.tsx | 157 ++++++++++++++++++
1 file changed, 157 insertions(+)
create mode 100644 packages/react-router/tests/issue-2072-context-invalidate.test.tsx
diff --git a/packages/react-router/tests/issue-2072-context-invalidate.test.tsx b/packages/react-router/tests/issue-2072-context-invalidate.test.tsx
new file mode 100644
index 0000000000..41b2c11608
--- /dev/null
+++ b/packages/react-router/tests/issue-2072-context-invalidate.test.tsx
@@ -0,0 +1,157 @@
+import * as React from 'react'
+import { cleanup, fireEvent, render, screen } from '@testing-library/react'
+import { afterEach, expect, test } from 'vitest'
+import {
+ RouterProvider,
+ createMemoryHistory,
+ createRootRouteWithContext,
+ createRoute,
+ createRouter,
+ redirect,
+} from '../src'
+
+afterEach(cleanup)
+
+// https://github.com/TanStack/router/issues/2072
+// Router context updates supplied through `RouterProvider` must be observable
+// by `beforeLoad` on the very next `router.invalidate()` call, even when the
+// context state and `invalidate()` change in the same event handler.
+test('#2072: logout invalidates the router with the fresh auth context', async () => {
+ const seen: Array = []
+ const rootRoute = createRootRouteWithContext<{
+ auth: { isAuthenticated: boolean }
+ }>()()
+ const loginRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/login',
+ beforeLoad: ({ context }) => {
+ if (context.auth.isAuthenticated) {
+ throw redirect({ to: '/private' })
+ }
+ },
+ component: () => Login page
,
+ })
+ const authenticatedRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ id: '_authenticated',
+ beforeLoad: ({ context }) => {
+ seen.push(context.auth.isAuthenticated)
+ if (!context.auth.isAuthenticated) {
+ throw redirect({ to: '/login' })
+ }
+ },
+ })
+ const privateRoute = createRoute({
+ getParentRoute: () => authenticatedRoute,
+ path: '/private',
+ component: () => Private page
,
+ })
+ const router = createRouter({
+ routeTree: rootRoute.addChildren([
+ loginRoute,
+ authenticatedRoute.addChildren([privateRoute]),
+ ]),
+ history: createMemoryHistory({ initialEntries: ['/private'] }),
+ context: { auth: { isAuthenticated: true } },
+ })
+
+ function App() {
+ const [isAuthenticated, setIsAuthenticated] = React.useState(true)
+ return (
+ <>
+ {
+ setIsAuthenticated(false)
+ router.invalidate()
+ }}
+ >
+ Logout
+
+
+ >
+ )
+ }
+
+ render( )
+ expect(await screen.findByText('Private page')).toBeInTheDocument()
+ expect(seen).toEqual([true])
+
+ fireEvent.click(screen.getByRole('button', { name: 'Logout' }))
+
+ expect(await screen.findByText('Login page')).toBeInTheDocument()
+ expect(seen).toEqual([true, false])
+})
+
+// The inverse transition: becoming authenticated must let the login route's
+// `beforeLoad` observe the new context and redirect to the private route.
+test('#2072: login invalidates the router with the fresh auth context', async () => {
+ const seen: Array = []
+ const rootRoute = createRootRouteWithContext<{
+ auth: { isAuthenticated: boolean }
+ }>()()
+ const loginRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/login',
+ beforeLoad: ({ context }) => {
+ if (context.auth.isAuthenticated) {
+ throw redirect({ to: '/private' })
+ }
+ },
+ component: () => Login page
,
+ })
+ const authenticatedRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ id: '_authenticated',
+ beforeLoad: ({ context }) => {
+ seen.push(context.auth.isAuthenticated)
+ if (!context.auth.isAuthenticated) {
+ throw redirect({ to: '/login' })
+ }
+ },
+ })
+ const privateRoute = createRoute({
+ getParentRoute: () => authenticatedRoute,
+ path: '/private',
+ component: () => Private page
,
+ })
+ const router = createRouter({
+ routeTree: rootRoute.addChildren([
+ loginRoute,
+ authenticatedRoute.addChildren([privateRoute]),
+ ]),
+ history: createMemoryHistory({ initialEntries: ['/login'] }),
+ context: { auth: { isAuthenticated: false } },
+ })
+
+ function App() {
+ const [isAuthenticated, setIsAuthenticated] = React.useState(false)
+ return (
+ <>
+ {
+ setIsAuthenticated(true)
+ router.invalidate()
+ }}
+ >
+ Login
+
+
+ >
+ )
+ }
+
+ render( )
+ expect(await screen.findByText('Login page')).toBeInTheDocument()
+ expect(seen).toEqual([])
+
+ fireEvent.click(screen.getByRole('button', { name: 'Login' }))
+
+ expect(await screen.findByText('Private page')).toBeInTheDocument()
+ expect(seen).toEqual([true])
+})
From 0b377c2e5bc73f024140bf697f7f890e8a9bbfdc Mon Sep 17 00:00:00 2001
From: Flo
Date: Sat, 26 Sep 2026 19:11:42 +0200
Subject: [PATCH 015/127] test: stabilize scroll regression page readiness
(#8507)
test: wait for rendered pages in scroll race regression
---
.../tests/issue-7040.repro.spec.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/tests/issue-7040.repro.spec.ts b/e2e/react-router/scroll-restoration-sandbox-vite/tests/issue-7040.repro.spec.ts
index 9fb0742292..2db25517c8 100644
--- a/e2e/react-router/scroll-restoration-sandbox-vite/tests/issue-7040.repro.spec.ts
+++ b/e2e/react-router/scroll-restoration-sandbox-vite/tests/issue-7040.repro.spec.ts
@@ -1,5 +1,5 @@
import { expect } from '@playwright/test'
-import { apiTest as test } from '@tanstack/router-e2e-utils'
+import { test } from '@tanstack/router-e2e-utils'
import type { Page } from '@playwright/test'
import { toRuntimePath } from '@tanstack/router-e2e-utils'
@@ -27,7 +27,7 @@ type ReproAttempt = {
async function openFreshSourcePage(page: Page) {
await page.goto(toRuntimePath('/issue-7040-source'))
- await page.waitForLoadState('networkidle')
+ await expect(page.getByTestId('issue-7040-source-top')).toBeVisible()
await page.evaluate(() => {
sessionStorage.clear()
@@ -35,7 +35,7 @@ async function openFreshSourcePage(page: Page) {
})
await page.reload()
- await page.waitForLoadState('networkidle')
+ await expect(page.getByTestId('issue-7040-source-top')).toBeVisible()
}
async function fastScrollSourcePage(page: Page) {
@@ -97,7 +97,7 @@ async function clickTargetLinkImmediatelyAfterScroll(page: Page) {
async function waitForTargetPageToSettle(page: Page) {
await page.waitForURL('**/issue-7040-target')
- await page.waitForLoadState('networkidle')
+ await expect(page.getByTestId('issue-7040-target-top')).toBeVisible()
await page.waitForFunction(() => window.scrollY === 0)
}
From 1e113034bdeccf696e6658d0b886439deb023bfd Mon Sep 17 00:00:00 2001
From: Flo
Date: Sat, 26 Sep 2026 19:31:18 +0200
Subject: [PATCH 016/127] test: expand compiler correctness coverage (#8506)
test: port compiler correctness coverage from Yuku migration
---
.../router-generator/tests/transform.test.ts | 13 ++
.../tests/code-splitter-jsx.test.ts | 66 +++++++
.../tests/code-splitter-runtime.test.ts | 161 ++++++++++++++++++
.../react/1-default/shared-runtime.tsx | 23 +++
.../1-default/shared-runtime@component.tsx | 23 +++
.../shared-runtime@errorComponent.tsx | 11 ++
.../shared-runtime@notFoundComponent.tsx | 11 ++
.../react/1-default/shared-runtime@shared.tsx | 28 +++
.../shared-runtime.tsx | 22 +++
...--notFoundComponent---pendingComponent.tsx | 23 +++
.../shared-runtime@loader.tsx | 16 ++
.../shared-runtime@shared.tsx | 28 +++
.../shared-runtime.tsx | 22 +++
...--notFoundComponent---pendingComponent.tsx | 28 +++
.../shared-runtime@errorComponent.tsx | 11 ++
.../shared-runtime@shared.tsx | 28 +++
.../test-files/react/shared-runtime.tsx | 50 ++++++
.../tests/router-plugin-context.test.ts | 138 +++++++++++++++
.../start-plugin-core/tests/compiler.test.ts | 124 ++++++++++++++
.../tests/hydrate-when-transform.test.ts | 88 ++++++++++
.../tests/hydrateWhen/hydrateWhen.test.ts | 58 +++++++
.../importProtection/analysis.exports.test.ts | 14 ++
.../importProtection/analysis.usage.test.ts | 37 +++-
23 files changed, 1022 insertions(+), 1 deletion(-)
create mode 100644 packages/router-plugin/tests/code-splitter-jsx.test.ts
create mode 100644 packages/router-plugin/tests/code-splitter-runtime.test.ts
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@component.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@errorComponent.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@notFoundComponent.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@shared.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@component---errorComponent---notFoundComponent---pendingComponent.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@loader.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@shared.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@component---loader---notFoundComponent---pendingComponent.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@errorComponent.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@shared.tsx
create mode 100644 packages/router-plugin/tests/code-splitter/test-files/react/shared-runtime.tsx
diff --git a/packages/router-generator/tests/transform.test.ts b/packages/router-generator/tests/transform.test.ts
index 8a53f3278e..f026ecc30e 100644
--- a/packages/router-generator/tests/transform.test.ts
+++ b/packages/router-generator/tests/transform.test.ts
@@ -14,6 +14,19 @@ function makeNode(
}
describe('transform', () => {
+ it('updates parenthesized route calls without changing their surrounding source', () => {
+ const result = transform({
+ source:
+ "import { createFileRoute } from '@tanstack/react-router'; export const Route = ((createFileRoute('/old'))({}));",
+ ctx: { target: 'react', routeId: '/new', lazy: false },
+ node: makeNode(),
+ })
+ expect(result.result).toBe('modified')
+ if (result.result === 'modified') {
+ expect(result.output).toContain("((createFileRoute('/new'))({}))")
+ }
+ })
+
it('does not treat root route exports as missing Route exports', async () => {
const result = await transform({
source: [
diff --git a/packages/router-plugin/tests/code-splitter-jsx.test.ts b/packages/router-plugin/tests/code-splitter-jsx.test.ts
new file mode 100644
index 0000000000..0718a5da2a
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter-jsx.test.ts
@@ -0,0 +1,66 @@
+import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises'
+import path from 'node:path'
+import { createServer } from 'vite'
+import { expect, it } from 'vitest'
+import { tanstackRouter } from '../src/vite'
+
+it.each(['Widget', '_Widget', '$Widget'])(
+ 'preserves the shared JSX component %s across separate loader and component chunks',
+ async (name) => {
+ // Keep the temporary app inside the package so runtime imports resolve.
+ const root = await mkdtemp(path.join(__dirname, '.jsx-reference-'))
+ let server: Awaited> | undefined
+ try {
+ await mkdir(path.join(root, 'routes'))
+ await writeFile(
+ path.join(root, 'routes/__root.tsx'),
+ `import { createRootRoute } from '@tanstack/react-router'
+export const Route = createRootRoute({})`,
+ )
+ await writeFile(
+ path.join(root, 'routes/widget.tsx'),
+ `import React from 'react'
+import { createFileRoute } from '@tanstack/react-router'
+const ${name} = () => 'hello'
+export const Route = createFileRoute('/widget')({
+ loader: () => ${name},
+ component: () => <${name} />,
+})`,
+ )
+ server = await createServer({
+ root,
+ configFile: false,
+ logLevel: 'silent',
+ server: { watch: null },
+ plugins: [
+ tanstackRouter({
+ target: 'react',
+ routesDirectory: './routes',
+ generatedRouteTree: './routeTree.gen.ts',
+ autoCodeSplitting: true,
+ codeSplittingOptions: {
+ addHmr: false,
+ defaultBehavior: [['loader'], ['component']],
+ },
+ }),
+ ],
+ })
+ // The physical module establishes shared ownership before chunks load.
+ await server.ssrLoadModule('/routes/widget.tsx')
+ const componentModule = await server.ssrLoadModule(
+ '/routes/widget.tsx?tsr-split=component',
+ )
+ const loaderModule = await server.ssrLoadModule(
+ '/routes/widget.tsx?tsr-split=loader',
+ )
+ const element = componentModule.component()
+ expect(typeof element.type).toBe('function')
+ expect(element.type()).toBe('hello')
+ expect(loaderModule.loader()()).toBe('hello')
+ } finally {
+ await server?.close()
+ await rm(root, { recursive: true, force: true })
+ }
+ },
+ 30_000,
+)
diff --git a/packages/router-plugin/tests/code-splitter-runtime.test.ts b/packages/router-plugin/tests/code-splitter-runtime.test.ts
new file mode 100644
index 0000000000..0eb9b52ea5
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter-runtime.test.ts
@@ -0,0 +1,161 @@
+import { execFile } from 'node:child_process'
+import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
+import path from 'node:path'
+import { promisify } from 'node:util'
+import { pathToFileURL } from 'node:url'
+import { build } from 'vite'
+import { expect, it } from 'vitest'
+import { tanstackRouter } from '../src/vite'
+import type { CodeSplitGroupings } from '../src/core/constants'
+
+const runNode = promisify(execFile)
+const fixture = path.resolve(
+ __dirname,
+ 'code-splitter/test-files/react/shared-runtime.tsx',
+)
+
+const groupings: Array<{ name: string; groupings: CodeSplitGroupings }> = [
+ { name: 'eager loader', groupings: [['component']] },
+ { name: 'separate lazy loader', groupings: [['component'], ['loader']] },
+ { name: 'combined lazy loader', groupings: [['component', 'loader']] },
+]
+
+it.each(groupings)(
+ 'preserves executable route contracts with $name',
+ assertRuntimeContracts,
+ 30_000,
+)
+
+// Shared extraction currently duplicates named default function declarations and
+// drops TypeScript enum/namespace dependencies. Keep their intended contracts.
+it.fails.each(['named-default', 'enum', 'namespace'] as const)(
+ 'preserves executable route contracts with shared %s declarations',
+ async (syntax) => {
+ await assertRuntimeContracts({
+ groupings: [['component'], ['loader']],
+ syntax,
+ })
+ },
+ 30_000,
+)
+
+async function assertRuntimeContracts({
+ groupings,
+ syntax,
+}: {
+ groupings: CodeSplitGroupings
+ syntax?: 'named-default' | 'enum' | 'namespace'
+}) {
+ // Keep the temporary app inside the package so real runtime imports resolve.
+ const root = await mkdtemp(path.join(__dirname, '.runtime-contract-'))
+ try {
+ await mkdir(path.join(root, 'routes'))
+ let source = await readFile(fixture, 'utf8')
+ if (syntax === 'named-default') {
+ source = source
+ .replace(
+ 'function createSeed()',
+ 'export default function createSeed()',
+ )
+ .replace('export default createSeed', '')
+ } else if (syntax === 'enum') {
+ source = source.replace(
+ 'const Count = { Initial: 0 }',
+ 'enum Count { Initial = 0 }',
+ )
+ } else if (syntax === 'namespace') {
+ source = source.replace(
+ "const Labels = { component: 'count' }",
+ "namespace Labels { export const component = 'count' }",
+ )
+ }
+ await writeFile(path.join(root, 'routes/shared-runtime.tsx'), source)
+ await writeFile(
+ path.join(root, 'routes/__root.tsx'),
+ `import { createRootRoute } from '@tanstack/react-router'
+export const Route = createRootRoute({})`,
+ )
+ await writeFile(
+ path.join(root, 'entry.ts'),
+ `import { createElement } from 'react'
+import { renderToString } from 'react-dom/server'
+import { Route } from './routes/shared-runtime'
+export { Route, firstState, secondState, 'odd-name' } from './routes/shared-runtime'
+export function render() {
+ return renderToString(createElement(Route.options.component))
+}`,
+ )
+
+ await build({
+ root,
+ configFile: false,
+ logLevel: 'silent',
+ plugins: [
+ tanstackRouter({
+ target: 'react',
+ routesDirectory: './routes',
+ generatedRouteTree: './routeTree.gen.ts',
+ autoCodeSplitting: true,
+ codeSplittingOptions: {
+ addHmr: false,
+ defaultBehavior: groupings,
+ },
+ }),
+ ],
+ build: {
+ ssr: path.join(root, 'entry.ts'),
+ outDir: 'dist',
+ minify: false,
+ sourcemap: true,
+ rollupOptions: {
+ output: {
+ entryFileNames: 'entry.mjs',
+ chunkFileNames: '[name].mjs',
+ },
+ },
+ },
+ })
+
+ const throwLine =
+ source.split('\n').findIndex((line) => line.includes('throw new Error')) +
+ 1
+ const entryUrl = pathToFileURL(path.join(root, 'dist/entry.mjs')).href
+ const combined = groupings.some(
+ (group) => group.includes('component') && group.includes('loader'),
+ )
+ const { stdout } = await runNode(process.execPath, [
+ '--enable-source-maps',
+ '--input-type=module',
+ '--eval',
+ `import assert from 'node:assert/strict'
+const messages = []
+console.log = (message) => messages.push(message)
+const { Route, render, firstState, secondState, 'odd-name': oddState } = await import(${JSON.stringify(entryUrl)})
+assert.deepEqual(messages, ['shared-runtime:seed', 'shared-runtime:state', 'shared-runtime:reference'])
+const state = Route.options.beforeLoad({})
+assert.strictEqual(firstState, state)
+assert.strictEqual(secondState, state)
+assert.strictEqual(oddState, state)
+assert.equal(state.count, 0)
+assert.strictEqual(await Route.options.loader({}), state)
+assert.equal(state.count, 1)
+assert.deepEqual(messages, ${JSON.stringify(combined ? ['shared-runtime:seed', 'shared-runtime:state', 'shared-runtime:reference', 'shared-runtime:component'] : ['shared-runtime:seed', 'shared-runtime:state', 'shared-runtime:reference'])})
+await Route.options.component.preload()
+assert.equal(render(), 'count:1')
+assert.strictEqual(await Route.options.loader({}), state)
+assert.equal(render(), 'count:2')
+await Route.options.component.preload()
+assert.deepEqual(messages, ['shared-runtime:seed', 'shared-runtime:state', 'shared-runtime:reference', 'shared-runtime:component'])
+await Route.options.loader({})
+assert.throws(render, (error) => {
+ assert.equal(error.message, 'route source-map contract')
+ assert.match(error.stack, /shared-runtime\\.tsx(?:\\?[^\\n:]+)?:${throwLine}:/)
+ return true
+})
+process.stdout.write('route contracts passed')`,
+ ])
+ expect(stdout).toBe('route contracts passed')
+ } finally {
+ await rm(root, { recursive: true, force: true })
+ }
+}
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime.tsx
new file mode 100644
index 0000000000..c230b4d37f
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime.tsx
@@ -0,0 +1,23 @@
+import { state, createState, createSeed, increment } from "shared-runtime.tsx?tsr-shared=1";
+const $$splitComponentImporter = () => import('shared-runtime.tsx?tsr-split=component');
+import { lazyRouteComponent } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+console.log('shared-runtime:reference');
+export const Route = createFileRoute('/shared-runtime')({
+ beforeLoad: () => state,
+ loader: () => {
+ increment();
+ return state;
+ },
+ component: lazyRouteComponent($$splitComponentImporter, 'component')
+});
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@component.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@component.tsx
new file mode 100644
index 0000000000..fbccf6c90b
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@component.tsx
@@ -0,0 +1,23 @@
+import { state, createState, createSeed, Labels } from "shared-runtime.tsx?tsr-shared=1";
+const label = createComponentLabel();
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+function createComponentLabel() {
+ console.log('shared-runtime:component');
+ return Labels.component;
+}
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
+const SplitComponent = () => {
+ if (state.count === 3) {
+ throw new Error('route source-map contract');
+ }
+ return `${label}:${state.count}`;
+};
+export { SplitComponent as component };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@errorComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@errorComponent.tsx
new file mode 100644
index 0000000000..d890a562c9
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@errorComponent.tsx
@@ -0,0 +1,11 @@
+import { state, createState, createSeed } from "shared-runtime.tsx?tsr-shared=1";
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@notFoundComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@notFoundComponent.tsx
new file mode 100644
index 0000000000..d890a562c9
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@notFoundComponent.tsx
@@ -0,0 +1,11 @@
+import { state, createState, createSeed } from "shared-runtime.tsx?tsr-shared=1";
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@shared.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@shared.tsx
new file mode 100644
index 0000000000..54239b6cc5
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/shared-runtime@shared.tsx
@@ -0,0 +1,28 @@
+const Count = {
+ Initial: 0
+};
+const Labels = {
+ component: 'count'
+};
+const seed = createSeed();
+const {
+ state,
+ increment
+} = createState(seed);
+function createSeed() {
+ console.log('shared-runtime:seed');
+ return {
+ count: Count.Initial,
+ label: Labels.component
+ };
+}
+function createState(initialState: {
+ count: number;
+}) {
+ console.log('shared-runtime:state');
+ return {
+ state: initialState,
+ increment: () => initialState.count++
+ };
+}
+export { Count, createSeed, createState, increment, Labels, seed, state };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime.tsx
new file mode 100644
index 0000000000..bceb12d39a
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime.tsx
@@ -0,0 +1,22 @@
+import { state, createState, createSeed } from "shared-runtime.tsx?tsr-shared=1";
+const $$splitComponentImporter = () => import('shared-runtime.tsx?tsr-split=component---errorComponent---notFoundComponent---pendingComponent');
+import { lazyRouteComponent } from '@tanstack/react-router';
+const $$splitLoaderImporter = () => import('shared-runtime.tsx?tsr-split=loader');
+import { lazyFn } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+console.log('shared-runtime:reference');
+export const Route = createFileRoute('/shared-runtime')({
+ beforeLoad: () => state,
+ loader: lazyFn($$splitLoaderImporter, 'loader'),
+ component: lazyRouteComponent($$splitComponentImporter, 'component')
+});
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@component---errorComponent---notFoundComponent---pendingComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@component---errorComponent---notFoundComponent---pendingComponent.tsx
new file mode 100644
index 0000000000..fbccf6c90b
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@component---errorComponent---notFoundComponent---pendingComponent.tsx
@@ -0,0 +1,23 @@
+import { state, createState, createSeed, Labels } from "shared-runtime.tsx?tsr-shared=1";
+const label = createComponentLabel();
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+function createComponentLabel() {
+ console.log('shared-runtime:component');
+ return Labels.component;
+}
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
+const SplitComponent = () => {
+ if (state.count === 3) {
+ throw new Error('route source-map contract');
+ }
+ return `${label}:${state.count}`;
+};
+export { SplitComponent as component };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@loader.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@loader.tsx
new file mode 100644
index 0000000000..6c797c0226
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@loader.tsx
@@ -0,0 +1,16 @@
+import { state, createState, createSeed, increment } from "shared-runtime.tsx?tsr-shared=1";
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
+const SplitLoader = () => {
+ increment();
+ return state;
+};
+export { SplitLoader as loader };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@shared.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@shared.tsx
new file mode 100644
index 0000000000..54239b6cc5
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/shared-runtime@shared.tsx
@@ -0,0 +1,28 @@
+const Count = {
+ Initial: 0
+};
+const Labels = {
+ component: 'count'
+};
+const seed = createSeed();
+const {
+ state,
+ increment
+} = createState(seed);
+function createSeed() {
+ console.log('shared-runtime:seed');
+ return {
+ count: Count.Initial,
+ label: Labels.component
+ };
+}
+function createState(initialState: {
+ count: number;
+}) {
+ console.log('shared-runtime:state');
+ return {
+ state: initialState,
+ increment: () => initialState.count++
+ };
+}
+export { Count, createSeed, createState, increment, Labels, seed, state };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime.tsx
new file mode 100644
index 0000000000..d88eff9d9b
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime.tsx
@@ -0,0 +1,22 @@
+import { state, createState, createSeed } from "shared-runtime.tsx?tsr-shared=1";
+const $$splitComponentImporter = () => import('shared-runtime.tsx?tsr-split=component---loader---notFoundComponent---pendingComponent');
+import { lazyRouteComponent } from '@tanstack/react-router';
+const $$splitLoaderImporter = () => import('shared-runtime.tsx?tsr-split=component---loader---notFoundComponent---pendingComponent');
+import { lazyFn } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+console.log('shared-runtime:reference');
+export const Route = createFileRoute('/shared-runtime')({
+ beforeLoad: () => state,
+ loader: lazyFn($$splitLoaderImporter, 'loader'),
+ component: lazyRouteComponent($$splitComponentImporter, 'component')
+});
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@component---loader---notFoundComponent---pendingComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@component---loader---notFoundComponent---pendingComponent.tsx
new file mode 100644
index 0000000000..0af87c21c5
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@component---loader---notFoundComponent---pendingComponent.tsx
@@ -0,0 +1,28 @@
+import { state, createState, createSeed, Labels, increment } from "shared-runtime.tsx?tsr-shared=1";
+const label = createComponentLabel();
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+function createComponentLabel() {
+ console.log('shared-runtime:component');
+ return Labels.component;
+}
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
+const SplitLoader = () => {
+ increment();
+ return state;
+};
+export { SplitLoader as loader };
+const SplitComponent = () => {
+ if (state.count === 3) {
+ throw new Error('route source-map contract');
+ }
+ return `${label}:${state.count}`;
+};
+export { SplitComponent as component };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@errorComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@errorComponent.tsx
new file mode 100644
index 0000000000..d890a562c9
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@errorComponent.tsx
@@ -0,0 +1,11 @@
+import { state, createState, createSeed } from "shared-runtime.tsx?tsr-shared=1";
+function createState(initialState: {
+ count: number;
+}): {
+ state: {
+ count: number;
+ };
+ increment: () => number;
+};
+export { state as firstState, state as secondState, state as 'odd-name' };
+export default createSeed;
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@shared.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@shared.tsx
new file mode 100644
index 0000000000..54239b6cc5
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/shared-runtime@shared.tsx
@@ -0,0 +1,28 @@
+const Count = {
+ Initial: 0
+};
+const Labels = {
+ component: 'count'
+};
+const seed = createSeed();
+const {
+ state,
+ increment
+} = createState(seed);
+function createSeed() {
+ console.log('shared-runtime:seed');
+ return {
+ count: Count.Initial,
+ label: Labels.component
+ };
+}
+function createState(initialState: {
+ count: number;
+}) {
+ console.log('shared-runtime:state');
+ return {
+ state: initialState,
+ increment: () => initialState.count++
+ };
+}
+export { Count, createSeed, createState, increment, Labels, seed, state };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/test-files/react/shared-runtime.tsx b/packages/router-plugin/tests/code-splitter/test-files/react/shared-runtime.tsx
new file mode 100644
index 0000000000..f9fd708a0b
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/test-files/react/shared-runtime.tsx
@@ -0,0 +1,50 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+const Count = { Initial: 0 }
+
+const Labels = { component: 'count' }
+
+const seed = createSeed()
+const { state, increment } = createState(seed)
+const label = createComponentLabel()
+console.log('shared-runtime:reference')
+
+export const Route = createFileRoute('/shared-runtime')({
+ beforeLoad: () => state,
+ loader: () => {
+ increment()
+ return state
+ },
+ component: () => {
+ if (state.count === 3) {
+ throw new Error('route source-map contract')
+ }
+ return `${label}:${state.count}`
+ },
+})
+
+function createSeed() {
+ console.log('shared-runtime:seed')
+ return { count: Count.Initial, label: Labels.component }
+}
+
+function createState(initialState: { count: number }): {
+ state: { count: number }
+ increment: () => number
+}
+function createState(initialState: { count: number }) {
+ console.log('shared-runtime:state')
+ return {
+ state: initialState,
+ increment: () => initialState.count++,
+ }
+}
+
+function createComponentLabel() {
+ console.log('shared-runtime:component')
+ return Labels.component
+}
+
+export { state as firstState, state as secondState, state as 'odd-name' }
+
+export default createSeed
diff --git a/packages/router-plugin/tests/router-plugin-context.test.ts b/packages/router-plugin/tests/router-plugin-context.test.ts
index b8e317c8ec..d3fb0563e6 100644
--- a/packages/router-plugin/tests/router-plugin-context.test.ts
+++ b/packages/router-plugin/tests/router-plugin-context.test.ts
@@ -90,6 +90,144 @@ function countProgramHotDeclarations(code: string) {
}
describe('router plugin context', () => {
+ it('splits parenthesized route factories, option values, and grouping arrays', async () => {
+ const routeFile = normalizePath(
+ path.join(process.cwd(), 'src/routes/wrapped.tsx'),
+ )
+ const context = createRouterPluginContext()
+ context.routesByFile.set(routeFile, { routeId: '/wrapped' })
+ const plugins = createRouterCodeSplitterPlugin(
+ {
+ target: 'react',
+ autoCodeSplitting: true,
+ codeSplittingOptions: { addHmr: false },
+ },
+ context,
+ )
+ await configurePlugin(getReferencePlugin(plugins), 'build')
+ const code = `import { createFileRoute } from '@tanstack/react-router'
+const Component = () => 'wrapped component'
+const loader = () => 'wrapped loader'
+export const Route = (createFileRoute('/wrapped'))({
+ component: (Component), loader: (loader),
+ codeSplitGroupings: (([(['component']), (['loader'])])),
+})`
+ const reference = getCode(
+ await transformReferenceRoute(
+ getReferencePlugin(plugins),
+ code,
+ routeFile,
+ ),
+ )
+ expect(reference).toContain('lazyRouteComponent')
+ expect(reference).toContain('lazyFn')
+ const virtual = getCode(
+ await transformReferenceRoute(
+ getCodeSplitterPlugin(plugins, virtualPluginName),
+ code,
+ `${routeFile}?tsr-split=component`,
+ ),
+ )
+ expect(virtual).toContain('wrapped component')
+ expect(virtual).not.toContain('wrapped loader')
+ })
+
+ it('refreshes chunk ownership after source changes and isolates split settings', async () => {
+ const routeFile = normalizePath(
+ path.join(process.cwd(), 'src/routes/changing.tsx'),
+ )
+ const source = (name: string, value: string) => `
+import { createFileRoute } from '@tanstack/react-router'
+const ${name} = { value: ${JSON.stringify(value)} }
+export const Route = createFileRoute('/changing')({
+ loader: () => ${name},
+ component: () => ${name}.value,
+})`
+ const setup = async (combined: boolean) => {
+ const context = createRouterPluginContext()
+ context.routesByFile.set(routeFile, { routeId: '/changing' })
+ const plugins = createRouterCodeSplitterPlugin(
+ {
+ target: 'react',
+ autoCodeSplitting: true,
+ codeSplittingOptions: {
+ addHmr: false,
+ defaultBehavior: combined
+ ? [['component', 'loader']]
+ : [['component'], ['loader']],
+ },
+ },
+ context,
+ )
+ await configurePlugin(getReferencePlugin(plugins), 'build')
+ return async (code: string) => {
+ const reference = getCode(
+ await transformReferenceRoute(
+ getReferencePlugin(plugins),
+ code,
+ routeFile,
+ ),
+ )!
+ const virtual = getCode(
+ await transformReferenceRoute(
+ getCodeSplitterPlugin(plugins, virtualPluginName),
+ code,
+ `${routeFile}?tsr-split=${combined ? 'component---loader' : 'component'}`,
+ ),
+ )!
+ const shared = getCode(
+ await transformReferenceRoute(
+ getCodeSplitterPlugin(
+ plugins,
+ 'tanstack-router:code-splitter:compile-shared-file',
+ ),
+ code,
+ `${routeFile}?tsr-shared=1`,
+ ),
+ )!
+ return { reference, virtual, shared }
+ }
+ }
+ const separate = await setup(false)
+ const combined = await setup(true)
+ const first = await separate(source('firstState', 'first version'))
+ expect(first.reference).toContain('tsr-split=component')
+ const virtualImports = parseAst({
+ code: first.virtual,
+ }).program.body.filter((statement) => t.isImportDeclaration(statement))
+ expect(virtualImports).toEqual(
+ expect.arrayContaining([
+ expect.objectContaining({
+ source: expect.objectContaining({
+ value: expect.stringContaining('tsr-shared'),
+ }),
+ specifiers: expect.arrayContaining([
+ expect.objectContaining({
+ type: 'ImportSpecifier',
+ imported: expect.objectContaining({ name: 'firstState' }),
+ local: expect.objectContaining({ name: 'firstState' }),
+ }),
+ ]),
+ }),
+ ]),
+ )
+ expect(first.shared).toContain('first version')
+
+ const second = await separate(source('secondState', 'second version'))
+ for (const output of Object.values(second)) {
+ expect(output).not.toContain('firstState')
+ }
+ expect(second.virtual).toContain('secondState')
+ expect(second.shared).toContain('second version')
+ const together = await combined(source('secondState', 'second version'))
+ expect(together.reference).not.toContain('tsr-shared')
+ expect(together.virtual).toContain('second version')
+ expect(together.virtual).not.toContain('tsr-shared')
+ expect(await separate(source('secondState', 'second version'))).toEqual(
+ second,
+ )
+ })
+
it.each([
{ mode: 'production', production: true },
{ mode: 'development with addHmr disabled', production: false },
diff --git a/packages/start-plugin-core/tests/compiler.test.ts b/packages/start-plugin-core/tests/compiler.test.ts
index 94780d140b..c3ea245fac 100644
--- a/packages/start-plugin-core/tests/compiler.test.ts
+++ b/packages/start-plugin-core/tests/compiler.test.ts
@@ -515,6 +515,35 @@ describe('compiler handles external import transforms', () => {
})
describe('server function provider module directives', () => {
+ test.each([
+ 'export const Route = { component: Page }',
+ 'export function Route() { return Page() }',
+ 'export default function Route() { return Page() }',
+ ])(
+ 'removes browser-only dependencies of stripped exports: %s',
+ async (route) => {
+ const compiler = createFullCompiler('server')
+ const result = await compiler.compile({
+ code: `
+ import { createServerFn } from '@tanstack/react-start'
+ export const getMessage = createServerFn().handler(() => 'server message')
+ const browserState = { window }
+ function Page() { return browserState }
+ ${route}
+ `,
+ id: '/test/src/routes/message.tsx?tss-serverfn-split',
+ })
+
+ expect(result).not.toBeNull()
+ expect(result!.code).toContain('server message')
+ expect(result!.code).toContain('createServerRpc')
+ expect(result!.code).not.toContain('window')
+ expect(result!.code).not.toContain('browserState')
+ expect(result!.code).not.toContain('Page')
+ expect(result!.code).not.toContain('Route')
+ },
+ )
+
const code = `
import { createServerFn } from '@tanstack/react-start'
@@ -1266,3 +1295,98 @@ describe('re-export chain resolution', () => {
expect(updatedResult!.code).not.toContain('server-only-value')
})
})
+
+test('leaves unrelated SSR middleware chains to the bundler when a server function factory is present', async () => {
+ const compiler = new StartCompiler({
+ ...getDefaultTestOptions('server'),
+ env: 'server',
+ mode: 'build',
+ lookupKinds: getLookupKindsForEnv('server'),
+ lookupConfigurations: getLookupConfigurationsForEnv('server', 'react'),
+ getKnownServerFns: () => ({}),
+ resolveId: async () => {
+ throw new Error(
+ 'SSR host has no package import conditions for this unrelated binding',
+ )
+ },
+ loadModule: async () => {
+ throw new Error('Unexpected compiler dependency load')
+ },
+ })
+ const code = `import { createMiddleware, createServerFn } from '@tanstack/react-start';
+const middleware = createMiddleware({ type: 'function' }).server(({ next }) => next({ context: { role: 'admin' } }));
+export const factory = createServerFn().middleware([middleware]);`
+ await expect(
+ compiler.compile({
+ id: '/test/auth-wrapper.ts',
+ code,
+ detectedKinds: detectKindsInCode(code, 'server'),
+ }),
+ ).resolves.toBeNull()
+})
+
+test.each([
+ `(createServerOnlyFn)(() => 'server-value')`,
+ `(createIsomorphicFn)().server(() => 'server-value').client(() => 'client-value')`,
+ `(createIsomorphicFn().server(() => 'server-value')).client(() => 'client-value')`,
+])(
+ 'compiles transparent parentheses around native call chains: %s',
+ async (expression) => {
+ const compiler = createFullCompiler('server')
+ const result = await compiler.compile({
+ id: '/test/parenthesized.ts',
+ code: `import { createServerOnlyFn, createIsomorphicFn } from '@tanstack/react-start'; export const fn = ${expression}`,
+ })
+
+ expect(result).not.toBeNull()
+ const evaluate = new Function(
+ `${result!.code.replace(/^import .+;$/gm, '').replace(/\bexport (?=const)/g, '')}\nreturn fn`,
+ )
+ expect(evaluate()()).toBe('server-value')
+ },
+)
+
+test('compiles a server function through a parenthesized namespace receiver', async () => {
+ const compiler = createFullCompiler('client')
+ const result = await compiler.compile({
+ id: '/test/namespace-parenthesized.ts',
+ code: `import * as Start from '@tanstack/react-start'; export const fn = (Start).createServerFn().handler(() => 'private-server-body')`,
+ })
+ expect(result).not.toBeNull()
+ expect(result!.code).not.toContain('private-server-body')
+ expect(result!.code).toContain('createClientRpc')
+})
+
+// The compiler currently mistakes the local parameter for the namespace import.
+// Keep the intended behavior executable until binding resolution is corrected.
+test.fails(
+ 'preserves a shadowed parenthesized namespace receiver',
+ async () => {
+ const compiler = createFullCompiler('client')
+ const code = `import * as Start from '@tanstack/react-start'; export function fn(Start) { return (Start).createServerFn().handler(() => 'local-runtime-body') }`
+ const result = await compiler.compile({
+ id: '/test/shadowed-namespace.ts',
+ code,
+ })
+ const output = result?.code ?? code
+ expect(output).toContain('local-runtime-body')
+ expect(output).not.toContain('createClientRpc')
+ },
+)
+
+test.each([
+ `(Start).createServerOnlyFn(() => 'private-server-body')`,
+ `(Start).createIsomorphicFn().server(() => 'private-server-body').client(() => 'client-value')`,
+ `(Start).createMiddleware().server(() => 'private-server-body')`,
+])(
+ 'removes server-only code through a parenthesized namespace: %s',
+ async (expression) => {
+ const compiler = createFullCompiler('client')
+ const result = await compiler.compile({
+ id: '/test/namespace-builtins.ts',
+ code: `import * as Start from '@tanstack/react-start'; export const fn = ${expression}`,
+ })
+ expect(result).not.toBeNull()
+ expect(result!.code).not.toContain('private-server-body')
+ },
+)
diff --git a/packages/start-plugin-core/tests/hydrate-when-transform.test.ts b/packages/start-plugin-core/tests/hydrate-when-transform.test.ts
index 13e1d909bd..442482bd86 100644
--- a/packages/start-plugin-core/tests/hydrate-when-transform.test.ts
+++ b/packages/start-plugin-core/tests/hydrate-when-transform.test.ts
@@ -117,6 +117,94 @@ function loadVirtualHydrateModule(options: {
}
describe('Hydrate compiler transform', () => {
+ test.each(['client', 'server'] as const)(
+ 'resolves spread props declared after their containing function in %s output',
+ (env) => {
+ const result = compileHydrate({
+ code: `import { Hydrate } from '@tanstack/react-start'
+export function Page() { return child
}
+const props = { when: true, fallback: server-fallback
}`,
+ id,
+ root,
+ env,
+ })
+ expect(result).not.toBeNull()
+ expect(result?.code).toContain('when: true')
+ if (env === 'client') {
+ expect(result?.code).not.toContain('.preload')
+ expect(result?.code).toContain('server-fallback')
+ } else {
+ expect(result?.code).not.toContain('server-fallback')
+ }
+ },
+ )
+
+ test.each(['client', 'server'] as const)(
+ 'respects parenthesized split={false} in %s output',
+ (env) => {
+ const result = compileHydrate({
+ code: `import { Hydrate } from '@tanstack/react-start'; export function Page() { return {() => child
} }`,
+ id,
+ root,
+ env,
+ })
+ expect(result).toBeNull()
+ },
+ )
+
+ test.each(['{...({ fallback: server-fallback
})}', '{...(props)}'])(
+ 'strips fallback from a parenthesized spread %s',
+ (spread) => {
+ const result = compileHydrate({
+ code: `import { Hydrate } from '@tanstack/react-start'; ${spread.includes('props') ? 'const props = ({ fallback: server-fallback
});' : ''} export function Page() { return child
}`,
+ id,
+ root,
+ env: 'server',
+ })
+ expect(result).not.toBeNull()
+ expect(result?.code).not.toContain('server-fallback')
+ },
+ )
+
+ test('strips a statically computed fallback property from server output', () => {
+ const result = compileHydrate({
+ code: `import { Hydrate } from '@tanstack/react-start'; export function Page() { return server-fallback }}>child
}`,
+ id,
+ root,
+ env: 'server',
+ })
+ expect(result).not.toBeNull()
+ expect(result?.code).not.toContain('server-fallback')
+ })
+
+ test.each(['{...({ when: true })}', '{...(props)}'])(
+ 'avoids generating a preload callback for known props %s',
+ (spread) => {
+ const result = compileHydrate({
+ code: `import { Hydrate } from '@tanstack/react-start'; const props = ({ when: true }); export function Page() { return child
}`,
+ id,
+ root,
+ env: 'client',
+ })
+ expect(result).not.toBeNull()
+ expect(result?.code).not.toContain('.preload')
+ },
+ )
+
+ test.each([
+ ['{(() => child
)}', /function-as-children/],
+ ['{(useThing)()}', /hooks/],
+ ])('rejects parenthesized unsafe extraction %s', (child, message) => {
+ expect(() =>
+ compileHydrate({
+ code: `import { Hydrate } from '@tanstack/react-start'; export function Page() { return ${child} }`,
+ id,
+ root,
+ env: 'client',
+ }),
+ ).toThrow(message)
+ })
+
test('splits Hydrate children behind a lazy import', () => {
const result = compileHydrate({
code: `
diff --git a/packages/start-plugin-core/tests/hydrateWhen/hydrateWhen.test.ts b/packages/start-plugin-core/tests/hydrateWhen/hydrateWhen.test.ts
index 9e393a93c7..a027fac505 100644
--- a/packages/start-plugin-core/tests/hydrateWhen/hydrateWhen.test.ts
+++ b/packages/start-plugin-core/tests/hydrateWhen/hydrateWhen.test.ts
@@ -1,4 +1,5 @@
import { readFile, readdir } from 'node:fs/promises'
+import { traverse } from '@babel/core'
import * as t from '@babel/types'
import { generateFromAst, parseAst } from '@tanstack/router-utils'
import path from 'pathe'
@@ -148,6 +149,63 @@ describe('Hydrate compiler transform fixtures', async () => {
})
})
+ test('generated lazy names do not shadow existing global references', () => {
+ const code = `import { Hydrate } from '@tanstack/react-start'; export const before = _H0; export function Page() { return
}`
+ const compiled = compile({
+ env: 'client',
+ code,
+ id: fixtureId('global.tsx'),
+ })!
+ const output = parseAst({ code: compiled.code })
+ const globalReferences: Array = []
+ traverse(output, {
+ ReferencedIdentifier(path) {
+ if (path.node.name === '_H0' && !path.scope.hasBinding('_H0', true)) {
+ globalReferences.push(path.node.name)
+ }
+ },
+ })
+ expect(globalReferences).toEqual(['_H0'])
+ })
+
+ test('retains captured local components and values across extraction', async () => {
+ const code = `
+ import { Hydrate } from '@tanstack/react-start'
+ export function Page({ name }) {
+ const count = 1
+ const Local = () => {name}
+ return {name}
+ }
+ `
+ const id = fixtureId('captured.tsx')
+ const compiled = compile({ env: 'client', code, id })!
+ expect(compiled.code).toContain('Local={Local}')
+ expect(compiled.code).toContain('count={count}')
+ expect(compiled.code).toContain('name={name}')
+ expect(compiled.code).toContain('const count = 1')
+ expect(compiled.code).toContain('const Local')
+ const loaded = await loadVirtualHydrateModule({
+ code,
+ id: virtualHydrateId(id, compiled.boundaries[0]!),
+ root: fixtureRoot,
+ })
+ expect(loaded).toBeTruthy()
+ const output = parseAst({ code: loaded!.code })
+ const capturedReferences = new Set()
+ traverse(output, {
+ Program(path) {
+ expect(path.scope.getBinding('Page')).toBeUndefined()
+ },
+ ReferencedIdentifier(path) {
+ if (['Local', 'count', 'name'].includes(path.node.name)) {
+ capturedReferences.add(path.node.name)
+ expect(path.scope.hasBinding(path.node.name, true)).toBe(true)
+ }
+ },
+ })
+ expect([...capturedReferences].sort()).toEqual(['Local', 'count', 'name'])
+ })
+
test('should extract virtual modules and keep nested ids stable', async () => {
const filename = 'hydrateWhenNested.tsx'
const code = await readFixture(filename)
diff --git a/packages/start-plugin-core/tests/importProtection/analysis.exports.test.ts b/packages/start-plugin-core/tests/importProtection/analysis.exports.test.ts
index dbb0830af7..1e14f5fd80 100644
--- a/packages/start-plugin-core/tests/importProtection/analysis.exports.test.ts
+++ b/packages/start-plugin-core/tests/importProtection/analysis.exports.test.ts
@@ -4,6 +4,7 @@ import {
isValidExportName,
getMockExportNamesBySource,
getNamedExports,
+ getImportSources,
} from '../../src/import-protection/analysis'
describe('isValidExportName', () => {
@@ -245,3 +246,16 @@ describe('collectNamedExports', () => {
expect(getNamedExports(code)).toEqual(['foo-bar'])
})
})
+
+test('discovers mock exports through parenthesized namespace access', () => {
+ const exports = getMockExportNamesBySource(
+ `import * as denied from 'denied'; (denied).read(); (denied)['write']()`,
+ )
+ expect(exports.get('denied')).toEqual(['read', 'write'])
+})
+
+test('discovers parenthesized literal dynamic import sources', () => {
+ expect(getImportSources(`export const value = import(('denied'))`)).toEqual([
+ 'denied',
+ ])
+})
diff --git a/packages/start-plugin-core/tests/importProtection/analysis.usage.test.ts b/packages/start-plugin-core/tests/importProtection/analysis.usage.test.ts
index 69642e890a..8db2c2db6c 100644
--- a/packages/start-plugin-core/tests/importProtection/analysis.usage.test.ts
+++ b/packages/start-plugin-core/tests/importProtection/analysis.usage.test.ts
@@ -53,7 +53,7 @@ describe('findPostCompileUsagePos', () => {
test('ignores binding positions (variable declarator id)', () => {
const p = pos(
- `import { x } from 'denied';\nconst x = 1;\nconst y = x;`,
+ `import { x } from 'denied';\n{ const x = 1;\nconst y = x; }`,
'denied',
)
expect(p).toBeUndefined()
@@ -279,3 +279,38 @@ describe('findOriginalUnsafeUsagePos', () => {
expect(p).toBeUndefined()
})
})
+
+test.each([
+ `createServerFn().handler((() => denied()))`,
+ `(createServerFn)().handler(() => denied())`,
+])(
+ 'preserves safe-boundary recognition through parentheses: %s',
+ (expression) => {
+ const code = `import { denied } from 'denied';\nexport const result = ${expression}`
+ expect(findOriginalUnsafeUsagePos(code, 'denied', 'client')).toBeUndefined()
+ },
+)
+
+test.each([
+ `createIsomorphicFn().client((() => denied()))`,
+ `(createClientOnlyFn)((() => denied()))`,
+])('preserves server safe boundaries through parentheses: %s', (expression) => {
+ const code = `import { denied } from 'denied';\nexport const result = ${expression}`
+ expect(findOriginalUnsafeUsagePos(code, 'denied', 'server')).toBeUndefined()
+})
+
+test('does not treat an immediately invoked function as a safe handler argument', () => {
+ const code = `import { denied } from 'denied';\nexport const result = createServerFn().handler((() => denied())())`
+ expect(findOriginalUnsafeUsagePos(code, 'denied', 'client')).toEqual({
+ line: 2,
+ column0: code.split('\n')[1]!.indexOf('denied'),
+ })
+})
+
+test('prefers parenthesized call usage over an earlier value reference', () => {
+ const code = `import { denied } from 'denied';\nconst value = denied;\n(denied)()`
+ expect(findPostCompileUsagePos(code, 'denied')).toEqual({
+ line: 3,
+ column0: 1,
+ })
+})
From 7471fb859101e6c266bac4604035211b21f1426c Mon Sep 17 00:00:00 2001
From: Flo
Date: Sat, 26 Sep 2026 21:39:51 +0200
Subject: [PATCH 017/127] chore: update CodSpeed action and Vitest plugin
(#8508)
---
.github/workflows/client-nav-benchmarks.yml | 2 +-
benchmarks/client-nav/package.json | 2 +-
benchmarks/memory/client/package.json | 2 +-
benchmarks/memory/server/package.json | 2 +-
benchmarks/ssr/package.json | 2 +-
pnpm-lock.yaml | 43 ++++++++++-----------
6 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/.github/workflows/client-nav-benchmarks.yml b/.github/workflows/client-nav-benchmarks.yml
index 06e7e733b8..3862ea66dc 100644
--- a/.github/workflows/client-nav-benchmarks.yml
+++ b/.github/workflows/client-nav-benchmarks.yml
@@ -80,7 +80,7 @@ jobs:
@benchmarks/${{ matrix.benchmark }}:build:${{ matrix.framework }}
- name: Run ${{ matrix.benchmark }}:${{ matrix.framework }} CodSpeed benchmark
- uses: CodSpeedHQ/action@4296e51e7041e24dadb86d1d6e8b9320d223dbe8 # v5.0.3
+ uses: CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1
timeout-minutes: 20
with:
mode: ${{ matrix.mode }}
diff --git a/benchmarks/client-nav/package.json b/benchmarks/client-nav/package.json
index 0b2a4cd5b3..1aadf1e07c 100644
--- a/benchmarks/client-nav/package.json
+++ b/benchmarks/client-nav/package.json
@@ -31,7 +31,7 @@
},
"devDependencies": {
"@platformatic/flame": "^1.6.0",
- "@codspeed/vitest-plugin": "^5.5.0",
+ "@codspeed/vitest-plugin": "^5.7.1",
"@tanstack/router-plugin": "workspace:^",
"@testing-library/react": "^16.2.0",
"@vitejs/plugin-react": "^6.0.1",
diff --git a/benchmarks/memory/client/package.json b/benchmarks/memory/client/package.json
index af1770ba0d..2da6cb4ad8 100644
--- a/benchmarks/memory/client/package.json
+++ b/benchmarks/memory/client/package.json
@@ -22,7 +22,7 @@
"vue": "^3.5.16"
},
"devDependencies": {
- "@codspeed/vitest-plugin": "^5.5.0",
+ "@codspeed/vitest-plugin": "^5.7.1",
"@datadog/pprof": "^5.13.2",
"@platformatic/flame": "^1.6.0",
"@testing-library/react": "^16.2.0",
diff --git a/benchmarks/memory/server/package.json b/benchmarks/memory/server/package.json
index 4688384061..5d59987e68 100644
--- a/benchmarks/memory/server/package.json
+++ b/benchmarks/memory/server/package.json
@@ -23,7 +23,7 @@
"vue": "^3.5.16"
},
"devDependencies": {
- "@codspeed/vitest-plugin": "^5.5.0",
+ "@codspeed/vitest-plugin": "^5.7.1",
"@datadog/pprof": "^5.13.2",
"@platformatic/flame": "^1.6.0",
"@vitejs/plugin-react": "^6.0.1",
diff --git a/benchmarks/ssr/package.json b/benchmarks/ssr/package.json
index 07fbd92849..bcc484b332 100644
--- a/benchmarks/ssr/package.json
+++ b/benchmarks/ssr/package.json
@@ -15,7 +15,7 @@
"vue": "^3.5.16"
},
"devDependencies": {
- "@codspeed/vitest-plugin": "^5.5.0",
+ "@codspeed/vitest-plugin": "^5.7.1",
"@vitejs/plugin-react": "^6.0.1",
"@vitejs/plugin-vue-jsx": "^5.1.5",
"@types/react": "catalog:",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c6cc0374eb..a024f0f488 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -310,8 +310,8 @@ importers:
version: 3.5.25(@typescript/typescript6@6.0.2)
devDependencies:
'@codspeed/vitest-plugin':
- specifier: ^5.5.0
- version: 5.5.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
+ specifier: ^5.7.1
+ version: 5.7.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
'@platformatic/flame':
specifier: ^1.6.0
version: 1.6.0
@@ -386,8 +386,8 @@ importers:
version: 3.5.25(@typescript/typescript6@6.0.2)
devDependencies:
'@codspeed/vitest-plugin':
- specifier: ^5.5.0
- version: 5.5.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
+ specifier: ^5.7.1
+ version: 5.7.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
'@datadog/pprof':
specifier: ^5.13.2
version: 5.13.2
@@ -468,8 +468,8 @@ importers:
version: 3.5.25(@typescript/typescript6@6.0.2)
devDependencies:
'@codspeed/vitest-plugin':
- specifier: ^5.5.0
- version: 5.5.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
+ specifier: ^5.7.1
+ version: 5.7.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
'@datadog/pprof':
specifier: ^5.13.2
version: 5.13.2
@@ -538,8 +538,8 @@ importers:
version: 3.5.25(@typescript/typescript6@6.0.2)
devDependencies:
'@codspeed/vitest-plugin':
- specifier: ^5.5.0
- version: 5.5.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
+ specifier: ^5.7.1
+ version: 5.7.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)
'@types/react':
specifier: ^19.2.8
version: 19.2.9
@@ -16370,11 +16370,11 @@ packages:
cpu: [x64]
os: [win32]
- '@codspeed/core@5.5.0':
- resolution: {integrity: sha512-5FbjNlxSVOfemB85orEecikZiTz0C8aZYUfCkt5HY6QLLd1mqkrHAfekEJw0gkHcgCjNgD6DVp2TXm0V/xtt4w==}
+ '@codspeed/core@5.7.1':
+ resolution: {integrity: sha512-7mrFkqaY14rXu3XHv3o7bK3btLK0LFRxfeK3bQC8dLduI/Ty9eq8Hv8rx04FAY/onQbRTx3rUUQg5xprYHpATQ==}
- '@codspeed/vitest-plugin@5.5.0':
- resolution: {integrity: sha512-u7NTLXujxo0bQVCYDXk2mDJ+lA8h5vPY96FvUpPYLUbzVRsM6HO62gXXn4ABJOGYwx1bIwXtgSpUlK/V63iIcg==}
+ '@codspeed/vitest-plugin@5.7.1':
+ resolution: {integrity: sha512-yKNqaYVxZZPJYkhVHpz30Oem4TUgcI+/IRDD9YHvcAgi0P42CL6TB/+qYjuFOWghFzTPrm3TUbNFoBsevSTbUA==}
peerDependencies:
tinybench: '>=2.9.0'
vite: ^8.0.14
@@ -23417,9 +23417,6 @@ packages:
resolution: {integrity: sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==}
engines: {node: '>= 6.0.0'}
- axios@1.17.0:
- resolution: {integrity: sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==}
-
axios@1.18.1:
resolution: {integrity: sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==}
@@ -31231,20 +31228,20 @@ snapshots:
'@cloudflare/workerd-windows-64@1.20260317.1':
optional: true
- '@codspeed/core@5.5.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)':
+ '@codspeed/core@5.7.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)':
dependencies:
- axios: 1.17.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)
+ axios: 1.18.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)
find-up: 6.3.0
- form-data: 4.0.5
+ form-data: 4.0.6
node-gyp-build: 4.8.4
stack-trace: 1.0.0-pre2
transitivePeerDependencies:
- debug
- supports-color
- '@codspeed/vitest-plugin@5.5.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)':
+ '@codspeed/vitest-plugin@5.7.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)(tinybench@2.9.0)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(vitest@4.1.4)':
dependencies:
- '@codspeed/core': 5.5.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)
+ '@codspeed/core': 5.7.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2)
tinybench: 2.9.0
vite: 8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0)
vitest: 4.1.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
@@ -38687,10 +38684,10 @@ snapshots:
aws-ssl-profiles@1.1.2: {}
- axios@1.17.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2):
+ axios@1.18.1(debug@4.4.3(supports-color@7.2.0))(supports-color@10.2.2):
dependencies:
- follow-redirects: 1.16.0(debug@4.4.3(supports-color@10.2.2))
- form-data: 4.0.5
+ follow-redirects: 1.16.0(debug@4.4.3(supports-color@7.2.0))
+ form-data: 4.0.6
https-proxy-agent: 5.0.1(supports-color@10.2.2)
proxy-from-env: 2.1.0
transitivePeerDependencies:
From 488d046a907d330429e2c807ef95326dad87480f Mon Sep 17 00:00:00 2001
From: Sarah Gerrard
Date: Sat, 26 Sep 2026 15:55:05 -0700
Subject: [PATCH 018/127] perf(router,start): update Seroval to 1.6.7 (#8297)
* perf(router,start): update Seroval to 1.6.6
* perf(router,start): update Seroval to 1.6.7
* chore: update seroval to 1.6.7
seroval and seroval-plugins were pinned to ^1.6.2 while 1.6.7 is the
current release. The type surface is additive: two new options
(maxBase64Length, compactArrayBufferViews) and an isStream export.
Bundle (gzip): router-only scenarios unchanged; Start client bundles
grow 532-642 bytes from the upstream typed array and base64 handling.
react-start.minimal 98504 -> 99039 (+535).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
.changeset/bump-seroval-1-6-7.md | 9 ++++
benchmarks/ssr/package.json | 2 +-
packages/router-core/package.json | 4 +-
packages/start-client-core/package.json | 2 +-
packages/start-plugin-core/package.json | 2 +-
packages/start-server-core/package.json | 2 +-
.../package.json | 2 +-
pnpm-lock.yaml | 42 +++++++++----------
8 files changed, 37 insertions(+), 28 deletions(-)
create mode 100644 .changeset/bump-seroval-1-6-7.md
diff --git a/.changeset/bump-seroval-1-6-7.md b/.changeset/bump-seroval-1-6-7.md
new file mode 100644
index 0000000000..0d20f7c116
--- /dev/null
+++ b/.changeset/bump-seroval-1-6-7.md
@@ -0,0 +1,9 @@
+---
+'@tanstack/router-core': patch
+'@tanstack/start-client-core': patch
+'@tanstack/start-server-core': patch
+'@tanstack/start-plugin-core': patch
+'@tanstack/start-static-server-functions': patch
+---
+
+Update `seroval` and `seroval-plugins` from 1.6.2 to 1.6.7. This picks up the typed array length guard, the `maxBase64Length` and `compactArrayBufferViews` options, and the `isStream` export.
diff --git a/benchmarks/ssr/package.json b/benchmarks/ssr/package.json
index bcc484b332..a6ab62efa5 100644
--- a/benchmarks/ssr/package.json
+++ b/benchmarks/ssr/package.json
@@ -19,7 +19,7 @@
"@vitejs/plugin-react": "^6.0.1",
"@vitejs/plugin-vue-jsx": "^5.1.5",
"@types/react": "catalog:",
- "seroval": "^1.6.2",
+ "seroval": "^1.6.7",
"@typescript/native": "npm:typescript@^7.0.2",
"jsdom": "29.1.1",
"typescript": "npm:@typescript/typescript6@^6.0.2",
diff --git a/packages/router-core/package.json b/packages/router-core/package.json
index f1df4c6fbf..d6d9512019 100644
--- a/packages/router-core/package.json
+++ b/packages/router-core/package.json
@@ -184,8 +184,8 @@
"dependencies": {
"@tanstack/history": "workspace:*",
"cookie-es": "^3.0.0",
- "seroval": "^1.6.2",
- "seroval-plugins": "^1.6.2"
+ "seroval": "^1.6.7",
+ "seroval-plugins": "^1.6.7"
},
"devDependencies": {
"@tanstack/store": "^0.11.0",
diff --git a/packages/start-client-core/package.json b/packages/start-client-core/package.json
index a813c1f77e..0895675e91 100644
--- a/packages/start-client-core/package.json
+++ b/packages/start-client-core/package.json
@@ -109,7 +109,7 @@
"@tanstack/router-core": "workspace:*",
"@tanstack/start-fn-stubs": "workspace:*",
"@tanstack/start-storage-context": "workspace:*",
- "seroval": "^1.6.2"
+ "seroval": "^1.6.7"
},
"devDependencies": {
"vite": "*",
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index ac3af33d38..bf1a50e694 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -98,7 +98,7 @@
"lightningcss": "^1.33.0",
"pathe": "catalog:",
"picomatch": "^4.0.7",
- "seroval": "^1.6.2",
+ "seroval": "^1.6.7",
"source-map": "^0.7.6",
"srvx": "^0.11.22",
"tinyglobby": "catalog:",
diff --git a/packages/start-server-core/package.json b/packages/start-server-core/package.json
index d89979cfff..259d40b803 100644
--- a/packages/start-server-core/package.json
+++ b/packages/start-server-core/package.json
@@ -105,7 +105,7 @@
"@tanstack/start-storage-context": "workspace:*",
"fetchdts": "^0.1.6",
"h3-v2": "npm:h3@2.0.1-rc.20",
- "seroval": "^1.6.2"
+ "seroval": "^1.6.7"
},
"devDependencies": {
"@standard-schema/spec": "^1.0.0",
diff --git a/packages/start-static-server-functions/package.json b/packages/start-static-server-functions/package.json
index cec2e42ff2..a45f2711a2 100644
--- a/packages/start-static-server-functions/package.json
+++ b/packages/start-static-server-functions/package.json
@@ -60,7 +60,7 @@
},
"dependencies": {
"@tanstack/start-client-core": "workspace:*",
- "seroval": "^1.6.2"
+ "seroval": "^1.6.7"
},
"devDependencies": {
"vite": "*",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a024f0f488..37c1206cf3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -556,8 +556,8 @@ importers:
specifier: 29.1.1
version: 29.1.1(@noble/hashes@2.0.1)
seroval:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.7
+ version: 1.6.7
typescript:
specifier: npm:@typescript/typescript6@^6.0.2
version: '@typescript/typescript6@6.0.2'
@@ -14340,11 +14340,11 @@ importers:
specifier: ^3.0.0
version: 3.1.1
seroval:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.7
+ version: 1.6.7
seroval-plugins:
- specifier: ^1.6.2
- version: 1.6.2(seroval@1.6.2)
+ specifier: ^1.6.7
+ version: 1.6.7(seroval@1.6.7)
devDependencies:
'@arethetypeswrong/cli':
specifier: 'catalog:'
@@ -15037,8 +15037,8 @@ importers:
specifier: workspace:*
version: link:../start-storage-context
seroval:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.7
+ version: 1.6.7
devDependencies:
'@arethetypeswrong/cli':
specifier: 'catalog:'
@@ -15128,8 +15128,8 @@ importers:
specifier: ^4.0.7
version: 4.0.7
seroval:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.7
+ version: 1.6.7
source-map:
specifier: ^0.7.6
version: 0.7.6
@@ -15207,8 +15207,8 @@ importers:
specifier: npm:h3@2.0.1-rc.20
version: h3@2.0.1-rc.20(crossws@0.4.12(srvx@0.11.22))
seroval:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.7
+ version: 1.6.7
devDependencies:
'@arethetypeswrong/cli':
specifier: 'catalog:'
@@ -15253,8 +15253,8 @@ importers:
specifier: workspace:*
version: link:../start-client-core
seroval:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.7
+ version: 1.6.7
devDependencies:
'@arethetypeswrong/cli':
specifier: 'catalog:'
@@ -28270,8 +28270,8 @@ packages:
peerDependencies:
seroval: ^1.0
- seroval-plugins@1.6.2:
- resolution: {integrity: sha512-TfxuUjlbBESzUOWdTkTKqvSmav0ABym+itetDXLK6mDz8SmrpdI30aF8RTXE8Bvq+tH/1yIDkvy3W0lfQb1ipQ==}
+ seroval-plugins@1.6.7:
+ resolution: {integrity: sha512-4Nk35ttD3DTDJW4hgw5StsVAPeU6qnDFnULAouw6tQ7oLTV/ICXrWpsXo2EE52eSP2joUMazbVf52mFEcADqRw==}
engines: {node: '>=10'}
peerDependencies:
seroval: ^1.0
@@ -28280,8 +28280,8 @@ packages:
resolution: {integrity: sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==}
engines: {node: '>=10'}
- seroval@1.6.2:
- resolution: {integrity: sha512-mPT+SD2TrlB6wvte1KkYOYUkubaTbd6pZ/6Kk3C9nxzrHmCZyhxOO7XGAeL7f+yLKZglzGtM9odUVvg/EhO+vQ==}
+ seroval@1.6.7:
+ resolution: {integrity: sha512-AeDcLh0yO2SFm9W71essgnSzLV9DI8ZH0x0knXn2DMnUZj728mpLbxjlbB6IqKCmqh8JA3cEqRyGoNkt584JcQ==}
engines: {node: '>=10'}
serve-index@1.9.1:
@@ -44557,13 +44557,13 @@ snapshots:
dependencies:
seroval: 1.5.4
- seroval-plugins@1.6.2(seroval@1.6.2):
+ seroval-plugins@1.6.7(seroval@1.6.7):
dependencies:
- seroval: 1.6.2
+ seroval: 1.6.7
seroval@1.5.4: {}
- seroval@1.6.2: {}
+ seroval@1.6.7: {}
serve-index@1.9.1(supports-color@10.2.2):
dependencies:
From 3cdd1af04b3e2d6f777797ee7bddf285318dd9d2 Mon Sep 17 00:00:00 2001
From: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
Date: Sun, 27 Sep 2026 14:31:49 +0200
Subject: [PATCH 019/127] fix(router-core): restore native scroll restoration
on reload (#8519)
* test: cover scroll restoration lifecycle handoff
* test: remove temporary scroll lifecycle benchmark
* fix(router-core): hand native scroll restoration back on pagehide
---
.changeset/shaky-nights-flash.md | 5 +
...-restoration-session-storage-error.test.ts | 66 +++---
.../scroll-restoration/src/client.tsx | 23 +++
.../scroll-restoration/src/routes/__root.tsx | 4 +
.../scroll-restoration-lifecycle.spec.ts | 85 ++++++++
.../tests/scroll-restoration-reload.spec.ts | 191 ++++++++++++++++++
e2e/scroll-restoration-lifecycle.ts | 61 ++++++
.../scroll-restoration-lifecycle.spec.ts | 4 +
.../scroll-restoration-lifecycle.spec.ts | 4 +
packages/router-core/src/router.ts | 16 +-
.../router-core/src/scroll-restoration.ts | 65 +++---
.../scroll-restoration-lifecycle.test.ts | 187 +++++++++++++++++
.../tests/scroll-restoration.test.ts | 13 +-
13 files changed, 653 insertions(+), 71 deletions(-)
create mode 100644 .changeset/shaky-nights-flash.md
create mode 100644 e2e/react-start/scroll-restoration/src/client.tsx
create mode 100644 e2e/react-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
create mode 100644 e2e/react-start/scroll-restoration/tests/scroll-restoration-reload.spec.ts
create mode 100644 e2e/scroll-restoration-lifecycle.ts
create mode 100644 e2e/solid-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
create mode 100644 e2e/vue-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
create mode 100644 packages/router-core/tests/scroll-restoration-lifecycle.test.ts
diff --git a/.changeset/shaky-nights-flash.md b/.changeset/shaky-nights-flash.md
new file mode 100644
index 0000000000..80aff4b26a
--- /dev/null
+++ b/.changeset/shaky-nights-flash.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/router-core': patch
+---
+
+Hand native scroll restoration back to the browser on pagehide, including entries entering BFCache, and reclaim manual restoration when a cached document resumes.
diff --git a/e2e/react-router/basepath-file-based/tests/scroll-restoration-session-storage-error.test.ts b/e2e/react-router/basepath-file-based/tests/scroll-restoration-session-storage-error.test.ts
index 06b90f6528..d6a50de840 100644
--- a/e2e/react-router/basepath-file-based/tests/scroll-restoration-session-storage-error.test.ts
+++ b/e2e/react-router/basepath-file-based/tests/scroll-restoration-session-storage-error.test.ts
@@ -1,5 +1,41 @@
-/* eslint-disable */
-import { expect, test } from '@playwright/test'
+import { expect } from '@playwright/test'
+import { test } from '@tanstack/router-e2e-utils'
+import type { Page } from '@playwright/test'
+
+async function reloadAfterStorageFailure(page: Page) {
+ const errors: Array = []
+ page.on('pageerror', (error) => errors.push(error.message))
+ const snapshot = await page.evaluate(async () => {
+ let failures = 0
+ const setItem = Storage.prototype.setItem
+ Storage.prototype.setItem = function (...args) {
+ try {
+ return setItem.apply(this, args)
+ } catch (error) {
+ failures++
+ throw error
+ }
+ }
+ const scrolled = new Promise((resolve) =>
+ addEventListener('scroll', () => resolve(), { once: true }),
+ )
+ scrollTo(0, 200)
+ await scrolled
+ // Handler integration; genuine reload handoff is covered by the Start suite.
+ dispatchEvent(new PageTransitionEvent('pagehide', { persisted: false }))
+ return { mode: history.scrollRestoration, failures }
+ })
+ expect(snapshot.failures).toBeGreaterThan(0)
+ // Storage failure must still allow native fallback; failure to restore is not a requirement.
+ expect(snapshot.mode).toBe('auto')
+ await page.reload()
+ await page.waitForLoadState('networkidle')
+ await expect(
+ page.getByRole('heading', { name: 'Scroll Error Test' }),
+ ).toBeVisible()
+ expect(await page.evaluate(() => history.scrollRestoration)).toBe('manual')
+ expect(errors).toEqual([])
+}
test.describe('Scroll Restoration with Session Storage Error', () => {
test('should not crash when sessionStorage.setItem throws an error', async ({
@@ -9,22 +45,12 @@ test.describe('Scroll Restoration with Session Storage Error', () => {
await page.waitForLoadState('networkidle')
await page.evaluate(() => {
- sessionStorage.setItem = () => {
+ Storage.prototype.setItem = () => {
throw new Error('Test Error')
}
})
- await page.evaluate(() => window.scrollTo(0, 200))
- await page.waitForTimeout(150)
-
- await page.reload()
- await page.waitForLoadState('networkidle')
-
- const heading = page.locator('h1:has-text("Scroll Error Test")')
- await expect(heading).toBeVisible()
-
- const scrollPosition = await page.evaluate(() => window.scrollY)
- expect(scrollPosition).not.toBe(200)
+ await reloadAfterStorageFailure(page)
})
test('should not crash when sessionStorage quota is exceeded', async ({
@@ -47,16 +73,6 @@ test.describe('Scroll Restoration with Session Storage Error', () => {
}
})
- await page.evaluate(() => window.scrollTo(0, 200))
- await page.waitForTimeout(150)
-
- await page.reload()
- await page.waitForLoadState('networkidle')
-
- const heading = page.locator('h1:has-text("Scroll Error Test")')
- await expect(heading).toBeVisible()
-
- const scrollPosition = await page.evaluate(() => window.scrollY)
- expect(scrollPosition).not.toBe(200)
+ await reloadAfterStorageFailure(page)
})
})
diff --git a/e2e/react-start/scroll-restoration/src/client.tsx b/e2e/react-start/scroll-restoration/src/client.tsx
new file mode 100644
index 0000000000..25a0ebf7e7
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/src/client.tsx
@@ -0,0 +1,23 @@
+import { StrictMode, startTransition } from 'react'
+import { hydrateRoot } from 'react-dom/client'
+import { StartClient } from '@tanstack/react-start/client'
+
+async function bootstrap() {
+ // Fixture-only gate: leave SSR markup, CSS and inline restoration intact.
+ // Waiting here allows load to finish before StartClient constructs the router.
+ if ((window as any).__holdScrollBootstrap) {
+ await new Promise((resolve) => {
+ ;(window as any).__releaseScrollBootstrap = resolve
+ })
+ }
+ startTransition(() => {
+ hydrateRoot(
+ document,
+
+
+ ,
+ )
+ })
+}
+
+void bootstrap()
diff --git a/e2e/react-start/scroll-restoration/src/routes/__root.tsx b/e2e/react-start/scroll-restoration/src/routes/__root.tsx
index 563d9208ec..875bff34e0 100644
--- a/e2e/react-start/scroll-restoration/src/routes/__root.tsx
+++ b/e2e/react-start/scroll-restoration/src/routes/__root.tsx
@@ -65,6 +65,10 @@ export const Route = createRootRoute({
})
function RootComponent() {
+ React.useEffect(() => {
+ dispatchEvent(new Event('test-scroll-hydrated'))
+ }, [])
+
return (
diff --git a/e2e/react-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts b/e2e/react-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
new file mode 100644
index 0000000000..6c1e1693b6
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
@@ -0,0 +1,85 @@
+import { writeFile } from 'node:fs/promises'
+import { expect } from '@playwright/test'
+import { test } from '@tanstack/router-e2e-utils'
+import { scrollRestorationLifecycleTests } from '../../../scroll-restoration-lifecycle'
+
+scrollRestorationLifecycleTests(test)
+
+test('hands native scroll restoration back to the browser on reload', async ({
+ page,
+}, testInfo) => {
+ const errors: Array = []
+ page.on('pageerror', (error) => errors.push(error.message))
+ const key = 'test-scroll-pagehide'
+ const token = testInfo.testId
+ await page.addInitScript(() => {
+ ;(window as any).__initialScrollRestoration = history.scrollRestoration
+ })
+ await page.goto('/')
+ await page.getByRole('link', { name: '/reset-scroll-false-a' }).click()
+ await page.waitForLoadState('networkidle')
+ expect(await page.evaluate(() => history.scrollRestoration)).toBe('manual')
+
+ const position = await page.evaluate(
+ async ({ key, token }) => {
+ sessionStorage.removeItem(key)
+ const scrolled = new Promise((resolve) => {
+ addEventListener('scroll', () => resolve(), { once: true })
+ })
+ scrollTo(0, 500)
+ await scrolled
+ // Registered after router setup, so this observes the router's handoff.
+ window.addEventListener(
+ 'pagehide',
+ (event) => {
+ sessionStorage.setItem(
+ key,
+ JSON.stringify({
+ token,
+ mode: history.scrollRestoration,
+ persisted: (event as PageTransitionEvent).persisted,
+ trusted: event.isTrusted,
+ x: scrollX,
+ y: scrollY,
+ }),
+ )
+ },
+ { once: true },
+ )
+ return { x: scrollX, y: scrollY }
+ },
+ { key, token },
+ )
+ expect(position.y).toBeGreaterThan(0)
+
+ await page.reload()
+ const observation = await page.evaluate(
+ (key) => ({
+ outgoing: JSON.parse(sessionStorage.getItem(key)!),
+ initialMode: (window as any).__initialScrollRestoration,
+ }),
+ key,
+ )
+ const snapshotPath = testInfo.outputPath('reload-handoff.json')
+ await writeFile(
+ snapshotPath,
+ JSON.stringify({ ...observation, errors }, null, 2),
+ )
+ await testInfo.attach('reload-handoff', {
+ path: snapshotPath,
+ contentType: 'application/json',
+ })
+ expect(observation.outgoing).toMatchObject({
+ token,
+ trusted: true,
+ mode: 'auto',
+ })
+ expect(observation.initialMode).toBe('auto')
+ expect(Math.abs(observation.outgoing.x - position.x)).toBeLessThanOrEqual(1)
+ expect(Math.abs(observation.outgoing.y - position.y)).toBeLessThanOrEqual(1)
+ await expect
+ .poll(() => page.evaluate(() => history.scrollRestoration))
+ .toBe('manual')
+ await expect.poll(() => page.evaluate(() => scrollY)).toBe(position.y)
+ expect(errors).toEqual([])
+})
diff --git a/e2e/react-start/scroll-restoration/tests/scroll-restoration-reload.spec.ts b/e2e/react-start/scroll-restoration/tests/scroll-restoration-reload.spec.ts
new file mode 100644
index 0000000000..767f02a39c
--- /dev/null
+++ b/e2e/react-start/scroll-restoration/tests/scroll-restoration-reload.spec.ts
@@ -0,0 +1,191 @@
+import { writeFile } from 'node:fs/promises'
+import { expect } from '@playwright/test'
+import { test } from '@tanstack/router-e2e-utils'
+
+// A frame recorder is diagnostic evidence, not proof of compositor-frame pixels.
+for (const holdBootstrap of [false, true]) {
+ test(`reload keeps rendered SSR scroll stable (bootstrap held=${holdBootstrap})`, async ({
+ page,
+ }, testInfo) => {
+ const errors: Array = []
+ page.on('pageerror', (error) => errors.push(error.message))
+ await page.addInitScript(() => {
+ const holdKey = 'test-hold-scroll-bootstrap'
+ ;(window as any).__holdScrollBootstrap =
+ sessionStorage.getItem(holdKey) === 'true'
+ sessionStorage.removeItem(holdKey)
+ const samples: Array<{
+ time: number
+ phase: string
+ x: number
+ y: number
+ mode: ScrollRestoration
+ scrollHeight: number
+ viewportHeight: number
+ anchorTop: number | null
+ visibility: DocumentVisibilityState
+ }> = []
+ let phase = 'initial'
+ let frame = 0
+ const sample = () => {
+ samples.push({
+ time: performance.now(),
+ phase,
+ x: scrollX,
+ y: scrollY,
+ mode: history.scrollRestoration,
+ scrollHeight: document.documentElement?.scrollHeight ?? 0,
+ viewportHeight: innerHeight,
+ anchorTop:
+ document
+ .querySelector('[data-testid="reset-scroll-false-link-6"]')
+ ?.getBoundingClientRect().top ?? null,
+ visibility: document.visibilityState,
+ })
+ }
+ const mark = (next: string) => {
+ phase = next
+ sample()
+ }
+ const tick = () => {
+ sample()
+ if (samples.length < 600) {
+ frame = requestAnimationFrame(tick)
+ }
+ }
+ sample()
+ frame = requestAnimationFrame(tick)
+ for (const event of [
+ 'DOMContentLoaded',
+ 'load',
+ 'pageshow',
+ 'test-scroll-hydrated',
+ 'test-scroll-bootstrap-release',
+ ]) {
+ addEventListener(event, () => mark(event))
+ }
+ ;(window as any).__scrollProbe = {
+ samples,
+ stop: () => {
+ cancelAnimationFrame(frame)
+ return {
+ samples,
+ paints: performance
+ .getEntriesByType('paint')
+ .map(({ name, startTime }) => ({ name, startTime })),
+ }
+ },
+ }
+ })
+ await page.goto('/')
+ await page.getByRole('link', { name: '/reset-scroll-false-a' }).click()
+ await page.waitForLoadState('networkidle')
+ const before = await page.evaluate(async (holdBootstrap) => {
+ scrollTo(0, 500)
+ await new Promise((resolve) =>
+ requestAnimationFrame(() => requestAnimationFrame(() => resolve())),
+ )
+ sessionStorage.setItem(
+ 'test-hold-scroll-bootstrap',
+ String(holdBootstrap),
+ )
+ return {
+ y: scrollY,
+ anchorTop: document
+ .querySelector('[data-testid="reset-scroll-false-link-6"]')!
+ .getBoundingClientRect().top,
+ }
+ }, holdBootstrap)
+ expect(before.y).toBeGreaterThan(0)
+ await page.reload()
+ // This window starts at document readiness, independently of scroll correctness.
+ await page.evaluate(async () => {
+ await Promise.all(
+ Array.from(
+ document.querySelectorAll('link[rel="stylesheet"]'),
+ (link) => {
+ if (link.sheet) {
+ return
+ }
+ return new Promise((resolve) =>
+ link.addEventListener('load', () => resolve(), { once: true }),
+ )
+ },
+ ),
+ )
+ for (let i = 0; i < 4; i++) {
+ await new Promise((resolve) =>
+ requestAnimationFrame(() => resolve()),
+ )
+ }
+ })
+ if (holdBootstrap) {
+ expect(
+ await page.evaluate(
+ () => typeof (window as any).__releaseScrollBootstrap,
+ ),
+ ).toBe('function')
+ expect(
+ await page.evaluate(() =>
+ (window as any).__scrollProbe.samples.some(
+ (sample: any) => sample.phase === 'test-scroll-hydrated',
+ ),
+ ),
+ ).toBe(false)
+ }
+ const screenshotPath = testInfo.outputPath('SSR-viewport.png')
+ await page.screenshot({ path: screenshotPath })
+ await testInfo.attach('SSR-viewport', {
+ path: screenshotPath,
+ contentType: 'image/png',
+ })
+ const held = await page.evaluate(() => ({
+ y: scrollY,
+ anchorTop: document
+ .querySelector('[data-testid="reset-scroll-false-link-6"]')!
+ .getBoundingClientRect().top,
+ }))
+ if (holdBootstrap) {
+ await page.evaluate(() => {
+ dispatchEvent(new Event('test-scroll-bootstrap-release'))
+ ;(window as any).__releaseScrollBootstrap()
+ })
+ }
+ await expect
+ .poll(() => page.evaluate(() => history.scrollRestoration))
+ .toBe('manual')
+ await page.waitForLoadState('networkidle')
+ await page.evaluate(async () => {
+ for (let i = 0; i < 8; i++) {
+ await new Promise((resolve) =>
+ requestAnimationFrame(() => resolve()),
+ )
+ }
+ })
+ const timeline = await page.evaluate(() =>
+ (window as any).__scrollProbe.stop(),
+ )
+ const timelinePath = testInfo.outputPath('scroll-timeline.json')
+ await writeFile(
+ timelinePath,
+ JSON.stringify({ before, held, ...timeline, errors }, null, 2),
+ )
+ await testInfo.attach('scroll-timeline', {
+ path: timelinePath,
+ contentType: 'application/json',
+ })
+ expect(held.y).toBe(before.y)
+ expect(held.anchorTop).toBeCloseTo(before.anchorTop, 0)
+ const renderedSamples = timeline.samples.filter(
+ (sample: any) => sample.phase !== 'initial' && sample.anchorTop !== null,
+ )
+ expect(renderedSamples.length).toBeGreaterThan(0)
+ for (const sample of renderedSamples) {
+ expect(Math.abs(sample.y - before.y)).toBeLessThanOrEqual(1)
+ expect(Math.abs(sample.anchorTop - before.anchorTop)).toBeLessThanOrEqual(
+ 1,
+ )
+ }
+ expect(errors).toEqual([])
+ })
+}
diff --git a/e2e/scroll-restoration-lifecycle.ts b/e2e/scroll-restoration-lifecycle.ts
new file mode 100644
index 0000000000..def0d10934
--- /dev/null
+++ b/e2e/scroll-restoration-lifecycle.ts
@@ -0,0 +1,61 @@
+import { expect } from '@playwright/test'
+
+// These exercise browser lifecycle handlers, not actual BFCache navigation.
+export function scrollRestorationLifecycleTests(
+ test: typeof import('./e2e-utils/src/fixture').test,
+) {
+ test.beforeEach(async ({ page }) => {
+ await page.goto('/normal-page')
+ await expect
+ .poll(() => page.evaluate(() => history.scrollRestoration))
+ .toBe('manual')
+ await page.waitForLoadState('networkidle')
+ })
+
+ for (const persisted of [false, true]) {
+ test(`pagehide hands control back with persisted=${persisted}`, async ({
+ page,
+ }) => {
+ const mode = await page.evaluate((persisted) => {
+ dispatchEvent(new PageTransitionEvent('pagehide', { persisted }))
+ return history.scrollRestoration
+ }, persisted)
+ expect(mode).toBe('auto')
+ })
+
+ test(`pageshow reclaims control only with persisted=${persisted}`, async ({
+ page,
+ }) => {
+ const mode = await page.evaluate((persisted) => {
+ // Model the state left by pagehide before the document resumes.
+ history.scrollRestoration = 'auto'
+ dispatchEvent(new PageTransitionEvent('pageshow', { persisted }))
+ return history.scrollRestoration
+ }, persisted)
+ expect(mode).toBe(persisted ? 'manual' : 'auto')
+ })
+ }
+
+ test('repeats the handoff when a cached document resumes more than once', async ({
+ page,
+ }) => {
+ const modes = await page.evaluate(() => {
+ const modes: Array = []
+ for (let i = 0; i < 3; i++) {
+ dispatchEvent(new PageTransitionEvent('pagehide', { persisted: true }))
+ modes.push(history.scrollRestoration)
+ dispatchEvent(new PageTransitionEvent('pageshow', { persisted: true }))
+ modes.push(history.scrollRestoration)
+ }
+ return modes
+ })
+ expect(modes).toEqual([
+ 'auto',
+ 'manual',
+ 'auto',
+ 'manual',
+ 'auto',
+ 'manual',
+ ])
+ })
+}
diff --git a/e2e/solid-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts b/e2e/solid-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
new file mode 100644
index 0000000000..df75cba73c
--- /dev/null
+++ b/e2e/solid-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
@@ -0,0 +1,4 @@
+import { test } from '@tanstack/router-e2e-utils'
+import { scrollRestorationLifecycleTests } from '../../../scroll-restoration-lifecycle'
+
+scrollRestorationLifecycleTests(test)
diff --git a/e2e/vue-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts b/e2e/vue-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
new file mode 100644
index 0000000000..df75cba73c
--- /dev/null
+++ b/e2e/vue-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts
@@ -0,0 +1,4 @@
+import { test } from '@tanstack/router-e2e-utils'
+import { scrollRestorationLifecycleTests } from '../../../scroll-restoration-lifecycle'
+
+scrollRestorationLifecycleTests(test)
diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts
index 97e060fd57..a70df71652 100644
--- a/packages/router-core/src/router.ts
+++ b/packages/router-core/src/router.ts
@@ -1144,13 +1144,13 @@ export class RouterCore<
Math.random() * 10000000,
)}`
_scroll: {
- next: boolean
+ n: boolean // Reset scroll on the next render.
// True until the current PUSH/REPLACE renders, so its hash owns window scroll.
- hash?: boolean
- restoring?: boolean
- restoration?: boolean
- reset?: boolean
- } = { next: true }
+ h?: boolean
+ e?: boolean // Restoration enabled.
+ s?: boolean // Snapshot/lifecycle listeners installed.
+ r?: boolean // Render listener installed.
+ } = { n: true }
subscribers = new Set>()
/** Accepted off-screen loader generations keyed by match ID. */
_cache = new Map()
@@ -2325,7 +2325,7 @@ export class RouterCore<
}
}
- this._scroll.next = next.resetScroll ?? true
+ this._scroll.n = next.resetScroll ?? true
return this._commitPromise
}
@@ -2427,7 +2427,7 @@ export class RouterCore<
this.updateLatestLocation()
if (opts?.action) {
- this._scroll.hash =
+ this._scroll.h =
opts.action.type === 'PUSH' || opts.action.type === 'REPLACE'
}
await loadClientRoute(this, opts)
diff --git a/packages/router-core/src/scroll-restoration.ts b/packages/router-core/src/scroll-restoration.ts
index 5e4ae0d3ee..972da92da1 100644
--- a/packages/router-core/src/scroll-restoration.ts
+++ b/packages/router-core/src/scroll-restoration.ts
@@ -38,21 +38,6 @@ function createScrollRestorationCache() {
}
}
-function persistScrollRestorationCache() {
- try {
- safeSessionStorage?.setItem(
- storageKey,
- JSON.stringify(scrollRestorationCache),
- )
- } catch {
- if (process.env.NODE_ENV !== 'production') {
- console.warn(
- '[ts-router] Could not persist scroll restoration state to sessionStorage.',
- )
- }
- }
-}
-
const scrollRestorationCache = /* @__PURE__ */ createScrollRestorationCache()
const scrollRestorationIdAttribute = 'data-scroll-restoration-id'
@@ -169,7 +154,7 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
const scroll = router._scroll
if (shouldSetupScrollRestoration) {
- scroll.restoring = true
+ scroll.e = true
}
if (isServer ?? router.isServer) {
@@ -197,8 +182,8 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
}
}
- if (shouldSetupScrollRestoration && !scroll.restoration) {
- scroll.restoration = true
+ if (shouldSetupScrollRestoration && !scroll.s) {
+ scroll.s = true
ignoreScroll = false
history.scrollRestoration = 'manual'
@@ -220,31 +205,57 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
trackedScrollTargets.clear()
})
addEventListener('pagehide', () => {
+ // Allow native restoration on reload or a later return to this entry.
+ // Reset even when entering BFCache: the cached document may be evicted.
+ // Do this first so a failing getKey/snapshot cannot leave it in manual mode.
+ history.scrollRestoration = 'auto'
+
+ // Save positions for our own restoration if a new document loads.
snapshotCurrentScrollTargets(
getKey(
router.stores.resolvedLocation.get() ?? router.stores.location.get(),
),
)
- persistScrollRestorationCache()
+ try {
+ safeSessionStorage?.setItem(
+ storageKey,
+ JSON.stringify(scrollRestorationCache),
+ )
+ } catch {
+ if (process.env.NODE_ENV !== 'production') {
+ console.warn(
+ '[ts-router] Could not persist scroll restoration state to sessionStorage.',
+ )
+ }
+ }
+ })
+
+ addEventListener('pageshow', (event) => {
+ if (event.persisted) {
+ // BFCache resumes the existing document without rerunning router setup.
+ // Reclaim restoration so the browser and router don't both control it.
+ // Fresh documents already set manual mode during setup.
+ history.scrollRestoration = 'manual'
+ }
})
}
- if (scroll.reset) {
+ if (scroll.r) {
return
}
- scroll.reset = true
+ scroll.r = true
// Restore destination scroll after the new route has rendered.
router.subscribe('onRendered', (event) => {
const behavior = router.options.scrollRestorationBehavior
const scrollToTopSelectors = router.options.scrollToTopSelectors
- const shouldResetScroll = scroll.next
- const hashNavigation = scroll.hash
+ const shouldResetScroll = scroll.n
+ const hashNavigation = scroll.h
let scrollToTopElements: Set | undefined
trackedScrollTargets.clear()
- scroll.next = true
- scroll.hash = false
+ scroll.n = true
+ scroll.h = false
if (
typeof router.options.scrollRestoration === 'function' &&
@@ -256,7 +267,7 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
const cacheKey = getKey(event.toLocation)
const fromCacheKey = event.fromLocation && getKey(event.fromLocation)
- if (scroll.restoring && fromCacheKey && fromCacheKey !== cacheKey) {
+ if (scroll.e && fromCacheKey && fromCacheKey !== cacheKey) {
const fromElementEntries = scrollRestorationCache[fromCacheKey]
if (fromElementEntries) {
@@ -309,7 +320,7 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
const skipWindowRestore =
hash && hashScrollIntoViewOptions && hashNavigation
- const elementEntries = scroll.restoring
+ const elementEntries = scroll.e
? scrollRestorationCache[cacheKey]
: undefined
diff --git a/packages/router-core/tests/scroll-restoration-lifecycle.test.ts b/packages/router-core/tests/scroll-restoration-lifecycle.test.ts
new file mode 100644
index 0000000000..e410d9aa55
--- /dev/null
+++ b/packages/router-core/tests/scroll-restoration-lifecycle.test.ts
@@ -0,0 +1,187 @@
+import { createMemoryHistory } from '@tanstack/history'
+import { afterEach, beforeEach, expect, test, vi } from 'vitest'
+import {
+ BaseRootRoute,
+ getElementScrollRestorationEntry,
+ setupScrollRestoration,
+} from '../src'
+import { createTestRouter } from './routerTestUtils'
+
+let listeners: Array<
+ [
+ Window | Document,
+ string,
+ EventListenerOrEventListenerObject,
+ boolean | AddEventListenerOptions | undefined,
+ ]
+>
+
+beforeEach(() => {
+ listeners = []
+ for (const target of [window, document]) {
+ const add = target.addEventListener.bind(target)
+ vi.spyOn(target, 'addEventListener').mockImplementation(
+ (type, listener, options) => {
+ listeners.push([target, type, listener, options])
+ add(type, listener, options)
+ },
+ )
+ }
+})
+
+afterEach(() => {
+ for (const [target, type, listener, options] of listeners) {
+ target.removeEventListener(type, listener, options)
+ }
+ document.body.replaceChildren()
+ history.scrollRestoration = 'auto'
+ vi.restoreAllMocks()
+})
+
+function createRouter(
+ options: Parameters[0] = {
+ routeTree: new BaseRootRoute({}),
+ },
+) {
+ return createTestRouter({
+ history: createMemoryHistory(),
+ scrollRestoration: true,
+ ...options,
+ })
+}
+
+test.each([false, true])(
+ 'hands off native restoration before taking a pagehide snapshot (persisted=%s)',
+ (persisted) => {
+ const modes: Array = []
+ createRouter({
+ routeTree: new BaseRootRoute({}),
+ getScrollRestorationKey: () => {
+ modes.push(history.scrollRestoration)
+ return `lifecycle-${persisted}`
+ },
+ })
+ dispatchEvent(new PageTransitionEvent('pagehide', { persisted }))
+ expect(modes).toEqual(['auto'])
+ expect(history.scrollRestoration).toBe('auto')
+ },
+)
+
+test.each([false, true])(
+ 'reclaims native restoration only for a persisted pageshow (persisted=%s)',
+ (persisted) => {
+ createRouter()
+ history.scrollRestoration = 'auto'
+ dispatchEvent(new PageTransitionEvent('pageshow', { persisted }))
+ expect(history.scrollRestoration).toBe(persisted ? 'manual' : 'auto')
+ },
+)
+
+test('still hands off native restoration when a custom key throws', () => {
+ const failure = new Error('custom scroll key failed')
+ const errors: Array = []
+ addEventListener('error', (event) => {
+ errors.push(event.error)
+ event.preventDefault()
+ })
+ createRouter({
+ routeTree: new BaseRootRoute({}),
+ getScrollRestorationKey: () => {
+ throw failure
+ },
+ })
+ dispatchEvent(new PageTransitionEvent('pagehide'))
+ expect(errors).toEqual([failure])
+ expect(history.scrollRestoration).toBe('auto')
+})
+
+test('hands off native restoration when storage persistence throws', () => {
+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})
+ vi.spyOn(Storage.prototype, 'setItem').mockImplementation(() => {
+ throw new Error('storage unavailable')
+ })
+ createRouter()
+ dispatchEvent(new PageTransitionEvent('pagehide'))
+ expect(history.scrollRestoration).toBe('auto')
+ expect(warn).toHaveBeenCalledOnce()
+})
+
+test('preserves live nested scroll snapshots across repeated hide/show cycles without repeated setup', () => {
+ const element = document.createElement('div')
+ element.dataset.scrollRestorationId = 'lifecycle-nested'
+ document.body.append(element)
+ const router = createRouter({
+ routeTree: new BaseRootRoute({}),
+ getScrollRestorationKey: () => 'lifecycle-nested',
+ })
+ setupScrollRestoration(router)
+ expect(listeners.filter(([, type]) => type === 'pageshow')).toHaveLength(1)
+ for (const scrollTop of [80, 120]) {
+ element.scrollTop = scrollTop
+ element.dispatchEvent(new Event('scroll', { bubbles: true }))
+ dispatchEvent(new PageTransitionEvent('pagehide', { persisted: true }))
+ expect(history.scrollRestoration).toBe('auto')
+ expect(
+ getElementScrollRestorationEntry(router, {
+ id: 'lifecycle-nested',
+ getKey: router.options.getScrollRestorationKey,
+ }),
+ ).toEqual({ scrollX: 0, scrollY: scrollTop })
+ dispatchEvent(new PageTransitionEvent('pageshow', { persisted: true }))
+ expect(history.scrollRestoration).toBe('manual')
+ }
+})
+
+test('leaves native restoration alone when router restoration is disabled', () => {
+ history.scrollRestoration = 'auto'
+ createRouter({ routeTree: new BaseRootRoute({}), scrollRestoration: false })
+ dispatchEvent(new PageTransitionEvent('pagehide', { persisted: true }))
+ dispatchEvent(new PageTransitionEvent('pageshow', { persisted: true }))
+ expect(history.scrollRestoration).toBe('auto')
+})
+
+test('can enable restoration after disabled setup without duplicate lifecycle listeners', () => {
+ history.scrollRestoration = 'auto'
+ const router = createRouter({
+ routeTree: new BaseRootRoute({}),
+ scrollRestoration: false,
+ getScrollRestorationKey: () => 'lifecycle-forced',
+ })
+ expect(history.scrollRestoration).toBe('auto')
+ setupScrollRestoration(router, true)
+ setupScrollRestoration(router, true)
+ expect(history.scrollRestoration).toBe('manual')
+ for (const event of ['pagehide', 'pageshow']) {
+ expect(listeners.filter(([, type]) => type === event)).toHaveLength(1)
+ }
+ const element = document.createElement('div')
+ element.dataset.scrollRestorationId = 'lifecycle-forced'
+ document.body.append(element)
+ element.scrollTop = 40
+ element.dispatchEvent(new Event('scroll', { bubbles: true }))
+ dispatchEvent(new PageTransitionEvent('pagehide', { persisted: true }))
+ expect(history.scrollRestoration).toBe('auto')
+ expect(
+ getElementScrollRestorationEntry(router, {
+ id: 'lifecycle-forced',
+ getKey: router.options.getScrollRestorationKey,
+ }),
+ ).toEqual({ scrollX: 0, scrollY: 40 })
+ dispatchEvent(new PageTransitionEvent('pageshow', { persisted: true }))
+ expect(history.scrollRestoration).toBe('manual')
+})
+
+test('does not take over browser restoration or register listeners on the server', () => {
+ history.scrollRestoration = 'auto'
+ const router = createRouter({
+ routeTree: new BaseRootRoute({}),
+ isServer: true,
+ })
+ setupScrollRestoration(router, true)
+ expect(history.scrollRestoration).toBe('auto')
+ expect(
+ listeners.filter(([, type]) =>
+ ['pagehide', 'pageshow', 'scroll'].includes(type),
+ ),
+ ).toEqual([])
+})
diff --git a/packages/router-core/tests/scroll-restoration.test.ts b/packages/router-core/tests/scroll-restoration.test.ts
index c02a8f8783..03e957e3da 100644
--- a/packages/router-core/tests/scroll-restoration.test.ts
+++ b/packages/router-core/tests/scroll-restoration.test.ts
@@ -66,10 +66,7 @@ describe('setupScrollRestoration', () => {
window.history.scrollRestoration = 'auto'
- const router = createRouter({ scrollRestoration: true })
-
- expect(router._scroll.restoring).toBe(true)
- expect(router._scroll.restoration).toBe(true)
+ createRouter({ scrollRestoration: true })
expect(window.history.scrollRestoration).toBe('manual')
expect(
windowAddEventListener.mock.calls.some(([event]) => event === 'pagehide'),
@@ -152,13 +149,7 @@ describe('setupScrollRestoration', () => {
window.history.scrollRestoration = 'auto'
- const router = createRouter(
- scrollRestoration === undefined ? {} : { scrollRestoration },
- )
-
- expect(router._scroll.restoring).toBeUndefined()
- expect(router._scroll.restoration).toBeUndefined()
- expect(router._scroll.reset).toBe(true)
+ createRouter(scrollRestoration === undefined ? {} : { scrollRestoration })
expect(window.history.scrollRestoration).toBe('auto')
expect(
windowAddEventListener.mock.calls.some(
From f0e751d325c41f262c16ea9b50f4b96c587bc84a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Sun, 27 Sep 2026 16:03:11 +0200
Subject: [PATCH 020/127] ci: Version Packages (#8497)
ci: changeset release
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
.changeset/brown-dots-grab.md | 7 --
.changeset/bump-seroval-1-6-7.md | 9 --
.changeset/hungry-cooks-go.md | 5 -
.changeset/retire-invalidated-reservations.md | 5 -
.changeset/shaky-nights-flash.md | 5 -
.changeset/start-middleware-registration.md | 5 -
.../package.json | 4 +-
.../react/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../react/basic-devtools-panel/package.json | 2 +-
examples/react/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-react-query-file-based/package.json | 4 +-
examples/react/basic-react-query/package.json | 2 +-
.../react/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/basic/package.json | 2 +-
examples/react/deferred-data/package.json | 2 +-
examples/react/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-react-query/package.json | 2 +-
examples/react/kitchen-sink/package.json | 2 +-
examples/react/large-file-based/package.json | 4 +-
examples/react/location-masking/package.json | 2 +-
.../react/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../react/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/quickstart/package.json | 2 +-
.../router-monorepo-react-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/react/start-bare/package.json | 4 +-
examples/react/start-basic-auth/package.json | 4 +-
.../react/start-basic-authjs/package.json | 4 +-
.../react/start-basic-cloudflare/package.json | 4 +-
.../start-basic-react-query/package.json | 4 +-
.../react/start-basic-rsbuild/package.json | 4 +-
.../react/start-basic-static/package.json | 6 +-
examples/react/start-basic/package.json | 4 +-
examples/react/start-bun/package.json | 6 +-
examples/react/start-clerk-basic/package.json | 4 +-
.../react/start-convex-trellaux/package.json | 4 +-
examples/react/start-counter/package.json | 4 +-
.../react/start-i18n-paraglide/package.json | 4 +-
examples/react/start-large/package.json | 4 +-
examples/react/start-material-ui/package.json | 4 +-
.../react/start-next-migration/package.json | 4 +-
examples/react/start-rscs/package.json | 4 +-
.../package.json | 4 +-
.../react/start-supabase-basic/package.json | 4 +-
examples/react/start-tailwind-v4/package.json | 4 +-
examples/react/start-trellaux/package.json | 4 +-
examples/react/start-workos/package.json | 4 +-
examples/react/view-transitions/package.json | 4 +-
.../react/with-framer-motion/package.json | 2 +-
.../react/with-trpc-react-query/package.json | 4 +-
examples/react/with-trpc/package.json | 4 +-
.../package.json | 4 +-
.../solid/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../solid/basic-devtools-panel/package.json | 2 +-
examples/solid/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-solid-query-file-based/package.json | 4 +-
examples/solid/basic-solid-query/package.json | 4 +-
.../solid/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/basic/package.json | 2 +-
examples/solid/deferred-data/package.json | 2 +-
examples/solid/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-solid-query/package.json | 2 +-
examples/solid/kitchen-sink/package.json | 2 +-
examples/solid/large-file-based/package.json | 4 +-
examples/solid/location-masking/package.json | 2 +-
.../solid/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../solid/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/quickstart/package.json | 2 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-solid-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/solid/start-basic-auth/package.json | 4 +-
.../solid/start-basic-authjs/package.json | 4 +-
.../solid/start-basic-cloudflare/package.json | 4 +-
.../solid/start-basic-netlify/package.json | 4 +-
examples/solid/start-basic-nitro/package.json | 4 +-
.../start-basic-solid-query/package.json | 4 +-
.../solid/start-basic-static/package.json | 6 +-
examples/solid/start-basic/package.json | 4 +-
examples/solid/start-bun/package.json | 6 +-
.../start-convex-better-auth/package.json | 4 +-
examples/solid/start-counter/package.json | 4 +-
.../solid/start-i18n-paraglide/package.json | 4 +-
examples/solid/start-large/package.json | 4 +-
.../package.json | 4 +-
.../solid/start-supabase-basic/package.json | 4 +-
examples/solid/start-tailwind-v4/package.json | 4 +-
examples/solid/view-transitions/package.json | 4 +-
.../solid/with-framer-motion/package.json | 2 +-
examples/solid/with-trpc/package.json | 4 +-
.../vue/basic-file-based-jsx/package.json | 4 +-
.../vue/basic-file-based-sfc/package.json | 4 +-
examples/vue/basic/package.json | 2 +-
packages/react-router/CHANGELOG.md | 9 ++
packages/react-router/package.json | 2 +-
packages/react-start-client/CHANGELOG.md | 9 ++
packages/react-start-client/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 11 ++
packages/react-start-rsc/package.json | 2 +-
packages/react-start-server/CHANGELOG.md | 9 ++
packages/react-start-server/package.json | 2 +-
packages/react-start/CHANGELOG.md | 13 +++
packages/react-start/package.json | 2 +-
packages/router-cli/CHANGELOG.md | 7 ++
packages/router-cli/package.json | 2 +-
packages/router-core/CHANGELOG.md | 10 ++
packages/router-core/package.json | 2 +-
packages/router-generator/CHANGELOG.md | 7 ++
packages/router-generator/package.json | 2 +-
packages/router-plugin/CHANGELOG.md | 9 ++
packages/router-plugin/package.json | 2 +-
packages/router-vite-plugin/CHANGELOG.md | 7 ++
packages/router-vite-plugin/package.json | 2 +-
packages/solid-router/CHANGELOG.md | 9 ++
packages/solid-router/package.json | 2 +-
packages/solid-start-client/CHANGELOG.md | 9 ++
packages/solid-start-client/package.json | 2 +-
packages/solid-start-server/CHANGELOG.md | 9 ++
packages/solid-start-server/package.json | 2 +-
packages/solid-start/CHANGELOG.md | 12 +++
packages/solid-start/package.json | 2 +-
packages/start-client-core/CHANGELOG.md | 12 +++
packages/start-client-core/package.json | 2 +-
packages/start-plugin-core/CHANGELOG.md | 12 +++
packages/start-plugin-core/package.json | 2 +-
packages/start-server-core/CHANGELOG.md | 13 +++
packages/start-server-core/package.json | 2 +-
.../CHANGELOG.md | 11 ++
.../package.json | 2 +-
packages/start-storage-context/CHANGELOG.md | 7 ++
packages/start-storage-context/package.json | 2 +-
packages/vue-router/CHANGELOG.md | 9 ++
packages/vue-router/package.json | 2 +-
packages/vue-start-client/CHANGELOG.md | 9 ++
packages/vue-start-client/package.json | 2 +-
packages/vue-start-server/CHANGELOG.md | 9 ++
packages/vue-start-server/package.json | 2 +-
packages/vue-start/CHANGELOG.md | 12 +++
packages/vue-start/package.json | 2 +-
pnpm-lock.yaml | 102 +++++++++---------
171 files changed, 512 insertions(+), 324 deletions(-)
delete mode 100644 .changeset/brown-dots-grab.md
delete mode 100644 .changeset/bump-seroval-1-6-7.md
delete mode 100644 .changeset/hungry-cooks-go.md
delete mode 100644 .changeset/retire-invalidated-reservations.md
delete mode 100644 .changeset/shaky-nights-flash.md
delete mode 100644 .changeset/start-middleware-registration.md
diff --git a/.changeset/brown-dots-grab.md b/.changeset/brown-dots-grab.md
deleted file mode 100644
index d43d6e6a28..0000000000
--- a/.changeset/brown-dots-grab.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-'@tanstack/react-router': patch
-'@tanstack/solid-router': patch
-'@tanstack/vue-router': patch
----
-
-Skip unused Link preload cleanup when preloading is disabled and ignore queued viewport notifications after their effect has been cleaned up.
diff --git a/.changeset/bump-seroval-1-6-7.md b/.changeset/bump-seroval-1-6-7.md
deleted file mode 100644
index 0d20f7c116..0000000000
--- a/.changeset/bump-seroval-1-6-7.md
+++ /dev/null
@@ -1,9 +0,0 @@
----
-'@tanstack/router-core': patch
-'@tanstack/start-client-core': patch
-'@tanstack/start-server-core': patch
-'@tanstack/start-plugin-core': patch
-'@tanstack/start-static-server-functions': patch
----
-
-Update `seroval` and `seroval-plugins` from 1.6.2 to 1.6.7. This picks up the typed array length guard, the `maxBase64Length` and `compactArrayBufferViews` options, and the `isStream` export.
diff --git a/.changeset/hungry-cooks-go.md b/.changeset/hungry-cooks-go.md
deleted file mode 100644
index 5bf60c3afc..0000000000
--- a/.changeset/hungry-cooks-go.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/start-server-core': patch
----
-
-Apply route path parameter parsers, including parent-route parsers, before invoking server route handlers so runtime parameters agree with their inferred types.
diff --git a/.changeset/retire-invalidated-reservations.md b/.changeset/retire-invalidated-reservations.md
deleted file mode 100644
index ed37b81e13..0000000000
--- a/.changeset/retire-invalidated-reservations.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/router-core': patch
----
-
-Abort reserved loader generations with no remaining owners when invalidation removes them from discovery, ensuring their public abort signals are retired.
diff --git a/.changeset/shaky-nights-flash.md b/.changeset/shaky-nights-flash.md
deleted file mode 100644
index 80aff4b26a..0000000000
--- a/.changeset/shaky-nights-flash.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/router-core': patch
----
-
-Hand native scroll restoration back to the browser on pagehide, including entries entering BFCache, and reclaim manual restoration when a cached document resumes.
diff --git a/.changeset/start-middleware-registration.md b/.changeset/start-middleware-registration.md
deleted file mode 100644
index a8a8e30b27..0000000000
--- a/.changeset/start-middleware-registration.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/start-client-core': patch
----
-
-Avoid an unused array when registering server-function middleware.
diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json
index 73fa665077..09b7ea7ed2 100644
--- a/examples/react/authenticated-routes-firebase/package.json
+++ b/examples/react/authenticated-routes-firebase/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"firebase": "^11.4.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index b958329866..1f66c97c21 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index b3d020db16..0ea069260d 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-devtools-panel/package.json b/examples/react/basic-devtools-panel/package.json
index 9cb9638a8d..ff86384aac 100644
--- a/examples/react/basic-devtools-panel/package.json
+++ b/examples/react/basic-devtools-panel/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.67.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index 317d8378c8..40710c347f 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-non-nested-devtools/package.json b/examples/react/basic-non-nested-devtools/package.json
index a8dfcdc76b..2910358d80 100644
--- a/examples/react/basic-non-nested-devtools/package.json
+++ b/examples/react/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 623ad075d4..1b1da5c22f 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index 64eea90b33..7d7ede1a55 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 6bbdac76b1..621311c997 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/react-router": "^1.170.40",
+ "@tanstack/router-plugin": "^1.168.41",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index a72fa5c3f8..43aa8c8f7c 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/react-router": "^1.170.40",
+ "@tanstack/router-plugin": "^1.168.41",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index 9881a1a322..e75bb75988 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index 157c32c0a9..f0c6db9217 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 460cae32f4..5ce1c929cb 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index 02d9aeffd9..6ed9b61c60 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json
index 014a0f2378..25e1258efc 100644
--- a/examples/react/i18n-paraglide/package.json
+++ b/examples/react/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/react-router": "^1.170.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index ce4bc0eec5..585b12c54e 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index ee69914c6a..b81bf11139 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index 2778c1c1e9..d1e9db300d 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index 38a99e95ba..0a4e3f60e8 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index c9eeb1c1b3..b15bb13b8b 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index 1104cdd075..c165069dac 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -12,7 +12,7 @@
"@radix-ui/react-dialog": "^1.1.6",
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index f2a8b477a5..0dd8a4f73d 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json
index f0ee7663c0..2cbb377a85 100644
--- a/examples/react/quickstart-esbuild-file-based/package.json
+++ b/examples/react/quickstart-esbuild-file-based/package.json
@@ -9,9 +9,9 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index d9b2530d1e..6ca5236b7d 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index 633269b165..b4110e08bf 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"postcss": "^8.5.1",
"react": "^19.0.0",
@@ -19,7 +19,7 @@
"devDependencies": {
"@rsbuild/core": "^2.1.0",
"@rsbuild/plugin-react": "^2.0.0",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@typescript/native": "npm:typescript@^7.0.2",
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index 1a5bd570f3..ddba5fc358 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -7,14 +7,14 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@swc/core": "^1.15.33",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"html-webpack-plugin": "^5.6.3",
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index fcd2da032a..73d131378f 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json
index 08d38884b7..de5ac60fe8 100644
--- a/examples/react/router-monorepo-react-query/package.json
+++ b/examples/react/router-monorepo-react-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-react-query/packages/router/package.json b/examples/react/router-monorepo-react-query/packages/router/package.json
index 4b3313c57e..a58b096975 100644
--- a/examples/react/router-monorepo-react-query/packages/router/package.json
+++ b/examples/react/router-monorepo-react-query/packages/router/package.json
@@ -11,8 +11,8 @@
"@router-mono-react-query/post-query": "workspace:*",
"@tanstack/history": "^1.162.4",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.39",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/react-router": "^1.170.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json
index 46f0b2e271..10dc01c314 100644
--- a/examples/react/router-monorepo-simple-lazy/package.json
+++ b/examples/react/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/package.json b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
index 96910e4f39..ba511891a9 100644
--- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/react-router": "^1.170.39",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/react-router": "^1.170.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json
index be2c12d34a..fc68e1ee9e 100644
--- a/examples/react/router-monorepo-simple/package.json
+++ b/examples/react/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json
index cb8222f91d..f6c543e8da 100644
--- a/examples/react/router-monorepo-simple/packages/router/package.json
+++ b/examples/react/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/react-router": "^1.170.39",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/react-router": "^1.170.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index 99eed8b357..325cd7d0d7 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-virtual": "^3.13.0",
"react": "^19.0.0",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 231b268bdc..67c8a90523 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index 6fa39c3423..8bf0b58659 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index af1c40f4fe..70f7d7fcdc 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index a5e58de81c..798ca34f45 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"start-authjs": "^1.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index a4d17b909b..815925fd3e 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index 54cbeeab85..bf8a6d26e9 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -13,10 +13,10 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-rsbuild/package.json b/examples/react/start-basic-rsbuild/package.json
index bb2c175c32..3065c2ba39 100644
--- a/examples/react/start-basic-rsbuild/package.json
+++ b/examples/react/start-basic-rsbuild/package.json
@@ -10,9 +10,9 @@
"start": "srvx --prod -s ../client dist/server/index.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index 3574c5cea0..94b94775ba 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
- "@tanstack/start-static-server-functions": "^1.167.37",
+ "@tanstack/react-start": "^1.168.59",
+ "@tanstack/start-static-server-functions": "^1.167.38",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 961d21451a..66d9f5987f 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index 34956d9ff6..70c2a4af09 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.58",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/react-start": "^1.168.59",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index 090593c7cc..aff3e95b30 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@clerk/tanstack-react-start": "^0.27.14",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index fb9ce5bee4..29e3494cc4 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -15,10 +15,10 @@
"@convex-dev/react-query": "0.0.0-alpha.8",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index b7dcf18aec..3508fb17f7 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index c8b714368b..b78c8e6228 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index ef3221f15d..8f9e225cf4 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index 120b5deff1..2839c9061c 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -15,9 +15,9 @@
"@emotion/styled": "11.14.0",
"@fontsource-variable/roboto": "5.2.5",
"@mui/material": "6.4.7",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-next-migration/package.json b/examples/react/start-next-migration/package.json
index 87d6633c68..c365d555a9 100644
--- a/examples/react/start-next-migration/package.json
+++ b/examples/react/start-next-migration/package.json
@@ -12,8 +12,8 @@
"test:e2e": "playwright test"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-start": "^1.168.59",
"iron-session": "^9.0.0",
"next": "16.3.4",
"react": "^19.2.3",
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index c4af666482..c00e7a55cd 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index c134912d54..06de97786e 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index 1db4e6dd6a..057e37f534 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -15,9 +15,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index b1eb226102..3828761570 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 65b0629c2b..d4a0e62951 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index 5d58c347b4..b0f95f34be 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -14,9 +14,9 @@
"license": "MIT",
"dependencies": {
"@radix-ui/themes": "^3.3.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.58",
+ "@tanstack/react-start": "^1.168.59",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json
index ee48312eb4..03715bd570 100644
--- a/examples/react/view-transitions/package.json
+++ b/examples/react/view-transitions/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index 7f6bca1157..6b2a6584f3 100644
--- a/examples/react/with-framer-motion/package.json
+++ b/examples/react/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
"framer-motion": "^11.18.2",
"react": "^19.0.0",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index 94e69c6992..3f253c17ef 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"@trpc/tanstack-react-query": "^11.4.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 13a419b0de..416d55c3fd 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.39",
+ "@tanstack/react-router": "^1.170.40",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"express": "^5.2.1",
diff --git a/examples/solid/authenticated-routes-firebase/package.json b/examples/solid/authenticated-routes-firebase/package.json
index fb32163b42..e8bed7ffe5 100644
--- a/examples/solid/authenticated-routes-firebase/package.json
+++ b/examples/solid/authenticated-routes-firebase/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"firebase": "^11.4.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/authenticated-routes/package.json b/examples/solid/authenticated-routes/package.json
index d41bbe8fb4..1b0ac9a259 100644
--- a/examples/solid/authenticated-routes/package.json
+++ b/examples/solid/authenticated-routes/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-default-search-params/package.json b/examples/solid/basic-default-search-params/package.json
index 593fa999da..7199987de4 100644
--- a/examples/solid/basic-default-search-params/package.json
+++ b/examples/solid/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-devtools-panel/package.json b/examples/solid/basic-devtools-panel/package.json
index e6193f437d..9b4105e4b5 100644
--- a/examples/solid/basic-devtools-panel/package.json
+++ b/examples/solid/basic-devtools-panel/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-file-based/package.json b/examples/solid/basic-file-based/package.json
index 38c92c9337..022ee7cd9a 100644
--- a/examples/solid/basic-file-based/package.json
+++ b/examples/solid/basic-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/basic-non-nested-devtools/package.json b/examples/solid/basic-non-nested-devtools/package.json
index 514f8faa8d..62b48a8fa5 100644
--- a/examples/solid/basic-non-nested-devtools/package.json
+++ b/examples/solid/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-solid-query-file-based/package.json b/examples/solid/basic-solid-query-file-based/package.json
index 048df25285..364b7b396b 100644
--- a/examples/solid/basic-solid-query-file-based/package.json
+++ b/examples/solid/basic-solid-query-file-based/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -21,7 +21,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/basic-solid-query/package.json b/examples/solid/basic-solid-query/package.json
index fa0095518a..92534998dd 100644
--- a/examples/solid/basic-solid-query/package.json
+++ b/examples/solid/basic-solid-query/package.json
@@ -12,14 +12,14 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/basic-ssr-file-based/package.json b/examples/solid/basic-ssr-file-based/package.json
index 550afdd0ea..8c59282b86 100644
--- a/examples/solid/basic-ssr-file-based/package.json
+++ b/examples/solid/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.41",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/solid/basic-ssr-streaming-file-based/package.json b/examples/solid/basic-ssr-streaming-file-based/package.json
index 800cf861be..881ae633c1 100644
--- a/examples/solid/basic-ssr-streaming-file-based/package.json
+++ b/examples/solid/basic-ssr-streaming-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"compression": "^1.8.0",
"express": "^5.2.1",
@@ -24,7 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@types/express": "^5.0.6",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
diff --git a/examples/solid/basic-virtual-file-based/package.json b/examples/solid/basic-virtual-file-based/package.json
index b9c3d08b57..abd6208dec 100644
--- a/examples/solid/basic-virtual-file-based/package.json
+++ b/examples/solid/basic-virtual-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic-virtual-inside-file-based/package.json b/examples/solid/basic-virtual-inside-file-based/package.json
index 8ba2b8fdd3..e4643a6d24 100644
--- a/examples/solid/basic-virtual-inside-file-based/package.json
+++ b/examples/solid/basic-virtual-inside-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json
index dcf218133f..b1c7e55471 100644
--- a/examples/solid/basic/package.json
+++ b/examples/solid/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/deferred-data/package.json b/examples/solid/deferred-data/package.json
index 1d41485ce5..0a41821b81 100644
--- a/examples/solid/deferred-data/package.json
+++ b/examples/solid/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/i18n-paraglide/package.json b/examples/solid/i18n-paraglide/package.json
index 2339c231d0..51baa39b13 100644
--- a/examples/solid/i18n-paraglide/package.json
+++ b/examples/solid/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.41",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/kitchen-sink-file-based/package.json b/examples/solid/kitchen-sink-file-based/package.json
index 4ccb19acf9..1b3fb511b1 100644
--- a/examples/solid/kitchen-sink-file-based/package.json
+++ b/examples/solid/kitchen-sink-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
@@ -19,7 +19,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/kitchen-sink-solid-query-file-based/package.json b/examples/solid/kitchen-sink-solid-query-file-based/package.json
index 2f5ea8865d..e3ba18f052 100644
--- a/examples/solid/kitchen-sink-solid-query-file-based/package.json
+++ b/examples/solid/kitchen-sink-solid-query-file-based/package.json
@@ -10,10 +10,10 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink-solid-query/package.json b/examples/solid/kitchen-sink-solid-query/package.json
index 5bcb646548..0182cb34c2 100644
--- a/examples/solid/kitchen-sink-solid-query/package.json
+++ b/examples/solid/kitchen-sink-solid-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink/package.json b/examples/solid/kitchen-sink/package.json
index 46947c2b26..100685148b 100644
--- a/examples/solid/kitchen-sink/package.json
+++ b/examples/solid/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/large-file-based/package.json b/examples/solid/large-file-based/package.json
index 6758f5a9f5..a4da1300fe 100644
--- a/examples/solid/large-file-based/package.json
+++ b/examples/solid/large-file-based/package.json
@@ -12,9 +12,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/location-masking/package.json b/examples/solid/location-masking/package.json
index 125acad2e8..a5a8aaa55f 100644
--- a/examples/solid/location-masking/package.json
+++ b/examples/solid/location-masking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/navigation-blocking/package.json b/examples/solid/navigation-blocking/package.json
index 65b2d23073..8e4c9ce263 100644
--- a/examples/solid/navigation-blocking/package.json
+++ b/examples/solid/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/quickstart-esbuild-file-based/package.json b/examples/solid/quickstart-esbuild-file-based/package.json
index c4021965a8..b2b846492d 100644
--- a/examples/solid/quickstart-esbuild-file-based/package.json
+++ b/examples/solid/quickstart-esbuild-file-based/package.json
@@ -9,8 +9,8 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/quickstart-file-based/package.json b/examples/solid/quickstart-file-based/package.json
index 1a1115bc0f..6b655f1ee1 100644
--- a/examples/solid/quickstart-file-based/package.json
+++ b/examples/solid/quickstart-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/quickstart-rspack-file-based/package.json b/examples/solid/quickstart-rspack-file-based/package.json
index f913bce56c..e58f521ba3 100644
--- a/examples/solid/quickstart-rspack-file-based/package.json
+++ b/examples/solid/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
@@ -19,7 +19,7 @@
"@rsbuild/core": "^2.1.0",
"@rsbuild/plugin-babel": "^1.1.2",
"@rsbuild/plugin-solid": "^1.1.1",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2"
}
diff --git a/examples/solid/quickstart-webpack-file-based/package.json b/examples/solid/quickstart-webpack-file-based/package.json
index 009a7868dc..bba936a622 100644
--- a/examples/solid/quickstart-webpack-file-based/package.json
+++ b/examples/solid/quickstart-webpack-file-based/package.json
@@ -7,7 +7,7 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
@@ -15,7 +15,7 @@
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-typescript": "^7.27.1",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"babel-loader": "^10.0.0",
"babel-preset-solid": "^1.9.10",
"css-loader": "^7.1.2",
diff --git a/examples/solid/quickstart/package.json b/examples/solid/quickstart/package.json
index 245fdc3d84..c557555fd9 100644
--- a/examples/solid/quickstart/package.json
+++ b/examples/solid/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
diff --git a/examples/solid/router-monorepo-simple-lazy/package.json b/examples/solid/router-monorepo-simple-lazy/package.json
index a2175573dc..52fff0114a 100644
--- a/examples/solid/router-monorepo-simple-lazy/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
index 78e91a4028..5f28049d68 100644
--- a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/solid-router": "^1.170.36",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.41",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-simple/package.json b/examples/solid/router-monorepo-simple/package.json
index 8f576eacf3..87a60b7782 100644
--- a/examples/solid/router-monorepo-simple/package.json
+++ b/examples/solid/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple/packages/router/package.json b/examples/solid/router-monorepo-simple/packages/router/package.json
index b9b3720826..ea825b7076 100644
--- a/examples/solid/router-monorepo-simple/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/solid-router": "^1.170.36",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.41",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-solid-query/package.json b/examples/solid/router-monorepo-solid-query/package.json
index 36cc5941d3..60e781abd4 100644
--- a/examples/solid/router-monorepo-solid-query/package.json
+++ b/examples/solid/router-monorepo-solid-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-solid-query/packages/router/package.json b/examples/solid/router-monorepo-solid-query/packages/router/package.json
index 1a47601e63..11e27b2f39 100644
--- a/examples/solid/router-monorepo-solid-query/packages/router/package.json
+++ b/examples/solid/router-monorepo-solid-query/packages/router/package.json
@@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/history": "^1.162.4",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.36",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.41",
"@router-solid-mono-solid-query/post-query": "workspace:*",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
diff --git a/examples/solid/scroll-restoration/package.json b/examples/solid/scroll-restoration/package.json
index 5e5989b07b..66c90340e9 100644
--- a/examples/solid/scroll-restoration/package.json
+++ b/examples/solid/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-virtual": "^3.13.0",
"solid-js": "^1.9.10",
diff --git a/examples/solid/search-validator-adapters/package.json b/examples/solid/search-validator-adapters/package.json
index 3694a57636..437f9b5a05 100644
--- a/examples/solid/search-validator-adapters/package.json
+++ b/examples/solid/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/router-plugin": "^1.168.41",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json
index 6d447f50e7..f1dc374ff1 100644
--- a/examples/solid/start-basic-auth/package.json
+++ b/examples/solid/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json
index 679723e9de..af3c5ea0a9 100644
--- a/examples/solid/start-basic-authjs/package.json
+++ b/examples/solid/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.10",
"start-authjs": "^1.0.0",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json
index d42bf4f2cd..d5c5709181 100644
--- a/examples/solid/start-basic-cloudflare/package.json
+++ b/examples/solid/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json
index eb5509fe35..ae129053d4 100644
--- a/examples/solid/start-basic-netlify/package.json
+++ b/examples/solid/start-basic-netlify/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json
index 373f8e3f42..d40d96e2cb 100644
--- a/examples/solid/start-basic-nitro/package.json
+++ b/examples/solid/start-basic-nitro/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json
index 504fd1e767..ecd73d92c4 100644
--- a/examples/solid/start-basic-solid-query/package.json
+++ b/examples/solid/start-basic-solid-query/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-router-ssr-query": "^1.167.3",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json
index 649beed13b..5b8a5571a2 100644
--- a/examples/solid/start-basic-static/package.json
+++ b/examples/solid/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
- "@tanstack/start-static-server-functions": "^1.167.37",
+ "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/start-static-server-functions": "^1.167.38",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json
index c12b6f5245..2cc32e2a01 100644
--- a/examples/solid/start-basic/package.json
+++ b/examples/solid/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json
index 9a8122e752..00c9e74977 100644
--- a/examples/solid/start-bun/package.json
+++ b/examples/solid/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-router-ssr-query": "^1.167.3",
- "@tanstack/solid-start": "^1.168.55",
- "@tanstack/router-plugin": "^1.168.40",
+ "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/router-plugin": "^1.168.41",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/start-convex-better-auth/package.json b/examples/solid/start-convex-better-auth/package.json
index 60881b59ad..8e3e77ecc7 100644
--- a/examples/solid/start-convex-better-auth/package.json
+++ b/examples/solid/start-convex-better-auth/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@convex-dev/better-auth": "^0.9.7",
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"better-auth": "^1.6.19",
"clsx": "^2.1.1",
"convex": "^1.28.2",
diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json
index 957831f21b..202c2eab5a 100644
--- a/examples/solid/start-counter/package.json
+++ b/examples/solid/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json
index 29a01c3200..304f36d516 100644
--- a/examples/solid/start-i18n-paraglide/package.json
+++ b/examples/solid/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-large/package.json b/examples/solid/start-large/package.json
index 7493ce627d..0e1ea333fb 100644
--- a/examples/solid/start-large/package.json
+++ b/examples/solid/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-streaming-data-from-server-functions/package.json b/examples/solid/start-streaming-data-from-server-functions/package.json
index 48cdbea77c..dc20fa777c 100644
--- a/examples/solid/start-streaming-data-from-server-functions/package.json
+++ b/examples/solid/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.10",
"zod": "^4.4.3"
},
diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json
index 17fe16afb9..3a1b92f76c 100644
--- a/examples/solid/start-supabase-basic/package.json
+++ b/examples/solid/start-supabase-basic/package.json
@@ -14,9 +14,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.9",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/start-tailwind-v4/package.json b/examples/solid/start-tailwind-v4/package.json
index 4947a8d930..4578e7001c 100644
--- a/examples/solid/start-tailwind-v4/package.json
+++ b/examples/solid/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.55",
+ "@tanstack/solid-start": "^1.168.56",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
"zod": "^4.4.3"
diff --git a/examples/solid/view-transitions/package.json b/examples/solid/view-transitions/package.json
index 3dd5928a94..54e1ab07ab 100644
--- a/examples/solid/view-transitions/package.json
+++ b/examples/solid/view-transitions/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-framer-motion/package.json b/examples/solid/with-framer-motion/package.json
index 194710dfd2..b4b271c63f 100644
--- a/examples/solid/with-framer-motion/package.json
+++ b/examples/solid/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-trpc/package.json b/examples/solid/with-trpc/package.json
index 0265148af4..8a52f09805 100644
--- a/examples/solid/with-trpc/package.json
+++ b/examples/solid/with-trpc/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/solid-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.37",
"@tanstack/solid-router-devtools": "^1.167.2",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
diff --git a/examples/vue/basic-file-based-jsx/package.json b/examples/vue/basic-file-based-jsx/package.json
index 28bd94e7a4..e9891e1f43 100644
--- a/examples/vue/basic-file-based-jsx/package.json
+++ b/examples/vue/basic-file-based-jsx/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/vue-router": "^1.170.35",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/vue-router": "^1.170.36",
"@tanstack/vue-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic-file-based-sfc/package.json b/examples/vue/basic-file-based-sfc/package.json
index f8df778961..5c698cced8 100644
--- a/examples/vue/basic-file-based-sfc/package.json
+++ b/examples/vue/basic-file-based-sfc/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.40",
- "@tanstack/vue-router": "^1.170.35",
+ "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/vue-router": "^1.170.36",
"@tanstack/vue-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json
index 3d4169db70..b1695cffd6 100644
--- a/examples/vue/basic/package.json
+++ b/examples/vue/basic/package.json
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
- "@tanstack/vue-router": "^1.170.35",
+ "@tanstack/vue-router": "^1.170.36",
"@tanstack/vue-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"vue": "^3.5.13",
diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md
index 9d0d463bc3..0cbde261ce 100644
--- a/packages/react-router/CHANGELOG.md
+++ b/packages/react-router/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-router
+## 1.170.40
+
+### Patch Changes
+
+- [#8436](https://github.com/TanStack/router/pull/8436) [`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676) - Skip unused Link preload cleanup when preloading is disabled and ignore queued viewport notifications after their effect has been cleaned up.
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/router-core@1.171.33
+
## 1.170.39
### Patch Changes
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index a1cc6e0f2e..cb7d24b359 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-router",
- "version": "1.170.39",
+ "version": "1.170.40",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-client/CHANGELOG.md b/packages/react-start-client/CHANGELOG.md
index 1155719836..05d493cad2 100644
--- a/packages/react-start-client/CHANGELOG.md
+++ b/packages/react-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-start-client
+## 1.168.38
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/react-router@1.170.40
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-client-core@1.170.33
+
## 1.168.37
### Patch Changes
diff --git a/packages/react-start-client/package.json b/packages/react-start-client/package.json
index 0a60883f1f..1ba7594f6d 100644
--- a/packages/react-start-client/package.json
+++ b/packages/react-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-client",
- "version": "1.168.37",
+ "version": "1.168.38",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index 7867be3565..0eac4439fd 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,16 @@
# @tanstack/react-start-rsc
+## 0.1.58
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/react-router@1.170.40
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-client-core@1.170.33
+ - @tanstack/start-plugin-core@1.171.48
+ - @tanstack/start-storage-context@1.167.35
+
## 0.1.57
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index f698c78588..9cd7d0ee29 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.57",
+ "version": "0.1.58",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-server/CHANGELOG.md b/packages/react-start-server/CHANGELOG.md
index 857ed88089..370829a92b 100644
--- a/packages/react-start-server/CHANGELOG.md
+++ b/packages/react-start-server/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-start-server
+## 1.167.45
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/react-router@1.170.40
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-server-core@1.169.38
+
## 1.167.44
### Patch Changes
diff --git a/packages/react-start-server/package.json b/packages/react-start-server/package.json
index c756eee40f..c0d6cd06bc 100644
--- a/packages/react-start-server/package.json
+++ b/packages/react-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-server",
- "version": "1.167.44",
+ "version": "1.167.45",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index 11cf3a6c31..72f34da2cd 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,18 @@
# @tanstack/react-start
+## 1.168.59
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/react-router@1.170.40
+ - @tanstack/start-client-core@1.170.33
+ - @tanstack/start-server-core@1.169.38
+ - @tanstack/start-plugin-core@1.171.48
+ - @tanstack/react-start-client@1.168.38
+ - @tanstack/react-start-rsc@0.1.58
+ - @tanstack/react-start-server@1.167.45
+
## 1.168.58
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index bae48b3dbe..9eb7ad03d7 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.58",
+ "version": "1.168.59",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-cli/CHANGELOG.md b/packages/router-cli/CHANGELOG.md
index 9b209808ae..0a24b5eee7 100644
--- a/packages/router-cli/CHANGELOG.md
+++ b/packages/router-cli/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-cli
+## 1.167.39
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-generator@1.167.39
+
## 1.167.38
### Patch Changes
diff --git a/packages/router-cli/package.json b/packages/router-cli/package.json
index ea3a927eef..6b933f813c 100644
--- a/packages/router-cli/package.json
+++ b/packages/router-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-cli",
- "version": "1.167.38",
+ "version": "1.167.39",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-core/CHANGELOG.md b/packages/router-core/CHANGELOG.md
index 90a0e714f8..48adb2a91a 100644
--- a/packages/router-core/CHANGELOG.md
+++ b/packages/router-core/CHANGELOG.md
@@ -1,5 +1,15 @@
# @tanstack/router-core
+## 1.171.33
+
+### Patch Changes
+
+- [#8297](https://github.com/TanStack/router/pull/8297) [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f) - Update `seroval` and `seroval-plugins` from 1.6.2 to 1.6.7. This picks up the typed array length guard, the `maxBase64Length` and `compactArrayBufferViews` options, and the `isStream` export.
+
+- [#8460](https://github.com/TanStack/router/pull/8460) [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47) - Abort reserved loader generations with no remaining owners when invalidation removes them from discovery, ensuring their public abort signals are retired.
+
+- [#8519](https://github.com/TanStack/router/pull/8519) [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2) - Hand native scroll restoration back to the browser on pagehide, including entries entering BFCache, and reclaim manual restoration when a cached document resumes.
+
## 1.171.32
### Patch Changes
diff --git a/packages/router-core/package.json b/packages/router-core/package.json
index d6d9512019..b8ae269b9e 100644
--- a/packages/router-core/package.json
+++ b/packages/router-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-core",
- "version": "1.171.32",
+ "version": "1.171.33",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-generator/CHANGELOG.md b/packages/router-generator/CHANGELOG.md
index e7c4827baa..418275e2db 100644
--- a/packages/router-generator/CHANGELOG.md
+++ b/packages/router-generator/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-generator
+## 1.167.39
+
+### Patch Changes
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/router-core@1.171.33
+
## 1.167.38
### Patch Changes
diff --git a/packages/router-generator/package.json b/packages/router-generator/package.json
index 6fce1dc6e3..b27ea01b5b 100644
--- a/packages/router-generator/package.json
+++ b/packages/router-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-generator",
- "version": "1.167.38",
+ "version": "1.167.39",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-plugin/CHANGELOG.md b/packages/router-plugin/CHANGELOG.md
index 43d1808274..57357f9746 100644
--- a/packages/router-plugin/CHANGELOG.md
+++ b/packages/router-plugin/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/router-plugin
+## 1.168.41
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/react-router@1.170.40
+ - @tanstack/router-core@1.171.33
+ - @tanstack/router-generator@1.167.39
+
## 1.168.40
### Patch Changes
diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json
index 5713a7c5b0..affae0bab4 100644
--- a/packages/router-plugin/package.json
+++ b/packages/router-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-plugin",
- "version": "1.168.40",
+ "version": "1.168.41",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-vite-plugin/CHANGELOG.md b/packages/router-vite-plugin/CHANGELOG.md
index 5a902decae..be7211da3a 100644
--- a/packages/router-vite-plugin/CHANGELOG.md
+++ b/packages/router-vite-plugin/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-vite-plugin
+## 1.167.41
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-plugin@1.168.41
+
## 1.167.40
### Patch Changes
diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json
index 56cb2bb82d..cfcfd02130 100644
--- a/packages/router-vite-plugin/package.json
+++ b/packages/router-vite-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-vite-plugin",
- "version": "1.167.40",
+ "version": "1.167.41",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-router/CHANGELOG.md b/packages/solid-router/CHANGELOG.md
index 29c4793a53..5b094ae86b 100644
--- a/packages/solid-router/CHANGELOG.md
+++ b/packages/solid-router/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-router
+## 1.170.37
+
+### Patch Changes
+
+- [#8436](https://github.com/TanStack/router/pull/8436) [`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676) - Skip unused Link preload cleanup when preloading is disabled and ignore queued viewport notifications after their effect has been cleaned up.
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/router-core@1.171.33
+
## 1.170.36
### Patch Changes
diff --git a/packages/solid-router/package.json b/packages/solid-router/package.json
index a3379ba672..6e0c833e16 100644
--- a/packages/solid-router/package.json
+++ b/packages/solid-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-router",
- "version": "1.170.36",
+ "version": "1.170.37",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-client/CHANGELOG.md b/packages/solid-start-client/CHANGELOG.md
index d01ce8c871..4ac8dde2fa 100644
--- a/packages/solid-start-client/CHANGELOG.md
+++ b/packages/solid-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-start-client
+## 1.168.36
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/solid-router@1.170.37
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-client-core@1.170.33
+
## 1.168.35
### Patch Changes
diff --git a/packages/solid-start-client/package.json b/packages/solid-start-client/package.json
index 76aad8cf34..ae7c9c0fe8 100644
--- a/packages/solid-start-client/package.json
+++ b/packages/solid-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-client",
- "version": "1.168.35",
+ "version": "1.168.36",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-server/CHANGELOG.md b/packages/solid-start-server/CHANGELOG.md
index 4186f01de0..bec2966ba2 100644
--- a/packages/solid-start-server/CHANGELOG.md
+++ b/packages/solid-start-server/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-start-server
+## 1.167.43
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/solid-router@1.170.37
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-server-core@1.169.38
+
## 1.167.42
### Patch Changes
diff --git a/packages/solid-start-server/package.json b/packages/solid-start-server/package.json
index 94e1448c24..07df57429e 100644
--- a/packages/solid-start-server/package.json
+++ b/packages/solid-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-server",
- "version": "1.167.42",
+ "version": "1.167.43",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start/CHANGELOG.md b/packages/solid-start/CHANGELOG.md
index 16bf8e9704..e56a4e7ef9 100644
--- a/packages/solid-start/CHANGELOG.md
+++ b/packages/solid-start/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/solid-start
+## 1.168.56
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/solid-router@1.170.37
+ - @tanstack/start-client-core@1.170.33
+ - @tanstack/start-server-core@1.169.38
+ - @tanstack/start-plugin-core@1.171.48
+ - @tanstack/solid-start-client@1.168.36
+ - @tanstack/solid-start-server@1.167.43
+
## 1.168.55
### Patch Changes
diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json
index 7162f6edc7..91f7b707bd 100644
--- a/packages/solid-start/package.json
+++ b/packages/solid-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start",
- "version": "1.168.55",
+ "version": "1.168.56",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-client-core/CHANGELOG.md b/packages/start-client-core/CHANGELOG.md
index 521864b296..22b2a1c6d1 100644
--- a/packages/start-client-core/CHANGELOG.md
+++ b/packages/start-client-core/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/start-client-core
+## 1.170.33
+
+### Patch Changes
+
+- [#8297](https://github.com/TanStack/router/pull/8297) [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f) - Update `seroval` and `seroval-plugins` from 1.6.2 to 1.6.7. This picks up the typed array length guard, the `maxBase64Length` and `compactArrayBufferViews` options, and the `isStream` export.
+
+- [#8353](https://github.com/TanStack/router/pull/8353) [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91) - Avoid an unused array when registering server-function middleware.
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-storage-context@1.167.35
+
## 1.170.32
### Patch Changes
diff --git a/packages/start-client-core/package.json b/packages/start-client-core/package.json
index 0895675e91..55a3f56edb 100644
--- a/packages/start-client-core/package.json
+++ b/packages/start-client-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-client-core",
- "version": "1.170.32",
+ "version": "1.170.33",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-plugin-core/CHANGELOG.md b/packages/start-plugin-core/CHANGELOG.md
index 9e444715c2..bde1d3f9c8 100644
--- a/packages/start-plugin-core/CHANGELOG.md
+++ b/packages/start-plugin-core/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/start-plugin-core
+## 1.171.48
+
+### Patch Changes
+
+- [#8297](https://github.com/TanStack/router/pull/8297) [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f) - Update `seroval` and `seroval-plugins` from 1.6.2 to 1.6.7. This picks up the typed array length guard, the `maxBase64Length` and `compactArrayBufferViews` options, and the `isStream` export.
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-server-core@1.169.38
+ - @tanstack/router-generator@1.167.39
+ - @tanstack/router-plugin@1.168.41
+
## 1.171.47
### Patch Changes
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index bf1a50e694..b837c5edcc 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-plugin-core",
- "version": "1.171.47",
+ "version": "1.171.48",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-server-core/CHANGELOG.md b/packages/start-server-core/CHANGELOG.md
index a24c72469a..87db4bb072 100644
--- a/packages/start-server-core/CHANGELOG.md
+++ b/packages/start-server-core/CHANGELOG.md
@@ -1,5 +1,18 @@
# @tanstack/start-server-core
+## 1.169.38
+
+### Patch Changes
+
+- [#8297](https://github.com/TanStack/router/pull/8297) [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f) - Update `seroval` and `seroval-plugins` from 1.6.2 to 1.6.7. This picks up the typed array length guard, the `maxBase64Length` and `compactArrayBufferViews` options, and the `isStream` export.
+
+- [#8434](https://github.com/TanStack/router/pull/8434) [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94) - Apply route path parameter parsers, including parent-route parsers, before invoking server route handlers so runtime parameters agree with their inferred types.
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-client-core@1.170.33
+ - @tanstack/start-storage-context@1.167.35
+
## 1.169.37
### Patch Changes
diff --git a/packages/start-server-core/package.json b/packages/start-server-core/package.json
index 259d40b803..4587a6d3ec 100644
--- a/packages/start-server-core/package.json
+++ b/packages/start-server-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-server-core",
- "version": "1.169.37",
+ "version": "1.169.38",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-static-server-functions/CHANGELOG.md b/packages/start-static-server-functions/CHANGELOG.md
index 43421814eb..5cf90eee96 100644
--- a/packages/start-static-server-functions/CHANGELOG.md
+++ b/packages/start-static-server-functions/CHANGELOG.md
@@ -1,5 +1,16 @@
# @tanstack/start-static-server-functions
+## 1.167.38
+
+### Patch Changes
+
+- [#8297](https://github.com/TanStack/router/pull/8297) [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f) - Update `seroval` and `seroval-plugins` from 1.6.2 to 1.6.7. This picks up the typed array length guard, the `maxBase64Length` and `compactArrayBufferViews` options, and the `isStream` export.
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/start-client-core@1.170.33
+ - @tanstack/react-start@1.168.59
+ - @tanstack/solid-start@1.168.56
+
## 1.167.37
### Patch Changes
diff --git a/packages/start-static-server-functions/package.json b/packages/start-static-server-functions/package.json
index a45f2711a2..3bda76b2ad 100644
--- a/packages/start-static-server-functions/package.json
+++ b/packages/start-static-server-functions/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-static-server-functions",
- "version": "1.167.37",
+ "version": "1.167.38",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-storage-context/CHANGELOG.md b/packages/start-storage-context/CHANGELOG.md
index ec1c88fd9e..b18837c3a3 100644
--- a/packages/start-storage-context/CHANGELOG.md
+++ b/packages/start-storage-context/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/start-storage-context
+## 1.167.35
+
+### Patch Changes
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/router-core@1.171.33
+
## 1.167.34
### Patch Changes
diff --git a/packages/start-storage-context/package.json b/packages/start-storage-context/package.json
index 0d1222c6e7..47d65c1e00 100644
--- a/packages/start-storage-context/package.json
+++ b/packages/start-storage-context/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-storage-context",
- "version": "1.167.34",
+ "version": "1.167.35",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md
index 7710012185..1224692281 100644
--- a/packages/vue-router/CHANGELOG.md
+++ b/packages/vue-router/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-router
+## 1.170.36
+
+### Patch Changes
+
+- [#8436](https://github.com/TanStack/router/pull/8436) [`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676) - Skip unused Link preload cleanup when preloading is disabled and ignore queued viewport notifications after their effect has been cleaned up.
+
+- Updated dependencies [[`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/router-core@1.171.33
+
## 1.170.35
### Patch Changes
diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json
index 70f8ddc729..fa84727b2d 100644
--- a/packages/vue-router/package.json
+++ b/packages/vue-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-router",
- "version": "1.170.35",
+ "version": "1.170.36",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-client/CHANGELOG.md b/packages/vue-start-client/CHANGELOG.md
index 29b49fe1ed..eaf98f2385 100644
--- a/packages/vue-start-client/CHANGELOG.md
+++ b/packages/vue-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-start-client
+## 1.167.39
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/vue-router@1.170.36
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-client-core@1.170.33
+
## 1.167.38
### Patch Changes
diff --git a/packages/vue-start-client/package.json b/packages/vue-start-client/package.json
index 0ee21a577c..7f5a621dfb 100644
--- a/packages/vue-start-client/package.json
+++ b/packages/vue-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-client",
- "version": "1.167.38",
+ "version": "1.167.39",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-server/CHANGELOG.md b/packages/vue-start-server/CHANGELOG.md
index 7b30e9e791..d5a4218807 100644
--- a/packages/vue-start-server/CHANGELOG.md
+++ b/packages/vue-start-server/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-start-server
+## 1.167.43
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94), [`0c1b5e3`](https://github.com/TanStack/router/commit/0c1b5e38de71b7e81bbf1fd81c73ee0cd68ffe47), [`3cdd1af`](https://github.com/TanStack/router/commit/3cdd1af04b3e2d6f777797ee7bddf285318dd9d2)]:
+ - @tanstack/vue-router@1.170.36
+ - @tanstack/router-core@1.171.33
+ - @tanstack/start-server-core@1.169.38
+
## 1.167.42
### Patch Changes
diff --git a/packages/vue-start-server/package.json b/packages/vue-start-server/package.json
index 07d4f891a1..a0dd73bfc4 100644
--- a/packages/vue-start-server/package.json
+++ b/packages/vue-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-server",
- "version": "1.167.42",
+ "version": "1.167.43",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md
index 40b54afc04..60b7289a42 100644
--- a/packages/vue-start/CHANGELOG.md
+++ b/packages/vue-start/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/vue-start
+## 1.168.55
+
+### Patch Changes
+
+- Updated dependencies [[`f5ffd38`](https://github.com/TanStack/router/commit/f5ffd3884ba26778a2a8ce53b379a5bded231676), [`488d046`](https://github.com/TanStack/router/commit/488d046a907d330429e2c807ef95326dad87480f), [`e81845f`](https://github.com/TanStack/router/commit/e81845ff1e4fc66d4e4a87f086be65906f7adb94), [`76a7c0b`](https://github.com/TanStack/router/commit/76a7c0bfadb42d5f7fe7b9e1748acc7333178c91)]:
+ - @tanstack/vue-router@1.170.36
+ - @tanstack/start-client-core@1.170.33
+ - @tanstack/start-server-core@1.169.38
+ - @tanstack/start-plugin-core@1.171.48
+ - @tanstack/vue-start-client@1.167.39
+ - @tanstack/vue-start-server@1.167.43
+
## 1.168.54
### Patch Changes
diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json
index 4c962af10e..8b46cc8448 100644
--- a/packages/vue-start/package.json
+++ b/packages/vue-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start",
- "version": "1.168.54",
+ "version": "1.168.55",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 37c1206cf3..393afb1b75 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -11290,7 +11290,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11330,7 +11330,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11373,7 +11373,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11416,7 +11416,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11453,7 +11453,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11487,7 +11487,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11527,7 +11527,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11573,7 +11573,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11616,7 +11616,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11656,7 +11656,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
compression:
specifier: ^1.8.0
@@ -11699,7 +11699,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11757,7 +11757,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11800,7 +11800,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11840,7 +11840,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11880,7 +11880,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
solid-js:
specifier: 1.9.12
@@ -11914,7 +11914,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11954,7 +11954,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12003,7 +12003,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12052,7 +12052,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12098,7 +12098,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12138,7 +12138,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12175,7 +12175,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12209,7 +12209,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12240,7 +12240,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12271,7 +12271,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12311,7 +12311,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12348,7 +12348,7 @@ importers:
examples/solid/quickstart-webpack-file-based:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12412,7 +12412,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12449,7 +12449,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12492,7 +12492,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12529,7 +12529,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12572,7 +12572,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12627,7 +12627,7 @@ importers:
examples/solid/start-basic:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12682,7 +12682,7 @@ importers:
specifier: ^7.0.0
version: 7.0.0(@typescript/typescript6@6.0.2)(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12734,7 +12734,7 @@ importers:
specifier: ^0.41.1
version: 0.41.1
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12777,7 +12777,7 @@ importers:
examples/solid/start-basic-cloudflare:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12820,7 +12820,7 @@ importers:
examples/solid/start-basic-netlify:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12860,7 +12860,7 @@ importers:
examples/solid/start-basic-nitro:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12906,7 +12906,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12952,7 +12952,7 @@ importers:
examples/solid/start-basic-static:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13007,7 +13007,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13074,7 +13074,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13132,7 +13132,7 @@ importers:
examples/solid/start-counter:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13178,7 +13178,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13221,7 +13221,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13267,7 +13267,7 @@ importers:
examples/solid/start-streaming-data-from-server-functions:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13307,7 +13307,7 @@ importers:
specifier: ^2.48.1
version: 2.48.1
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13347,7 +13347,7 @@ importers:
examples/solid/start-tailwind-v4:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13396,7 +13396,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13433,7 +13433,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13476,7 +13476,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.36
+ specifier: ^1.170.37
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
From ff66a03df4816f44a48a4a37189fc4021b1c8480 Mon Sep 17 00:00:00 2001
From: Flo
Date: Sun, 27 Sep 2026 21:31:39 +0200
Subject: [PATCH 021/127] perf(react-router): consolidate root match provider
(CodSpeed experiment) (#8530)
perf(react-router): consolidate root match context provider
---
.changeset/quiet-match-provider-experiment.md | 5 ++
packages/react-router/src/Match.tsx | 18 ++--
packages/react-router/src/Matches.tsx | 40 ++++-----
.../tests/match-provider.test.tsx | 90 +++++++++++++++++++
4 files changed, 122 insertions(+), 31 deletions(-)
create mode 100644 .changeset/quiet-match-provider-experiment.md
create mode 100644 packages/react-router/tests/match-provider.test.tsx
diff --git a/.changeset/quiet-match-provider-experiment.md b/.changeset/quiet-match-provider-experiment.md
new file mode 100644
index 0000000000..81f1cc9f40
--- /dev/null
+++ b/.changeset/quiet-match-provider-experiment.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/react-router': patch
+---
+
+Consolidate the root match context provider while preserving match context in the root shell.
diff --git a/packages/react-router/src/Match.tsx b/packages/react-router/src/Match.tsx
index 1ba756053a..6d535fb3c9 100644
--- a/packages/react-router/src/Match.tsx
+++ b/packages/react-router/src/Match.tsx
@@ -123,8 +123,8 @@ function MatchView({
? ((route.options as RootRouteOptions).shellComponent ?? SafeFragment)
: SafeFragment
return (
-
-
+
+
match}
@@ -171,13 +171,13 @@ function MatchView({
-
- {(isServer ?? router.isServer) &&
- route.parentRoute?.id === rootRouteId &&
- router.options.scrollRestoration ? (
-
- ) : null}
-
+ {(isServer ?? router.isServer) &&
+ route.parentRoute?.id === rootRouteId &&
+ router.options.scrollRestoration ? (
+
+ ) : null}
+
+
)
}
diff --git a/packages/react-router/src/Matches.tsx b/packages/react-router/src/Matches.tsx
index 6dea1032f2..b7993d8ac2 100644
--- a/packages/react-router/src/Matches.tsx
+++ b/packages/react-router/src/Matches.tsx
@@ -102,28 +102,24 @@ function MatchesInner() {
const matchComponent = routeId ? : null
- return (
-
- {router.options.disableGlobalCatchBoundary ? (
- matchComponent
- ) : (
- match}
- onCatch={
- process.env.NODE_ENV !== 'production'
- ? (error) => {
- console.warn(
- `Warning: The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`,
- )
- console.warn('Warning:', error)
- }
- : undefined
- }
- >
- {matchComponent}
-
- )}
-
+ return router.options.disableGlobalCatchBoundary ? (
+ matchComponent
+ ) : (
+ match}
+ onCatch={
+ process.env.NODE_ENV !== 'production'
+ ? (error) => {
+ console.warn(
+ `Warning: The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`,
+ )
+ console.warn('Warning:', error)
+ }
+ : undefined
+ }
+ >
+ {matchComponent}
+
)
}
diff --git a/packages/react-router/tests/match-provider.test.tsx b/packages/react-router/tests/match-provider.test.tsx
new file mode 100644
index 0000000000..bc947fff05
--- /dev/null
+++ b/packages/react-router/tests/match-provider.test.tsx
@@ -0,0 +1,90 @@
+import * as React from 'react'
+import { act, cleanup, render, screen } from '@testing-library/react'
+import { renderToString } from 'react-dom/server'
+import { afterEach, expect, test } from 'vitest'
+import {
+ Outlet,
+ RouterProvider,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+ useMatch,
+} from '../src'
+
+afterEach(cleanup)
+
+function NearestMatch({ name }: { name: string }) {
+ const match = useMatch({ strict: false })
+ return {match.routeId}
+}
+
+function createTestRouter(
+ disableGlobalCatchBoundary = false,
+ isServer = false,
+) {
+ const root = createRootRoute({
+ shellComponent: function Shell({ children }) {
+ const [count, setCount] = React.useState(0)
+ return (
+
+
+ setCount(count + 1)}>Count {count}
+ {children}
+
+ )
+ },
+ component: () => (
+ <>
+
+
+ >
+ ),
+ })
+ const first = createRoute({
+ getParentRoute: () => root,
+ path: '/first',
+ component: () => ,
+ })
+ const second = createRoute({
+ getParentRoute: () => root,
+ path: '/second',
+ component: () => ,
+ })
+ return createRouter({
+ routeTree: root.addChildren([first, second]),
+ history: createMemoryHistory({ initialEntries: ['/first'] }),
+ disableGlobalCatchBoundary,
+ isServer,
+ })
+}
+
+test.each([false, true])(
+ 'shell keeps nearest match context and state across navigation (global catch disabled: %s)',
+ async (disableGlobalCatchBoundary) => {
+ const router = createTestRouter(disableGlobalCatchBoundary)
+ await router.load()
+ render( )
+ expect(await screen.findByTestId('leaf-match')).toHaveTextContent('/first')
+ expect(screen.getByTestId('shell-match')).toHaveTextContent('__root__')
+ expect(screen.getByTestId('root-match')).toHaveTextContent('__root__')
+ const shell = screen.getByTestId('shell')
+ act(() => screen.getByRole('button').click())
+ await act(async () => {
+ await router.navigate({ to: '/second' })
+ })
+ expect(screen.getByTestId('leaf-match')).toHaveTextContent('/second')
+ expect(screen.getByTestId('shell-match')).toHaveTextContent('__root__')
+ expect(screen.getByTestId('shell')).toBe(shell)
+ expect(screen.getByRole('button')).toHaveTextContent('Count 1')
+ },
+)
+
+test('server shell and nested component read their nearest match context', async () => {
+ const router = createTestRouter(false, true)
+ await router.load()
+ const html = renderToString( )
+ expect(html).toContain('data-testid="shell-match">__root__')
+ expect(html).toContain('data-testid="root-match">__root__')
+ expect(html).toContain('data-testid="leaf-match">/first')
+})
From 863c8a736b96746c56278a16c50554356f5523d1 Mon Sep 17 00:00:00 2001
From: Flo
Date: Sun, 27 Sep 2026 22:01:33 +0200
Subject: [PATCH 022/127] perf(react-router): reuse link selector results
(#8522)
* test(react-router): cover cached link selector reruns
* test(react-router): type configurable trailing slash fixture
* test(react-router): use type import in selector benchmark
* test(react-router): benchmark inactive dynamic destinations
* perf(react-router): reuse link selector results
* perf(react-router): resolve external links once per selector
* perf(react-router): shrink link state classification
* perf(react-router): shrink external link expression
* perf(react-router): shrink link state classification [Self-Healing CI Rerun]
* test(react-router): address link selector review cleanup
---------
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
---
.changeset/rude-socks-learn.md | 5 +
packages/react-router/src/link.tsx | 65 +++---
.../react-router/tests/link-selector.test.tsx | 192 ++++++++++++++++++
3 files changed, 232 insertions(+), 30 deletions(-)
create mode 100644 .changeset/rude-socks-learn.md
create mode 100644 packages/react-router/tests/link-selector.test.tsx
diff --git a/.changeset/rude-socks-learn.md b/.changeset/rude-socks-learn.md
new file mode 100644
index 0000000000..af9bf99e7b
--- /dev/null
+++ b/.changeset/rude-socks-learn.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/react-router': patch
+---
+
+Reuse Link href classification and active/inactive results across location updates while preserving live history href formatting.
diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx
index aa958ef31c..7861827719 100644
--- a/packages/react-router/src/link.tsx
+++ b/packages/react-router/src/link.tsx
@@ -290,41 +290,46 @@ export function useLinkProps<
// the subscription instead re-renders every link on every navigation, because
// the comparator only sees the location, not whether this link's output moved.
// eslint-disable-next-line react-hooks/rules-of-hooks
- const selectLinkState = React.useCallback(
- (location: ParsedLocation): LinkState => {
- const directExternalLink = resolveExternalLink(
- to,
- router.protocolAllowlist,
- )
- if (directExternalLink !== undefined) {
- return [directExternalLink ?? undefined]
- }
+ const selectLinkState = React.useMemo(() => {
+ // Direct destinations and the router's allowlist are stable for this selector.
+ const directExternalLink = resolveExternalLink(to, router.protocolAllowlist)
+ if (directExternalLink !== undefined) {
+ const state: LinkState = [directExternalLink ?? undefined]
+ return () => state
+ }
+ let inactive: LinkState | undefined
+ let active: LinkState
+
+ return (location: ParsedLocation): LinkState => {
if (!_options._fromLocation) {
dest._fromLocation = location
}
const next = router.buildLocation(dest)
- // Use publicHref - it contains the correct href for display
- // When a rewrite changes the origin, publicHref is the full URL
- // Otherwise it's the origin-stripped path
- // This avoids constructing URL objects in the hot path
- const hrefOption = getHrefOption(next, router, disabled)
- return [
- hrefOption,
- !disabled && (!hrefOption || getUrlScheme(hrefOption))
- ? undefined
- : resolveIsActive(
- location,
- next,
- stableActiveOptions,
- router.basepath,
- isHydrated,
- ),
- ]
- },
- [stableActiveOptions, disabled, isHydrated, _options, dest, router, to],
- )
+ // History formatters can depend on the current browser URL (hash history).
+ // Reuse classification and immutable results until the formatted href changes.
+ const href = getHrefOption(next, router, disabled)
+ if (!inactive || inactive[0] !== href) {
+ inactive = [
+ href,
+ // Internal/disabled links use false; external/blocked links use undefined.
+ !(disabled || (href && !getUrlScheme(href))) && undefined,
+ ]
+ active = [href, true]
+ }
+ return inactive[1] !== undefined &&
+ resolveIsActive(
+ location,
+ next,
+ stableActiveOptions,
+ router.basepath,
+ isHydrated,
+ )
+ ? active
+ : inactive
+ }
+ }, [stableActiveOptions, disabled, isHydrated, _options, dest, router, to])
// eslint-disable-next-line react-hooks/rules-of-hooks
const [href, isActive] = useSelector(
@@ -332,7 +337,7 @@ export function useLinkProps<
selectLinkState,
LINK_SELECTOR_OPTIONS,
)
- const externalLink = isActive === undefined ? href : undefined
+ const externalLink = isActive === undefined && href
const linkDisabled = disabled || href === undefined
// eslint-disable-next-line react-hooks/rules-of-hooks
diff --git a/packages/react-router/tests/link-selector.test.tsx b/packages/react-router/tests/link-selector.test.tsx
new file mode 100644
index 0000000000..eee6906265
--- /dev/null
+++ b/packages/react-router/tests/link-selector.test.tsx
@@ -0,0 +1,192 @@
+import React from 'react'
+import { act, cleanup, render, waitFor } from '@testing-library/react'
+import { afterEach, expect, test, vi } from 'vitest'
+import {
+ Link,
+ RouterContextProvider,
+ RouterProvider,
+ createHashHistory,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+} from '../src'
+
+afterEach(() => {
+ cleanup()
+ vi.restoreAllMocks()
+})
+
+async function setup(trailingSlash: 'never' | 'preserve' = 'never') {
+ const root = createRootRoute()
+ const router = createRouter({
+ routeTree: root.addChildren([
+ createRoute({ getParentRoute: () => root, path: '/posts/$id' }),
+ ]),
+ history: createMemoryHistory({ initialEntries: ['/posts/1'] }),
+ trailingSlash,
+ })
+ await router.load()
+ return router
+}
+
+test('a fixed href follows active, inactive and active-again locations', async () => {
+ const router = await setup()
+ const view = render(
+
+
+ Post
+
+ ,
+ )
+ const link = view.getByText('Post')
+ for (const [id, page, active] of [
+ ['1', 1, true],
+ ['2', 1, false],
+ ['1', 2, false],
+ ['1', 1, true],
+ ] as const) {
+ await act(() =>
+ router.navigate({ to: '/posts/$id', params: { id }, search: { page } }),
+ )
+ expect(link).toHaveAttribute('href', '/posts/1?page=1')
+ expect(link.getAttribute('aria-current')).toBe(active ? 'page' : null)
+ }
+})
+
+test('changed destination, active options and disabled props replace prepared state', async () => {
+ const router = await setup()
+ function tree(id: string, disabled = false, includeSearch = true) {
+ return (
+
+
+ Post
+
+
+ )
+ }
+ const view = render(tree('1'))
+ const link = view.getByText('Post')
+ expect(link).not.toHaveAttribute('aria-current')
+ view.rerender(tree('1', false, false))
+ expect(link).toHaveAttribute('aria-current', 'page')
+ view.rerender(tree('1', true, false))
+ expect(link).not.toHaveAttribute('href')
+ expect(link).toHaveAttribute('aria-current', 'page')
+ view.rerender(tree('2', false, false))
+ expect(link).toHaveAttribute('href', '/posts/2?page=1')
+ expect(link).not.toHaveAttribute('aria-current')
+ await act(() => router.navigate({ to: '/posts/$id', params: { id: '2' } }))
+ expect(link).toHaveAttribute('aria-current', 'page')
+})
+
+test('hash history refreshes a cached destination after the outer URL changes', async () => {
+ const original = window.location.href
+ window.history.replaceState(null, '', '/shell?outer=one#/posts/1')
+ const history = createHashHistory()
+ const root = createRootRoute({
+ component: () => (
+
+ Post
+
+ ),
+ })
+ const router = createRouter({
+ routeTree: root.addChildren([
+ createRoute({ getParentRoute: () => root, path: '/posts/$id' }),
+ ]),
+ history,
+ trailingSlash: 'never',
+ })
+ try {
+ const view = render( )
+ const link = await view.findByText('Post')
+ expect(link).toHaveAttribute('href', '/shell?outer=one#/posts/1')
+ expect(link).toHaveAttribute('aria-current', 'page')
+ act(() => {
+ window.history.replaceState(null, '', '/other?outer=two#/posts/2')
+ })
+ await waitFor(() => {
+ expect(link).toHaveAttribute('href', '/other?outer=two#/posts/1')
+ expect(link).not.toHaveAttribute('aria-current')
+ })
+ } finally {
+ cleanup()
+ history.destroy()
+ window.history.replaceState(null, '', original)
+ }
+})
+
+test.each([false, true])(
+ 'cached paths retain segment boundaries and basepaths (exact=%s)',
+ async (exact) => {
+ const router = await setup()
+ router.update({ basepath: '/app', trailingSlash: 'preserve' })
+ const view = render(
+
+
+ Post
+
+ ,
+ )
+ const link = view.getByText('Post')
+ for (const [to, active] of [
+ ['/posts/1', true],
+ ['/posts/1/details', !exact],
+ ['/posts/10', false],
+ ['/posts/1/', true],
+ ] as const) {
+ await act(() => router.navigate({ to }))
+ expect(link).toHaveAttribute('href', '/app/posts/1/')
+ expect(link.getAttribute('aria-current')).toBe(active ? 'page' : null)
+ }
+ router.update({ basepath: '/new' })
+ await act(() => router.navigate({ to: '/posts/1/' }))
+ expect(link).toHaveAttribute('href', '/new/posts/1/')
+ expect(link).toHaveAttribute('aria-current', 'page')
+ },
+)
+
+test('external classification follows changed destinations and router instances', async () => {
+ vi.spyOn(console, 'warn').mockImplementation(() => {})
+ const router = await setup()
+ router.update({ protocolAllowlist: ['https:', 'custom:'] })
+ function tree(to: string, currentRouter = router) {
+ return (
+
+ Destination
+
+ )
+ }
+ const view = render(tree('/posts/1'))
+ const link = view.getByText('Destination')
+ expect(link).toHaveAttribute('aria-current', 'page')
+ for (const to of ['https://other.example/', 'custom:post']) {
+ view.rerender(tree(to))
+ await act(() => router.navigate({ to: '/posts/$id', params: { id: '2' } }))
+ expect(link).toHaveAttribute('href', to)
+ expect(link).not.toHaveAttribute('aria-current')
+ }
+ view.rerender(tree('javascript:blocked()'))
+ await act(() => router.navigate({ to: '/posts/$id', params: { id: '1' } }))
+ expect(link).not.toHaveAttribute('href')
+ expect(link).not.toHaveAttribute('aria-current')
+ view.rerender(tree('/posts/2'))
+ await act(() => router.navigate({ to: '/posts/$id', params: { id: '2' } }))
+ expect(link).toHaveAttribute('href', '/posts/2')
+ expect(link).toHaveAttribute('aria-current', 'page')
+
+ // Each mounted router keeps its allowlist; switching routers resets the selector.
+ view.rerender(tree('custom:post'))
+ expect(link).toHaveAttribute('href', 'custom:post')
+ const otherRouter = await setup()
+ view.rerender(tree('custom:post', otherRouter))
+ expect(link).not.toHaveAttribute('href')
+ expect(link).not.toHaveAttribute('aria-current')
+})
From 60b8ad1ad00812bf966a8eeee6be238c37ddad74 Mon Sep 17 00:00:00 2001
From: Flo
Date: Sun, 27 Sep 2026 22:02:22 +0200
Subject: [PATCH 023/127] perf(react-router): omit inactive route wrapper
components (#8529)
* perf(react-router): omit inactive route wrapper components
* perf(react-router): omit inactive route wrapper components [Self-Healing CI Rerun]
---------
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
---
.changeset/calm-boundaries-flow.md | 5 +
packages/react-router/src/Match.tsx | 142 +++++++++++----------
packages/react-router/src/Matches.tsx | 13 +-
packages/react-router/src/SafeFragment.tsx | 5 -
4 files changed, 87 insertions(+), 78 deletions(-)
create mode 100644 .changeset/calm-boundaries-flow.md
delete mode 100644 packages/react-router/src/SafeFragment.tsx
diff --git a/.changeset/calm-boundaries-flow.md b/.changeset/calm-boundaries-flow.md
new file mode 100644
index 0000000000..1dbf552774
--- /dev/null
+++ b/.changeset/calm-boundaries-flow.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/react-router': patch
+---
+
+Compose only enabled route boundaries instead of rendering inactive wrapper components.
diff --git a/packages/react-router/src/Match.tsx b/packages/react-router/src/Match.tsx
index 6d535fb3c9..474a155fbf 100644
--- a/packages/react-router/src/Match.tsx
+++ b/packages/react-router/src/Match.tsx
@@ -8,7 +8,6 @@ import { CatchBoundary, ErrorComponent } from './CatchBoundary'
import { useRouter } from './useRouter'
import { CatchNotFound } from './not-found'
import { matchContext } from './matchContext'
-import { SafeFragment } from './SafeFragment'
import { renderRouteNotFound } from './renderRouteNotFound'
import { ScrollRestoration } from './scroll-restoration'
import { ClientOnly } from './ClientOnly'
@@ -103,80 +102,91 @@ function MatchView({
const resolvedNoSsr = match.ssr === false || match.ssr === 'data-only'
// A root component may render the document itself. Only place its Suspense
// boundary in pure CSR, inside an explicit shell, or when explicitly opted in.
- const ResolvedSuspenseBoundary =
+ const wrapInSuspense =
canWrapInSuspense(router, route, match.ssr) &&
(route.options.wrapInSuspense ??
pendingElement ??
((route.options.errorComponent as any)?.preload || resolvedNoSsr))
- ? React.Suspense
- : SafeFragment
- const ResolvedCatchBoundary = routeErrorComponent
- ? CatchBoundary
- : SafeFragment
-
- const ResolvedNotFoundBoundary = routeNotFoundComponent
- ? CatchNotFound
- : SafeFragment
+ let content =
+ if (resolvedNoSsr) {
+ content = {content}
+ }
+ if (routeNotFoundComponent) {
+ content = (
+ {
+ error.routeId ??= match.routeId
+ if (error.routeId !== match.routeId) {
+ throw error
+ }
+ const notFoundElement = React.createElement(
+ routeNotFoundComponent,
+ error as any,
+ )
+ return process.env.NODE_ENV !== 'production'
+ ? wrapInNonRouteComponentContext(
+ notFoundElement,
+ 'notFoundComponent',
+ )
+ : notFoundElement
+ }}
+ >
+ {content}
+
+ )
+ }
+ if (routeErrorComponent) {
+ content = (
+ match}
+ errorComponent={routeErrorComponent as any}
+ onCatch={(error, errorInfo) => {
+ // Not-found errors belong to the enclosing not-found boundary.
+ if (isNotFound(error)) {
+ error.routeId ??= match.routeId
+ throw error
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ console.warn(`Warning: Error in route match: ${match.id}`)
+ }
+ routeOnCatch?.(error, errorInfo)
+ }}
+ >
+ {content}
+
+ )
+ }
+ if (wrapInSuspense) {
+ content = (
+ {content}
+ )
+ }
+ const scrollRestoration =
+ (isServer ?? router.isServer) &&
+ route.parentRoute?.id === rootRouteId &&
+ router.options.scrollRestoration ? (
+
+ ) : null
const ShellComponent = route.isRoot
- ? ((route.options as RootRouteOptions).shellComponent ?? SafeFragment)
- : SafeFragment
+ ? (route.options as RootRouteOptions).shellComponent
+ : undefined
+
+ // The shell and route boundaries must share this match's context.
return (
-
-
- match}
- errorComponent={routeErrorComponent as any}
- onCatch={(error, errorInfo) => {
- // Forward not found errors (we don't want to show the error component for these)
- if (isNotFound(error)) {
- error.routeId ??= match.routeId
- throw error
- }
- if (process.env.NODE_ENV !== 'production') {
- console.warn(`Warning: Error in route match: ${match.id}`)
- }
- routeOnCatch?.(error, errorInfo)
- }}
- >
- {
- error.routeId ??= match.routeId
-
- if (error.routeId !== match.routeId) {
- throw error
- }
-
- const notFoundElement = React.createElement(
- routeNotFoundComponent!,
- error as any,
- )
- return process.env.NODE_ENV !== 'production'
- ? wrapInNonRouteComponentContext(
- notFoundElement,
- 'notFoundComponent',
- )
- : notFoundElement
- }}
- >
- {resolvedNoSsr ? (
-
-
-
- ) : (
-
- )}
-
-
-
- {(isServer ?? router.isServer) &&
- route.parentRoute?.id === rootRouteId &&
- router.options.scrollRestoration ? (
-
- ) : null}
-
+ {ShellComponent ? (
+
+ {content}
+ {scrollRestoration}
+
+ ) : (
+ <>
+ {content}
+ {scrollRestoration}
+ >
+ )}
)
}
diff --git a/packages/react-router/src/Matches.tsx b/packages/react-router/src/Matches.tsx
index b7993d8ac2..a20c862b23 100644
--- a/packages/react-router/src/Matches.tsx
+++ b/packages/react-router/src/Matches.tsx
@@ -11,7 +11,6 @@ import { useLayoutEffect } from './utils'
import { Transitioner, settleOwner } from './Transitioner'
import { matchContext } from './matchContext'
import { Match, renderPending } from './Match'
-import { SafeFragment } from './SafeFragment'
import type {
StructuralSharingOption,
ValidateSelected,
@@ -51,10 +50,6 @@ export function Matches() {
const pendingElement = renderPending(router, rootRoute)
- // Do not render a root Suspense during SSR or hydrating from SSR
- const ResolvedSuspense =
- (isServer ?? router.isServer) || router.ssr ? SafeFragment : React.Suspense
-
const inner = (
<>
{!(isServer ?? router.isServer) && (
@@ -67,9 +62,13 @@ export function Matches() {
t={React.useState()[1]}
/>
)}
-
+ {(isServer ?? router.isServer) || router.ssr ? (
-
+ ) : (
+
+
+
+ )}
>
)
diff --git a/packages/react-router/src/SafeFragment.tsx b/packages/react-router/src/SafeFragment.tsx
deleted file mode 100644
index 72a95bac01..0000000000
--- a/packages/react-router/src/SafeFragment.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import * as React from 'react'
-
-export function SafeFragment(props: any) {
- return <>{props.children}>
-}
From 05223c2ada4d48af4b3881f10e3b6261898b2d40 Mon Sep 17 00:00:00 2001
From: Flo
Date: Mon, 28 Sep 2026 00:07:58 +0200
Subject: [PATCH 024/127] perf(start): defer sitemap dependencies until
generation (#8533)
* perf(start): defer sitemap dependencies until generation
* Delete packages/start-plugin-core/tests/sitemap-import.test.ts
* perf(start): defer sitemap dependencies until generation [Self-Healing CI Rerun]
---------
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
---
.changeset/new-socks-judge.md | 5 ++
packages/start-plugin-core/src/post-build.ts | 2 +-
.../tests/sitemap-output.test.ts | 81 +++++++++++++++++++
3 files changed, 87 insertions(+), 1 deletion(-)
create mode 100644 .changeset/new-socks-judge.md
create mode 100644 packages/start-plugin-core/tests/sitemap-output.test.ts
diff --git a/.changeset/new-socks-judge.md b/.changeset/new-socks-judge.md
new file mode 100644
index 0000000000..db8d21cdad
--- /dev/null
+++ b/.changeset/new-socks-judge.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/start-plugin-core': patch
+---
+
+Defer sitemap and XML dependencies until sitemap generation is enabled to reduce Start plugin startup work.
diff --git a/packages/start-plugin-core/src/post-build.ts b/packages/start-plugin-core/src/post-build.ts
index 0fd2410d56..d81a49bcab 100644
--- a/packages/start-plugin-core/src/post-build.ts
+++ b/packages/start-plugin-core/src/post-build.ts
@@ -1,5 +1,4 @@
import { HEADERS } from '@tanstack/start-server-core/constants'
-import { buildSitemap } from './build-sitemap'
import type { TanStackStartOutputConfig } from './schema'
export interface StartPostBuildAdapter {
@@ -56,6 +55,7 @@ export async function postBuild({
}
if (startConfig.sitemap?.enabled) {
+ const { buildSitemap } = await import('./build-sitemap')
buildSitemap({
startConfig,
publicDir: adapter.getClientOutputDirectory(),
diff --git a/packages/start-plugin-core/tests/sitemap-output.test.ts b/packages/start-plugin-core/tests/sitemap-output.test.ts
new file mode 100644
index 0000000000..c92bf842ba
--- /dev/null
+++ b/packages/start-plugin-core/tests/sitemap-output.test.ts
@@ -0,0 +1,81 @@
+import { mkdtemp, readFile, rm } from 'node:fs/promises'
+import { tmpdir } from 'node:os'
+import path from 'node:path'
+import { describe, expect, it, vi } from 'vitest'
+import { postBuild } from '../src/post-build'
+import { parseStartConfig } from '../src/schema'
+
+describe('post-build sitemap', () => {
+ it('writes sitemap files before resolving, using pages discovered during prerendering', async () => {
+ const publicDir = await mkdtemp(path.join(tmpdir(), 'tss-sitemap-'))
+ const startConfig = parseStartConfig(
+ {
+ sitemap: { host: 'https://example.com', outputPath: 'custom.xml' },
+ prerender: { enabled: true },
+ pages: [
+ { path: '/hidden', sitemap: { exclude: true } },
+ {
+ path: '/posts?sort=a&tag=b',
+ sitemap: {
+ lastmod: '2026-01-02',
+ priority: 0,
+ changefreq: 'daily',
+ },
+ },
+ ],
+ },
+ { framework: 'react' },
+ process.cwd(),
+ )
+
+ try {
+ await postBuild({
+ startConfig,
+ adapter: {
+ getClientOutputDirectory: () => publicDir,
+ async prerender(config) {
+ await Promise.resolve()
+ config.pages.push({ path: '/discovered' })
+ },
+ },
+ })
+
+ const xml = await readFile(path.join(publicDir, 'custom.xml'), 'utf8')
+ expect(xml).toContain('')
+ expect(xml).toContain('https://example.com/posts?sort=a&tag=b')
+ expect(xml).toContain('2026-01-02 ')
+ expect(xml).toContain('0 ')
+ expect(xml).toContain('daily ')
+ expect(xml).toContain('https://example.com/discovered ')
+ expect(xml).not.toContain('/hidden')
+ const pages = JSON.parse(
+ await readFile(path.join(publicDir, 'pages.json'), 'utf8'),
+ )
+ expect(pages).toEqual({
+ pages: startConfig.pages,
+ host: 'https://example.com',
+ lastBuilt: expect.any(String),
+ })
+ } finally {
+ await rm(publicDir, { recursive: true, force: true })
+ }
+ })
+
+ it('propagates sitemap validation errors through the post-build promise', async () => {
+ await expect(
+ postBuild({
+ startConfig: parseStartConfig(
+ { sitemap: { enabled: true } },
+ { framework: 'react' },
+ process.cwd(),
+ ),
+ adapter: {
+ getClientOutputDirectory: () => '/unused',
+ prerender: vi.fn(),
+ },
+ }),
+ ).rejects.toThrow(
+ 'Sitemap host is not set and required to build the sitemap.',
+ )
+ })
+})
From 41ebd288677beacb8eb56953f5f8c26e9d33313e Mon Sep 17 00:00:00 2001
From: bkuzmanoski
Date: Mon, 28 Sep 2026 08:48:33 +1000
Subject: [PATCH 025/127] fix(start-plugin-core): use http scheme for sitemap
xmlns (#8127)
fix: use http scheme for sitemap xmlns per sitemaps.org spec
---
.changeset/eighty-shoes-flow.md | 5 +++++
packages/start-plugin-core/src/build-sitemap.ts | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 .changeset/eighty-shoes-flow.md
diff --git a/.changeset/eighty-shoes-flow.md b/.changeset/eighty-shoes-flow.md
new file mode 100644
index 0000000000..3fc449c154
--- /dev/null
+++ b/.changeset/eighty-shoes-flow.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/start-plugin-core': patch
+---
+
+fix: use http scheme for sitemap xmlns per sitemaps.org spec
diff --git a/packages/start-plugin-core/src/build-sitemap.ts b/packages/start-plugin-core/src/build-sitemap.ts
index 3eae17ca02..9d2c5c1ecd 100644
--- a/packages/start-plugin-core/src/build-sitemap.ts
+++ b/packages/start-plugin-core/src/build-sitemap.ts
@@ -202,7 +202,7 @@ export function buildSitemap({
function createXml(elementName: 'urlset' | 'sitemapindex'): XMLBuilder {
return create({ version: '1.0', encoding: 'UTF-8' })
.ele(elementName, {
- xmlns: 'https://www.sitemaps.org/schemas/sitemap/0.9',
+ xmlns: 'http://www.sitemaps.org/schemas/sitemap/0.9',
'xmlns:xhtml': 'http://www.w3.org/1999/xhtml',
})
.com(`This file was automatically generated by TanStack Start.`)
From 614bc27034c8ec98747bf305ed41d4a619640949 Mon Sep 17 00:00:00 2001
From: Flo
Date: Wed, 30 Sep 2026 12:42:07 +0200
Subject: [PATCH 026/127] chore(deps): update TanStack Store to 0.11.2 (#8568)
* chore(deps): update TanStack Store to 0.11.2
* chore(deps): regenerate Store 0.11.2 lockfile
---
.changeset/fresh-store-dependencies.md | 6 +++++
packages/react-router/package.json | 2 +-
packages/router-core/package.json | 2 +-
packages/vue-router/package.json | 2 +-
pnpm-lock.yaml | 34 +++++++++++++-------------
5 files changed, 26 insertions(+), 20 deletions(-)
create mode 100644 .changeset/fresh-store-dependencies.md
diff --git a/.changeset/fresh-store-dependencies.md b/.changeset/fresh-store-dependencies.md
new file mode 100644
index 0000000000..04b328ffac
--- /dev/null
+++ b/.changeset/fresh-store-dependencies.md
@@ -0,0 +1,6 @@
+---
+'@tanstack/react-router': patch
+'@tanstack/vue-router': patch
+---
+
+Update TanStack Store to 0.11.2 to prevent unrelated atom reads inside subscription observers from triggering extra notifications.
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index cb7d24b359..0755b40aa3 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -93,7 +93,7 @@
},
"dependencies": {
"@tanstack/history": "workspace:*",
- "@tanstack/react-store": "^0.11.0",
+ "@tanstack/react-store": "^0.11.2",
"@tanstack/router-core": "workspace:*",
"isbot": "catalog:"
},
diff --git a/packages/router-core/package.json b/packages/router-core/package.json
index b8ae269b9e..12cf13b6c6 100644
--- a/packages/router-core/package.json
+++ b/packages/router-core/package.json
@@ -188,7 +188,7 @@
"seroval-plugins": "^1.6.7"
},
"devDependencies": {
- "@tanstack/store": "^0.11.0",
+ "@tanstack/store": "^0.11.2",
"@types/node": "25.0.9",
"esbuild": "^0.27.4",
"vite": "catalog:",
diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json
index fa84727b2d..97952fa240 100644
--- a/packages/vue-router/package.json
+++ b/packages/vue-router/package.json
@@ -75,7 +75,7 @@
"dependencies": {
"@tanstack/history": "workspace:*",
"@tanstack/router-core": "workspace:*",
- "@tanstack/vue-store": "^0.11.0",
+ "@tanstack/vue-store": "^0.11.2",
"@vue/runtime-dom": "^3.5.25",
"isbot": "catalog:"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 393afb1b75..4f52909cae 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13831,8 +13831,8 @@ importers:
specifier: workspace:*
version: link:../history
'@tanstack/react-store':
- specifier: ^0.11.0
- version: 0.11.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
+ specifier: ^0.11.2
+ version: 0.11.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
'@tanstack/router-core':
specifier: workspace:*
version: link:../router-core
@@ -14350,8 +14350,8 @@ importers:
specifier: 'catalog:'
version: 0.18.4
'@tanstack/store':
- specifier: ^0.11.0
- version: 0.11.1
+ specifier: ^0.11.2
+ version: 0.11.2
'@tanstack/vite-config':
specifier: 'catalog:'
version: 0.5.2(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
@@ -15393,8 +15393,8 @@ importers:
specifier: workspace:*
version: link:../router-core
'@tanstack/vue-store':
- specifier: ^0.11.0
- version: 0.11.1(vue@3.5.25(@typescript/typescript6@6.0.2))
+ specifier: ^0.11.2
+ version: 0.11.2(vue@3.5.25(@typescript/typescript6@6.0.2))
'@vue/runtime-dom':
specifier: ^3.5.25
version: 3.5.25
@@ -22064,8 +22064,8 @@ packages:
peerDependencies:
react: ^19.2.3
- '@tanstack/react-store@0.11.1':
- resolution: {integrity: sha512-HaIGKI3YLmjBYIvy5DFDY23oNaYZIsTZfngey07Uh5iLVJgM3bIGCnZeOFOqzjFld9JHWcaHJnasD/bKoGKwJQ==}
+ '@tanstack/react-store@0.11.2':
+ resolution: {integrity: sha512-oj5O5DmiMWE+ih+SioX2ayC1kbK7d3fpLx0B75fPJr9nY3zU+hoW010yr64qXsY/9fyiLVE2bn5mGNV3owm8RQ==}
peerDependencies:
react: ^19.2.3
react-dom: ^19.2.3
@@ -22098,8 +22098,8 @@ packages:
peerDependencies:
solid-js: 1.9.12
- '@tanstack/store@0.11.1':
- resolution: {integrity: sha512-mzTOBhypOuDJAy/D8n2MfUZ1HFkXnmSETviRyhqEC8LUE7/IZQExOTxMANj3KjTofYTkFNpBY67qaVrT41YccA==}
+ '@tanstack/store@0.11.2':
+ resolution: {integrity: sha512-sJ4mjol8uQsHV0gOJzzjwXfh2Fwm+Sz0+8deqiTm4jGbMdjzNSW+xZCFm0kUa870uhd8yi+DpKnZb5Kc4apa0Q==}
'@tanstack/virtual-core@3.13.0':
resolution: {integrity: sha512-NBKJP3OIdmZY3COJdWkSonr50FMVIi+aj5ZJ7hI/DTpEKg2RMfo/KvP8A3B/zOSpMgIe52B5E2yn7rryULzA6g==}
@@ -22137,8 +22137,8 @@ packages:
'@vue/composition-api':
optional: true
- '@tanstack/vue-store@0.11.1':
- resolution: {integrity: sha512-0YmYwbiCQKhzfFTLpHybjoAVUh3GkQVYGguvGTzk/0wx0oWuni60huvRs1RqqRLJH6nig3PTYuLuQQ+X5s05gA==}
+ '@tanstack/vue-store@0.11.2':
+ resolution: {integrity: sha512-wZmkfsvc0dNvOg/Xb/a7uTPKejleI0dR3HHi0t3ZyVM/23MJ7AC0bH6C7rp2seSY4mIYo0pLLbGJGZ/UpO93Zw==}
peerDependencies:
'@vue/composition-api': ^1.2.1
vue: ^2.5.0 || ^3.0.0
@@ -36577,9 +36577,9 @@ snapshots:
'@tanstack/query-core': 5.102.0
react: 19.2.3
- '@tanstack/react-store@0.11.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
+ '@tanstack/react-store@0.11.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)':
dependencies:
- '@tanstack/store': 0.11.1
+ '@tanstack/store': 0.11.2
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
use-sync-external-store: 1.6.0(react@19.2.3)
@@ -36615,7 +36615,7 @@ snapshots:
'@tanstack/virtual-core': 3.13.12
solid-js: 1.9.12
- '@tanstack/store@0.11.1': {}
+ '@tanstack/store@0.11.2': {}
'@tanstack/virtual-core@3.13.0': {}
@@ -36707,9 +36707,9 @@ snapshots:
vue: 3.5.25(typescript@7.0.2)
vue-demi: 0.14.10(vue@3.5.25(typescript@7.0.2))
- '@tanstack/vue-store@0.11.1(vue@3.5.25(@typescript/typescript6@6.0.2))':
+ '@tanstack/vue-store@0.11.2(vue@3.5.25(@typescript/typescript6@6.0.2))':
dependencies:
- '@tanstack/store': 0.11.1
+ '@tanstack/store': 0.11.2
vue: 3.5.25(@typescript/typescript6@6.0.2)
vue-demi: 0.14.10(vue@3.5.25(@typescript/typescript6@6.0.2))
From d521abd71c69f1ff010bb3def4d417cb5fa058cb Mon Sep 17 00:00:00 2001
From: Tanner Linsley
Date: Wed, 30 Sep 2026 11:29:54 -0600
Subject: [PATCH 027/127] fix(start): align server function transport behavior
(#8573)
---
.changeset/quiet-apes-protect.md | 6 ++
.../router-core/src/ssr/handlerCallback.ts | 32 +++++++---
.../start-client-core/src/createServerFn.ts | 3 +-
.../start-server-core/src/request-response.ts | 62 ++++++++++++++-----
.../ServerFunctionSerializationAdapter.ts | 12 +++-
.../src/server-functions-handler.ts | 39 +++++++-----
6 files changed, 112 insertions(+), 42 deletions(-)
create mode 100644 .changeset/quiet-apes-protect.md
diff --git a/.changeset/quiet-apes-protect.md b/.changeset/quiet-apes-protect.md
new file mode 100644
index 0000000000..9b5f721653
--- /dev/null
+++ b/.changeset/quiet-apes-protect.md
@@ -0,0 +1,6 @@
+---
+'@tanstack/router-core': patch
+'@tanstack/start-server-core': patch
+---
+
+Align server function request and response handling.
diff --git a/packages/router-core/src/ssr/handlerCallback.ts b/packages/router-core/src/ssr/handlerCallback.ts
index c64f5c0d0c..45f3255c5b 100644
--- a/packages/router-core/src/ssr/handlerCallback.ts
+++ b/packages/router-core/src/ssr/handlerCallback.ts
@@ -14,20 +14,38 @@ export type SsrResponse =
export type HandlerCallbackResult = Response | SsrResponse
export function isSsrResponse(value: unknown): value is SsrResponse {
+ if (
+ typeof value !== 'object' ||
+ value === null ||
+ !('response' in value) ||
+ !(value.response instanceof Response) ||
+ !('serverSsrCleanup' in value)
+ ) {
+ return false
+ }
+
+ if (value.serverSsrCleanup === 'none') {
+ return true
+ }
+
return (
- typeof value === 'object' &&
- value !== null &&
- 'response' in value &&
- 'serverSsrCleanup' in value
+ value.serverSsrCleanup === 'stream' &&
+ 'dispose' in value &&
+ typeof value.dispose === 'function'
)
}
export function normalizeSsrResponse(
result: HandlerCallbackResult,
): SsrResponse {
- return isSsrResponse(result)
- ? result
- : { response: result, serverSsrCleanup: 'none' }
+ if (result instanceof Response) {
+ return { response: result, serverSsrCleanup: 'none' }
+ }
+ if (isSsrResponse(result)) {
+ return result
+ }
+
+ throw new TypeError('Expected a Response from the SSR handler')
}
function cancelResponseBody(response: Response, reason?: unknown): void {
diff --git a/packages/start-client-core/src/createServerFn.ts b/packages/start-client-core/src/createServerFn.ts
index c363fdad78..3d74619cbd 100644
--- a/packages/start-client-core/src/createServerFn.ts
+++ b/packages/start-client-core/src/createServerFn.ts
@@ -186,7 +186,8 @@ export const createServerFn: CreateServerFn = (options, __opts) => {
startContext.contextAfterGlobalMiddlewares
const ctx = {
...extractedFn,
- ...opts,
+ data: opts.data,
+ method: opts.method ?? resolvedOptions.method,
// Ensure we use the full serverFnMeta from the provider file's extractedFn
// (which has id, name, filename) rather than the partial one from SSR/client
// callers (which only has id)
diff --git a/packages/start-server-core/src/request-response.ts b/packages/start-server-core/src/request-response.ts
index 2f0456bedf..bde014a153 100644
--- a/packages/start-server-core/src/request-response.ts
+++ b/packages/start-server-core/src/request-response.ts
@@ -65,8 +65,12 @@ type HeadersWithGetSetCookie = Headers & {
type MaybePromise = T | Promise
-function isPromiseLike(value: MaybePromise): value is Promise {
- return typeof (value as Promise).then === 'function'
+function isPromiseLike(value: unknown): value is PromiseLike {
+ return (
+ (typeof value === 'object' || typeof value === 'function') &&
+ value !== null &&
+ typeof (value as PromiseLike).then === 'function'
+ )
}
function getSetCookieValues(headers: Headers): Array {
@@ -98,24 +102,43 @@ function mergeEventResponseHeaders(response: Response, event: H3Event): void {
}
}
-function attachResponseHeaders(
- value: MaybePromise,
+function finalizeResponse(value: unknown, event: H3Event): Response {
+ const response = ensureResponse(value)
+ mergeEventResponseHeaders(response, event)
+ return response
+}
+
+function finalizeMaybeResponse(
+ value: unknown,
event: H3Event,
-): MaybePromise {
+): MaybePromise {
if (isPromiseLike(value)) {
- return value.then((resolved) => {
- if (resolved instanceof Response) {
- mergeEventResponseHeaders(resolved, event)
- }
- return resolved
- })
+ return Promise.resolve(value).then(
+ (resolved) => finalizeResponse(resolved, event),
+ (error) => finalizeResponse(handleResponseError(error), event),
+ )
}
+ return finalizeResponse(value, event)
+}
+
+function ensureResponse(value: unknown): Response {
if (value instanceof Response) {
- mergeEventResponseHeaders(value, event)
+ return value
}
- return value
+ return new Response('Internal Server Error', { status: 500 })
+}
+
+function handleResponseError(error: unknown): Response {
+ if (error instanceof Response) {
+ return error
+ }
+ if (error instanceof Error) {
+ throw error
+ }
+
+ return new Response('Internal Server Error', { status: 500 })
}
export function requestHandler(
@@ -135,10 +158,15 @@ export function requestHandler(
throw error
}
- const response = eventStorage.run({ h3Event }, () =>
- handler(request, requestOpts),
- )
- return h3_toResponse(attachResponseHeaders(response, h3Event), h3Event)
+ let response: unknown
+ try {
+ response = eventStorage.run({ h3Event }, () =>
+ handler(request, requestOpts),
+ )
+ } catch (error) {
+ response = handleResponseError(error)
+ }
+ return h3_toResponse(finalizeMaybeResponse(response, h3Event), h3Event)
}
}
diff --git a/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts b/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts
index d127b253d5..96ee0b3b60 100644
--- a/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts
+++ b/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts
@@ -18,7 +18,17 @@ export const ServerFunctionSerializationAdapter = createSerializationAdapter({
// to another server function), it originates from the client and must be
// validated the same way as direct HTTP calls to server functions.
const serverFn = await getServerFnById(functionId, { origin: 'client' })
- const result = await serverFn(opts ?? {}, signal)
+ const result = await serverFn(
+ {
+ data: opts?.data,
+ context: opts?.context,
+ method: serverFn.method ?? 'GET',
+ },
+ signal,
+ )
+ if (result.error !== undefined) {
+ throw result.error
+ }
return result.result
}
return fn as never
diff --git a/packages/start-server-core/src/server-functions-handler.ts b/packages/start-server-core/src/server-functions-handler.ts
index 48922e2ab6..5288fa5de2 100644
--- a/packages/start-server-core/src/server-functions-handler.ts
+++ b/packages/start-server-core/src/server-functions-handler.ts
@@ -155,26 +155,35 @@ export const handleServerAction = async ({
}
const payload: any = payloadParam
? fromJSON(JSON.parse(payloadParam), { plugins: serovalPlugins })
- : {}
- payload.context = safeObjectMerge(payload.context, context)
- payload.method = methodUpper
- res = await action(payload)
+ : undefined
+ res = await action({
+ data: payload?.data,
+ context: safeObjectMerge(payload?.context, context),
+ method: methodUpper,
+ })
} else {
const payload: any = contentType?.includes('application/json')
? fromJSON(await request.json(), { plugins: serovalPlugins })
- : {}
- payload.context = safeObjectMerge(payload.context, context)
- payload.method = methodUpper
- res = await action(payload)
+ : undefined
+ res = await action({
+ data: payload?.data,
+ context: safeObjectMerge(payload?.context, context),
+ method: methodUpper,
+ })
}
- const unwrapped = res.result !== undefined ? res.result : res.error
+ const unwrapped = res.error !== undefined ? res.error : res.result
if (isNotFound(res)) {
res = isNotFoundResponse(res)
}
- if (!isServerFn) {
+ if (
+ !isServerFn &&
+ (unwrapped instanceof Response ||
+ unwrapped === null ||
+ typeof unwrapped !== 'object')
+ ) {
return unwrapped
}
@@ -517,12 +526,10 @@ function serializeResult(
function isNotFoundResponse(error: any) {
const { headers, ...rest } = error
-
- return new Response(JSON.stringify(rest), {
+ const response = new Response(JSON.stringify(rest), {
status: 404,
- headers: {
- 'Content-Type': 'application/json',
- ...(headers || {}),
- },
+ headers,
})
+ response.headers.set('Content-Type', 'application/json')
+ return response
}
From 57e126e99dbd86f735ead2ba98ba5e98ef0cc668 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 30 Sep 2026 11:41:29 -0600
Subject: [PATCH 028/127] ci: Version Packages (#8531)
ci: changeset release
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
.changeset/calm-boundaries-flow.md | 5 -
.changeset/eighty-shoes-flow.md | 5 -
.changeset/fresh-store-dependencies.md | 6 --
.changeset/new-socks-judge.md | 5 -
.changeset/quiet-apes-protect.md | 6 --
.changeset/quiet-match-provider-experiment.md | 5 -
.changeset/rude-socks-learn.md | 5 -
.../package.json | 4 +-
.../react/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../react/basic-devtools-panel/package.json | 2 +-
examples/react/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-react-query-file-based/package.json | 4 +-
examples/react/basic-react-query/package.json | 2 +-
.../react/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/basic/package.json | 2 +-
examples/react/deferred-data/package.json | 2 +-
examples/react/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-react-query/package.json | 2 +-
examples/react/kitchen-sink/package.json | 2 +-
examples/react/large-file-based/package.json | 4 +-
examples/react/location-masking/package.json | 2 +-
.../react/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../react/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/react/quickstart/package.json | 2 +-
.../router-monorepo-react-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../react/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/react/start-bare/package.json | 4 +-
examples/react/start-basic-auth/package.json | 4 +-
.../react/start-basic-authjs/package.json | 4 +-
.../react/start-basic-cloudflare/package.json | 4 +-
.../start-basic-react-query/package.json | 4 +-
.../react/start-basic-rsbuild/package.json | 4 +-
.../react/start-basic-static/package.json | 6 +-
examples/react/start-basic/package.json | 4 +-
examples/react/start-bun/package.json | 6 +-
examples/react/start-clerk-basic/package.json | 4 +-
.../react/start-convex-trellaux/package.json | 4 +-
examples/react/start-counter/package.json | 4 +-
.../react/start-i18n-paraglide/package.json | 4 +-
examples/react/start-large/package.json | 4 +-
examples/react/start-material-ui/package.json | 4 +-
.../react/start-next-migration/package.json | 4 +-
examples/react/start-rscs/package.json | 4 +-
.../package.json | 4 +-
.../react/start-supabase-basic/package.json | 4 +-
examples/react/start-tailwind-v4/package.json | 4 +-
examples/react/start-trellaux/package.json | 4 +-
examples/react/start-workos/package.json | 4 +-
examples/react/view-transitions/package.json | 4 +-
.../react/with-framer-motion/package.json | 2 +-
.../react/with-trpc-react-query/package.json | 4 +-
examples/react/with-trpc/package.json | 4 +-
.../package.json | 4 +-
.../solid/authenticated-routes/package.json | 4 +-
.../basic-default-search-params/package.json | 2 +-
.../solid/basic-devtools-panel/package.json | 2 +-
examples/solid/basic-file-based/package.json | 4 +-
.../basic-non-nested-devtools/package.json | 2 +-
.../basic-solid-query-file-based/package.json | 4 +-
examples/solid/basic-solid-query/package.json | 4 +-
.../solid/basic-ssr-file-based/package.json | 4 +-
.../package.json | 4 +-
.../basic-virtual-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/basic/package.json | 2 +-
examples/solid/deferred-data/package.json | 2 +-
examples/solid/i18n-paraglide/package.json | 4 +-
.../kitchen-sink-file-based/package.json | 4 +-
.../package.json | 4 +-
.../kitchen-sink-solid-query/package.json | 2 +-
examples/solid/kitchen-sink/package.json | 2 +-
examples/solid/large-file-based/package.json | 4 +-
examples/solid/location-masking/package.json | 2 +-
.../solid/navigation-blocking/package.json | 2 +-
.../package.json | 4 +-
.../solid/quickstart-file-based/package.json | 4 +-
.../quickstart-rspack-file-based/package.json | 4 +-
.../package.json | 4 +-
examples/solid/quickstart/package.json | 2 +-
.../router-monorepo-simple-lazy/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/router-monorepo-simple/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../router-monorepo-solid-query/package.json | 4 +-
.../packages/router/package.json | 4 +-
.../solid/scroll-restoration/package.json | 2 +-
.../search-validator-adapters/package.json | 4 +-
examples/solid/start-basic-auth/package.json | 4 +-
.../solid/start-basic-authjs/package.json | 4 +-
.../solid/start-basic-cloudflare/package.json | 4 +-
.../solid/start-basic-netlify/package.json | 4 +-
examples/solid/start-basic-nitro/package.json | 4 +-
.../start-basic-solid-query/package.json | 4 +-
.../solid/start-basic-static/package.json | 6 +-
examples/solid/start-basic/package.json | 4 +-
examples/solid/start-bun/package.json | 6 +-
.../start-convex-better-auth/package.json | 4 +-
examples/solid/start-counter/package.json | 4 +-
.../solid/start-i18n-paraglide/package.json | 4 +-
examples/solid/start-large/package.json | 4 +-
.../package.json | 4 +-
.../solid/start-supabase-basic/package.json | 4 +-
examples/solid/start-tailwind-v4/package.json | 4 +-
examples/solid/view-transitions/package.json | 4 +-
.../solid/with-framer-motion/package.json | 2 +-
examples/solid/with-trpc/package.json | 4 +-
.../vue/basic-file-based-jsx/package.json | 4 +-
.../vue/basic-file-based-sfc/package.json | 4 +-
examples/vue/basic/package.json | 2 +-
packages/react-router/CHANGELOG.md | 15 +++
packages/react-router/package.json | 2 +-
packages/react-start-client/CHANGELOG.md | 9 ++
packages/react-start-client/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 11 ++
packages/react-start-rsc/package.json | 2 +-
packages/react-start-server/CHANGELOG.md | 9 ++
packages/react-start-server/package.json | 2 +-
packages/react-start/CHANGELOG.md | 13 +++
packages/react-start/package.json | 2 +-
packages/router-cli/CHANGELOG.md | 7 ++
packages/router-cli/package.json | 2 +-
packages/router-core/CHANGELOG.md | 6 ++
packages/router-core/package.json | 2 +-
packages/router-generator/CHANGELOG.md | 7 ++
packages/router-generator/package.json | 2 +-
packages/router-plugin/CHANGELOG.md | 9 ++
packages/router-plugin/package.json | 2 +-
packages/router-vite-plugin/CHANGELOG.md | 7 ++
packages/router-vite-plugin/package.json | 2 +-
packages/solid-router/CHANGELOG.md | 7 ++
packages/solid-router/package.json | 2 +-
packages/solid-start-client/CHANGELOG.md | 9 ++
packages/solid-start-client/package.json | 2 +-
packages/solid-start-server/CHANGELOG.md | 9 ++
packages/solid-start-server/package.json | 2 +-
packages/solid-start/CHANGELOG.md | 12 +++
packages/solid-start/package.json | 2 +-
packages/start-client-core/CHANGELOG.md | 8 ++
packages/start-client-core/package.json | 2 +-
packages/start-plugin-core/CHANGELOG.md | 14 +++
packages/start-plugin-core/package.json | 2 +-
packages/start-server-core/CHANGELOG.md | 11 ++
packages/start-server-core/package.json | 2 +-
.../CHANGELOG.md | 9 ++
.../package.json | 2 +-
packages/start-storage-context/CHANGELOG.md | 7 ++
packages/start-storage-context/package.json | 2 +-
packages/vue-router/CHANGELOG.md | 9 ++
packages/vue-router/package.json | 2 +-
packages/vue-start-client/CHANGELOG.md | 9 ++
packages/vue-start-client/package.json | 2 +-
packages/vue-start-server/CHANGELOG.md | 9 ++
packages/vue-start-server/package.json | 2 +-
packages/vue-start/CHANGELOG.md | 12 +++
packages/vue-start/package.json | 2 +-
pnpm-lock.yaml | 102 +++++++++---------
172 files changed, 506 insertions(+), 325 deletions(-)
delete mode 100644 .changeset/calm-boundaries-flow.md
delete mode 100644 .changeset/eighty-shoes-flow.md
delete mode 100644 .changeset/fresh-store-dependencies.md
delete mode 100644 .changeset/new-socks-judge.md
delete mode 100644 .changeset/quiet-apes-protect.md
delete mode 100644 .changeset/quiet-match-provider-experiment.md
delete mode 100644 .changeset/rude-socks-learn.md
diff --git a/.changeset/calm-boundaries-flow.md b/.changeset/calm-boundaries-flow.md
deleted file mode 100644
index 1dbf552774..0000000000
--- a/.changeset/calm-boundaries-flow.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/react-router': patch
----
-
-Compose only enabled route boundaries instead of rendering inactive wrapper components.
diff --git a/.changeset/eighty-shoes-flow.md b/.changeset/eighty-shoes-flow.md
deleted file mode 100644
index 3fc449c154..0000000000
--- a/.changeset/eighty-shoes-flow.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/start-plugin-core': patch
----
-
-fix: use http scheme for sitemap xmlns per sitemaps.org spec
diff --git a/.changeset/fresh-store-dependencies.md b/.changeset/fresh-store-dependencies.md
deleted file mode 100644
index 04b328ffac..0000000000
--- a/.changeset/fresh-store-dependencies.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-'@tanstack/react-router': patch
-'@tanstack/vue-router': patch
----
-
-Update TanStack Store to 0.11.2 to prevent unrelated atom reads inside subscription observers from triggering extra notifications.
diff --git a/.changeset/new-socks-judge.md b/.changeset/new-socks-judge.md
deleted file mode 100644
index db8d21cdad..0000000000
--- a/.changeset/new-socks-judge.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/start-plugin-core': patch
----
-
-Defer sitemap and XML dependencies until sitemap generation is enabled to reduce Start plugin startup work.
diff --git a/.changeset/quiet-apes-protect.md b/.changeset/quiet-apes-protect.md
deleted file mode 100644
index 9b5f721653..0000000000
--- a/.changeset/quiet-apes-protect.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-'@tanstack/router-core': patch
-'@tanstack/start-server-core': patch
----
-
-Align server function request and response handling.
diff --git a/.changeset/quiet-match-provider-experiment.md b/.changeset/quiet-match-provider-experiment.md
deleted file mode 100644
index 81f1cc9f40..0000000000
--- a/.changeset/quiet-match-provider-experiment.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/react-router': patch
----
-
-Consolidate the root match context provider while preserving match context in the root shell.
diff --git a/.changeset/rude-socks-learn.md b/.changeset/rude-socks-learn.md
deleted file mode 100644
index af9bf99e7b..0000000000
--- a/.changeset/rude-socks-learn.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/react-router': patch
----
-
-Reuse Link href classification and active/inactive results across location updates while preserving live history href formatting.
diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json
index 09b7ea7ed2..d004ca1ef8 100644
--- a/examples/react/authenticated-routes-firebase/package.json
+++ b/examples/react/authenticated-routes-firebase/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"firebase": "^11.4.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 1f66c97c21..7a0cc86f74 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index 0ea069260d..f0bb6a799e 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-devtools-panel/package.json b/examples/react/basic-devtools-panel/package.json
index ff86384aac..78adb70017 100644
--- a/examples/react/basic-devtools-panel/package.json
+++ b/examples/react/basic-devtools-panel/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.67.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index 40710c347f..45a3b81f56 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-non-nested-devtools/package.json b/examples/react/basic-non-nested-devtools/package.json
index 2910358d80..87f10c282f 100644
--- a/examples/react/basic-non-nested-devtools/package.json
+++ b/examples/react/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 1b1da5c22f..7fa657f708 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index 7d7ede1a55..92fbe68771 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 621311c997..6298367f2e 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/router-plugin": "^1.168.42",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index 43aa8c8f7c..7fe0401001 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/router-plugin": "^1.168.42",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index e75bb75988..722e1e5435 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index f0c6db9217..f7e7840df1 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 5ce1c929cb..be0d99ea7f 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index 6ed9b61c60..c5c60c9db3 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json
index 25e1258efc..f9c5517f5f 100644
--- a/examples/react/i18n-paraglide/package.json
+++ b/examples/react/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index 585b12c54e..85ffa317d5 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index b81bf11139..36cad3b0ae 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -12,9 +12,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index d1e9db300d..6d9224d95a 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index 0a4e3f60e8..8e10ec0ae1 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"react": "^19.0.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index b15bb13b8b..78a52e2aa5 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index c165069dac..1971a8587a 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -12,7 +12,7 @@
"@radix-ui/react-dialog": "^1.1.6",
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index 0dd8a4f73d..6366890725 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json
index 2cbb377a85..bc71ef0f9d 100644
--- a/examples/react/quickstart-esbuild-file-based/package.json
+++ b/examples/react/quickstart-esbuild-file-based/package.json
@@ -9,9 +9,9 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index 6ca5236b7d..9f332b3ad0 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index b4110e08bf..43eb7e0452 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"postcss": "^8.5.1",
"react": "^19.0.0",
@@ -19,7 +19,7 @@
"devDependencies": {
"@rsbuild/core": "^2.1.0",
"@rsbuild/plugin-react": "^2.0.0",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@typescript/native": "npm:typescript@^7.0.2",
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index ddba5fc358..11bce91420 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -7,14 +7,14 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@swc/core": "^1.15.33",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"html-webpack-plugin": "^5.6.3",
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index 73d131378f..628f7c37fe 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json
index de5ac60fe8..394fa70001 100644
--- a/examples/react/router-monorepo-react-query/package.json
+++ b/examples/react/router-monorepo-react-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-react-query/packages/router/package.json b/examples/react/router-monorepo-react-query/packages/router/package.json
index a58b096975..77e00b2305 100644
--- a/examples/react/router-monorepo-react-query/packages/router/package.json
+++ b/examples/react/router-monorepo-react-query/packages/router/package.json
@@ -11,8 +11,8 @@
"@router-mono-react-query/post-query": "workspace:*",
"@tanstack/history": "^1.162.4",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.40",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json
index 10dc01c314..a0b2d9cc20 100644
--- a/examples/react/router-monorepo-simple-lazy/package.json
+++ b/examples/react/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/package.json b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
index ba511891a9..51f91b1bdb 100644
--- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/react-router": "^1.170.40",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json
index fc68e1ee9e..4d506c30ed 100644
--- a/examples/react/router-monorepo-simple/package.json
+++ b/examples/react/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json
index f6c543e8da..b4a607f882 100644
--- a/examples/react/router-monorepo-simple/packages/router/package.json
+++ b/examples/react/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/react-router": "^1.170.40",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index 325cd7d0d7..1757b8e59a 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-virtual": "^3.13.0",
"react": "^19.0.0",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 67c8a90523..c70fefb31e 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index 8bf0b58659..6db668ac66 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index 70f7d7fcdc..7e7ced3576 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index 798ca34f45..76abc1f98f 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"start-authjs": "^1.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index 815925fd3e..d3a5a81a5e 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index bf8a6d26e9..568aa7d943 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -13,10 +13,10 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-rsbuild/package.json b/examples/react/start-basic-rsbuild/package.json
index 3065c2ba39..168c78a008 100644
--- a/examples/react/start-basic-rsbuild/package.json
+++ b/examples/react/start-basic-rsbuild/package.json
@@ -10,9 +10,9 @@
"start": "srvx --prod -s ../client dist/server/index.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index 94b94775ba..fdfa825ed7 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
- "@tanstack/start-static-server-functions": "^1.167.38",
+ "@tanstack/react-start": "^1.168.60",
+ "@tanstack/start-static-server-functions": "^1.167.39",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 66d9f5987f..9da7be6f4e 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index 70c2a4af09..911b8ab47e 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.59",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/react-start": "^1.168.60",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index aff3e95b30..90991d624e 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@clerk/tanstack-react-start": "^0.27.14",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index 29e3494cc4..3e28d116fa 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -15,10 +15,10 @@
"@convex-dev/react-query": "0.0.0-alpha.8",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index 3508fb17f7..b650b73513 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index b78c8e6228..09b096be25 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/react-devtools": "^0.7.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index 8f9e225cf4..d00d93cd83 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/react-query": "^5.102.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index 2839c9061c..90c205f860 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -15,9 +15,9 @@
"@emotion/styled": "11.14.0",
"@fontsource-variable/roboto": "5.2.5",
"@mui/material": "6.4.7",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-next-migration/package.json b/examples/react/start-next-migration/package.json
index c365d555a9..6c10f9eb1b 100644
--- a/examples/react/start-next-migration/package.json
+++ b/examples/react/start-next-migration/package.json
@@ -12,8 +12,8 @@
"test:e2e": "playwright test"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/react-start": "^1.168.60",
"iron-session": "^9.0.0",
"next": "16.3.4",
"react": "^19.2.3",
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index c00e7a55cd..3fe4b24db7 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index 06de97786e..5150636f76 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index 057e37f534..a210f757eb 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -15,9 +15,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index 3828761570..d10a003749 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index d4a0e62951..3648fbebaa 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"@tanstack/react-router-ssr-query": "^1.167.3",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index b0f95f34be..f499975cf7 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -14,9 +14,9 @@
"license": "MIT",
"dependencies": {
"@radix-ui/themes": "^3.3.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/react-start": "^1.168.59",
+ "@tanstack/react-start": "^1.168.60",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json
index 03715bd570..77d36aebb8 100644
--- a/examples/react/view-transitions/package.json
+++ b/examples/react/view-transitions/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index 6b2a6584f3..4afbcb19c0 100644
--- a/examples/react/with-framer-motion/package.json
+++ b/examples/react/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
"framer-motion": "^11.18.2",
"react": "^19.0.0",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index 3f253c17ef..231cfa78ce 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-query": "^5.102.0",
"@tanstack/react-query-devtools": "^5.90.0",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"@trpc/tanstack-react-query": "^11.4.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 416d55c3fd..1802a9bc67 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/react-router": "^1.170.40",
+ "@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"express": "^5.2.1",
diff --git a/examples/solid/authenticated-routes-firebase/package.json b/examples/solid/authenticated-routes-firebase/package.json
index e8bed7ffe5..6c2a3c8c6f 100644
--- a/examples/solid/authenticated-routes-firebase/package.json
+++ b/examples/solid/authenticated-routes-firebase/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"firebase": "^11.4.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/authenticated-routes/package.json b/examples/solid/authenticated-routes/package.json
index 1b0ac9a259..0cd8c0934b 100644
--- a/examples/solid/authenticated-routes/package.json
+++ b/examples/solid/authenticated-routes/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-default-search-params/package.json b/examples/solid/basic-default-search-params/package.json
index 7199987de4..9ea4a4e70f 100644
--- a/examples/solid/basic-default-search-params/package.json
+++ b/examples/solid/basic-default-search-params/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-devtools-panel/package.json b/examples/solid/basic-devtools-panel/package.json
index 9b4105e4b5..504b5c1a72 100644
--- a/examples/solid/basic-devtools-panel/package.json
+++ b/examples/solid/basic-devtools-panel/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-file-based/package.json b/examples/solid/basic-file-based/package.json
index 022ee7cd9a..5d2d8aae0c 100644
--- a/examples/solid/basic-file-based/package.json
+++ b/examples/solid/basic-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/basic-non-nested-devtools/package.json b/examples/solid/basic-non-nested-devtools/package.json
index 62b48a8fa5..e83d0d4163 100644
--- a/examples/solid/basic-non-nested-devtools/package.json
+++ b/examples/solid/basic-non-nested-devtools/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/basic-solid-query-file-based/package.json b/examples/solid/basic-solid-query-file-based/package.json
index 364b7b396b..187d822d88 100644
--- a/examples/solid/basic-solid-query-file-based/package.json
+++ b/examples/solid/basic-solid-query-file-based/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -21,7 +21,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/basic-solid-query/package.json b/examples/solid/basic-solid-query/package.json
index 92534998dd..9984bf0e16 100644
--- a/examples/solid/basic-solid-query/package.json
+++ b/examples/solid/basic-solid-query/package.json
@@ -12,14 +12,14 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/basic-ssr-file-based/package.json b/examples/solid/basic-ssr-file-based/package.json
index 8c59282b86..42b026beee 100644
--- a/examples/solid/basic-ssr-file-based/package.json
+++ b/examples/solid/basic-ssr-file-based/package.json
@@ -11,8 +11,8 @@
"debug": "node --inspect-brk server"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.38",
+ "@tanstack/router-plugin": "^1.168.42",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/solid/basic-ssr-streaming-file-based/package.json b/examples/solid/basic-ssr-streaming-file-based/package.json
index 881ae633c1..bf5aa4efbe 100644
--- a/examples/solid/basic-ssr-streaming-file-based/package.json
+++ b/examples/solid/basic-ssr-streaming-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"compression": "^1.8.0",
"express": "^5.2.1",
@@ -24,7 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@types/express": "^5.0.6",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
diff --git a/examples/solid/basic-virtual-file-based/package.json b/examples/solid/basic-virtual-file-based/package.json
index abd6208dec..7ec4c48f5f 100644
--- a/examples/solid/basic-virtual-file-based/package.json
+++ b/examples/solid/basic-virtual-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic-virtual-inside-file-based/package.json b/examples/solid/basic-virtual-inside-file-based/package.json
index e4643a6d24..b8aadff060 100644
--- a/examples/solid/basic-virtual-inside-file-based/package.json
+++ b/examples/solid/basic-virtual-inside-file-based/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/virtual-file-routes": "^1.162.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json
index b1c7e55471..89be1c3c6d 100644
--- a/examples/solid/basic/package.json
+++ b/examples/solid/basic/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/deferred-data/package.json b/examples/solid/deferred-data/package.json
index 0a41821b81..139c02172f 100644
--- a/examples/solid/deferred-data/package.json
+++ b/examples/solid/deferred-data/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/i18n-paraglide/package.json b/examples/solid/i18n-paraglide/package.json
index 51baa39b13..efd32a9ebd 100644
--- a/examples/solid/i18n-paraglide/package.json
+++ b/examples/solid/i18n-paraglide/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.38",
+ "@tanstack/router-plugin": "^1.168.42",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/kitchen-sink-file-based/package.json b/examples/solid/kitchen-sink-file-based/package.json
index 1b3fb511b1..c0b6d196e1 100644
--- a/examples/solid/kitchen-sink-file-based/package.json
+++ b/examples/solid/kitchen-sink-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
@@ -19,7 +19,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/kitchen-sink-solid-query-file-based/package.json b/examples/solid/kitchen-sink-solid-query-file-based/package.json
index e3ba18f052..ae6308b47f 100644
--- a/examples/solid/kitchen-sink-solid-query-file-based/package.json
+++ b/examples/solid/kitchen-sink-solid-query-file-based/package.json
@@ -10,10 +10,10 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink-solid-query/package.json b/examples/solid/kitchen-sink-solid-query/package.json
index 0182cb34c2..d5d4925716 100644
--- a/examples/solid/kitchen-sink-solid-query/package.json
+++ b/examples/solid/kitchen-sink-solid-query/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/kitchen-sink/package.json b/examples/solid/kitchen-sink/package.json
index 100685148b..f5937ce601 100644
--- a/examples/solid/kitchen-sink/package.json
+++ b/examples/solid/kitchen-sink/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"immer": "^10.1.1",
"redaxios": "^0.5.1",
diff --git a/examples/solid/large-file-based/package.json b/examples/solid/large-file-based/package.json
index a4da1300fe..11f47616b1 100644
--- a/examples/solid/large-file-based/package.json
+++ b/examples/solid/large-file-based/package.json
@@ -12,9 +12,9 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/location-masking/package.json b/examples/solid/location-masking/package.json
index a5a8aaa55f..4695c1ef13 100644
--- a/examples/solid/location-masking/package.json
+++ b/examples/solid/location-masking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/navigation-blocking/package.json b/examples/solid/navigation-blocking/package.json
index 8e4c9ce263..37ce89e6a8 100644
--- a/examples/solid/navigation-blocking/package.json
+++ b/examples/solid/navigation-blocking/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1",
diff --git a/examples/solid/quickstart-esbuild-file-based/package.json b/examples/solid/quickstart-esbuild-file-based/package.json
index b2b846492d..1618a02dc1 100644
--- a/examples/solid/quickstart-esbuild-file-based/package.json
+++ b/examples/solid/quickstart-esbuild-file-based/package.json
@@ -9,8 +9,8 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/quickstart-file-based/package.json b/examples/solid/quickstart-file-based/package.json
index 6b655f1ee1..491f241f6c 100644
--- a/examples/solid/quickstart-file-based/package.json
+++ b/examples/solid/quickstart-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/quickstart-rspack-file-based/package.json b/examples/solid/quickstart-rspack-file-based/package.json
index e58f521ba3..da3ed69cca 100644
--- a/examples/solid/quickstart-rspack-file-based/package.json
+++ b/examples/solid/quickstart-rspack-file-based/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"postcss": "^8.5.1",
"solid-js": "^1.9.10",
@@ -19,7 +19,7 @@
"@rsbuild/core": "^2.1.0",
"@rsbuild/plugin-babel": "^1.1.2",
"@rsbuild/plugin-solid": "^1.1.1",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2"
}
diff --git a/examples/solid/quickstart-webpack-file-based/package.json b/examples/solid/quickstart-webpack-file-based/package.json
index bba936a622..9cf3451821 100644
--- a/examples/solid/quickstart-webpack-file-based/package.json
+++ b/examples/solid/quickstart-webpack-file-based/package.json
@@ -7,7 +7,7 @@
"build": "webpack build && tsc --noEmit"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
@@ -15,7 +15,7 @@
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-typescript": "^7.27.1",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"babel-loader": "^10.0.0",
"babel-preset-solid": "^1.9.10",
"css-loader": "^7.1.2",
diff --git a/examples/solid/quickstart/package.json b/examples/solid/quickstart/package.json
index c557555fd9..c5980947c5 100644
--- a/examples/solid/quickstart/package.json
+++ b/examples/solid/quickstart/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
diff --git a/examples/solid/router-monorepo-simple-lazy/package.json b/examples/solid/router-monorepo-simple-lazy/package.json
index 52fff0114a..0049aad99d 100644
--- a/examples/solid/router-monorepo-simple-lazy/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
index 5f28049d68..906f2d666d 100644
--- a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/solid-router": "^1.170.37",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.38",
+ "@tanstack/router-plugin": "^1.168.42",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-simple/package.json b/examples/solid/router-monorepo-simple/package.json
index 87a60b7782..90261498eb 100644
--- a/examples/solid/router-monorepo-simple/package.json
+++ b/examples/solid/router-monorepo-simple/package.json
@@ -8,9 +8,9 @@
"dev": "pnpm router build && pnpm post-feature build && pnpm app dev"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple/packages/router/package.json b/examples/solid/router-monorepo-simple/packages/router/package.json
index ea825b7076..5d4fcba6e4 100644
--- a/examples/solid/router-monorepo-simple/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple/packages/router/package.json
@@ -9,8 +9,8 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@tanstack/history": "^1.162.4",
- "@tanstack/solid-router": "^1.170.37",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.38",
+ "@tanstack/router-plugin": "^1.168.42",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-solid-query/package.json b/examples/solid/router-monorepo-solid-query/package.json
index 60e781abd4..169e5af341 100644
--- a/examples/solid/router-monorepo-solid-query/package.json
+++ b/examples/solid/router-monorepo-solid-query/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-solid-query/packages/router/package.json b/examples/solid/router-monorepo-solid-query/packages/router/package.json
index 11e27b2f39..381898acfd 100644
--- a/examples/solid/router-monorepo-solid-query/packages/router/package.json
+++ b/examples/solid/router-monorepo-solid-query/packages/router/package.json
@@ -10,8 +10,8 @@
"dependencies": {
"@tanstack/history": "^1.162.4",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.37",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-router": "^1.170.38",
+ "@tanstack/router-plugin": "^1.168.42",
"@router-solid-mono-solid-query/post-query": "workspace:*",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
diff --git a/examples/solid/scroll-restoration/package.json b/examples/solid/scroll-restoration/package.json
index 66c90340e9..0c133651bd 100644
--- a/examples/solid/scroll-restoration/package.json
+++ b/examples/solid/scroll-restoration/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-virtual": "^3.13.0",
"solid-js": "^1.9.10",
diff --git a/examples/solid/search-validator-adapters/package.json b/examples/solid/search-validator-adapters/package.json
index 437f9b5a05..747e982935 100644
--- a/examples/solid/search-validator-adapters/package.json
+++ b/examples/solid/search-validator-adapters/package.json
@@ -13,9 +13,9 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/arktype-adapter": "^1.167.0",
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/router-plugin": "^1.168.42",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json
index f1dc374ff1..78cb5db303 100644
--- a/examples/solid/start-basic-auth/package.json
+++ b/examples/solid/start-basic-auth/package.json
@@ -14,9 +14,9 @@
"@libsql/client": "^0.15.15",
"@prisma/adapter-libsql": "^7.0.0",
"@prisma/client": "^7.0.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json
index af3c5ea0a9..fd03336a33 100644
--- a/examples/solid/start-basic-authjs/package.json
+++ b/examples/solid/start-basic-authjs/package.json
@@ -11,9 +11,9 @@
},
"dependencies": {
"@auth/core": "^0.41.1",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.10",
"start-authjs": "^1.0.0",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json
index d5c5709181..2651bb9e54 100644
--- a/examples/solid/start-basic-cloudflare/package.json
+++ b/examples/solid/start-basic-cloudflare/package.json
@@ -12,9 +12,9 @@
"postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json
index ae129053d4..eccedc8782 100644
--- a/examples/solid/start-basic-netlify/package.json
+++ b/examples/solid/start-basic-netlify/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json
index d40d96e2cb..578b6edcca 100644
--- a/examples/solid/start-basic-nitro/package.json
+++ b/examples/solid/start-basic-nitro/package.json
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json
index ecd73d92c4..d4ed4ded06 100644
--- a/examples/solid/start-basic-solid-query/package.json
+++ b/examples/solid/start-basic-solid-query/package.json
@@ -12,10 +12,10 @@
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-router-ssr-query": "^1.167.3",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json
index 5b8a5571a2..25580202aa 100644
--- a/examples/solid/start-basic-static/package.json
+++ b/examples/solid/start-basic-static/package.json
@@ -10,10 +10,10 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
- "@tanstack/start-static-server-functions": "^1.167.38",
+ "@tanstack/solid-start": "^1.168.57",
+ "@tanstack/start-static-server-functions": "^1.167.39",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json
index 2cc32e2a01..be3eef525c 100644
--- a/examples/solid/start-basic/package.json
+++ b/examples/solid/start-basic/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json
index 00c9e74977..cf8300ceb0 100644
--- a/examples/solid/start-bun/package.json
+++ b/examples/solid/start-bun/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"@tanstack/solid-router-ssr-query": "^1.167.3",
- "@tanstack/solid-start": "^1.168.56",
- "@tanstack/router-plugin": "^1.168.41",
+ "@tanstack/solid-start": "^1.168.57",
+ "@tanstack/router-plugin": "^1.168.42",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/start-convex-better-auth/package.json b/examples/solid/start-convex-better-auth/package.json
index 8e3e77ecc7..939d2fd018 100644
--- a/examples/solid/start-convex-better-auth/package.json
+++ b/examples/solid/start-convex-better-auth/package.json
@@ -13,9 +13,9 @@
"dependencies": {
"@convex-dev/better-auth": "^0.9.7",
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"better-auth": "^1.6.19",
"clsx": "^2.1.1",
"convex": "^1.28.2",
diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json
index 202c2eab5a..bcb22e5d03 100644
--- a/examples/solid/start-counter/package.json
+++ b/examples/solid/start-counter/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json
index 304f36d516..54c9e4e41c 100644
--- a/examples/solid/start-i18n-paraglide/package.json
+++ b/examples/solid/start-i18n-paraglide/package.json
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/solid-devtools": "^0.7.0",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-large/package.json b/examples/solid/start-large/package.json
index 0e1ea333fb..cd940c026a 100644
--- a/examples/solid/start-large/package.json
+++ b/examples/solid/start-large/package.json
@@ -13,9 +13,9 @@
},
"dependencies": {
"@tanstack/solid-query": "^5.90.9",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-streaming-data-from-server-functions/package.json b/examples/solid/start-streaming-data-from-server-functions/package.json
index dc20fa777c..47b8e00770 100644
--- a/examples/solid/start-streaming-data-from-server-functions/package.json
+++ b/examples/solid/start-streaming-data-from-server-functions/package.json
@@ -10,9 +10,9 @@
"start": "pnpx srvx --prod -s ../client dist/server/server.js"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.10",
"zod": "^4.4.3"
},
diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json
index 3a1b92f76c..1f1fec3d4a 100644
--- a/examples/solid/start-supabase-basic/package.json
+++ b/examples/solid/start-supabase-basic/package.json
@@ -14,9 +14,9 @@
"dependencies": {
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.48.1",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.9",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/start-tailwind-v4/package.json b/examples/solid/start-tailwind-v4/package.json
index 4578e7001c..5e68861a9d 100644
--- a/examples/solid/start-tailwind-v4/package.json
+++ b/examples/solid/start-tailwind-v4/package.json
@@ -10,9 +10,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
- "@tanstack/solid-start": "^1.168.56",
+ "@tanstack/solid-start": "^1.168.57",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
"zod": "^4.4.3"
diff --git a/examples/solid/view-transitions/package.json b/examples/solid/view-transitions/package.json
index 54e1ab07ab..8c67d0ba78 100644
--- a/examples/solid/view-transitions/package.json
+++ b/examples/solid/view-transitions/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-framer-motion/package.json b/examples/solid/with-framer-motion/package.json
index b4b271c63f..f3fe96c08a 100644
--- a/examples/solid/with-framer-motion/package.json
+++ b/examples/solid/with-framer-motion/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/with-trpc/package.json b/examples/solid/with-trpc/package.json
index 8a52f09805..2cf06b137a 100644
--- a/examples/solid/with-trpc/package.json
+++ b/examples/solid/with-trpc/package.json
@@ -11,8 +11,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/solid-router": "^1.170.37",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-router-devtools": "^1.167.2",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
diff --git a/examples/vue/basic-file-based-jsx/package.json b/examples/vue/basic-file-based-jsx/package.json
index e9891e1f43..16788d6320 100644
--- a/examples/vue/basic-file-based-jsx/package.json
+++ b/examples/vue/basic-file-based-jsx/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/vue-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/vue-router": "^1.170.37",
"@tanstack/vue-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic-file-based-sfc/package.json b/examples/vue/basic-file-based-sfc/package.json
index 5c698cced8..de28937097 100644
--- a/examples/vue/basic-file-based-sfc/package.json
+++ b/examples/vue/basic-file-based-sfc/package.json
@@ -10,8 +10,8 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.41",
- "@tanstack/vue-router": "^1.170.36",
+ "@tanstack/router-plugin": "^1.168.42",
+ "@tanstack/vue-router": "^1.170.37",
"@tanstack/vue-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"tailwindcss": "^4.2.2",
diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json
index b1695cffd6..9416d216b8 100644
--- a/examples/vue/basic/package.json
+++ b/examples/vue/basic/package.json
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
- "@tanstack/vue-router": "^1.170.36",
+ "@tanstack/vue-router": "^1.170.37",
"@tanstack/vue-router-devtools": "^1.167.2",
"redaxios": "^0.5.1",
"vue": "^3.5.13",
diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md
index 0cbde261ce..f610095b28 100644
--- a/packages/react-router/CHANGELOG.md
+++ b/packages/react-router/CHANGELOG.md
@@ -1,5 +1,20 @@
# @tanstack/react-router
+## 1.170.41
+
+### Patch Changes
+
+- [#8529](https://github.com/TanStack/router/pull/8529) [`60b8ad1`](https://github.com/TanStack/router/commit/60b8ad1ad00812bf966a8eeee6be238c37ddad74) - Compose only enabled route boundaries instead of rendering inactive wrapper components.
+
+- [#8568](https://github.com/TanStack/router/pull/8568) [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949) - Update TanStack Store to 0.11.2 to prevent unrelated atom reads inside subscription observers from triggering extra notifications.
+
+- [#8530](https://github.com/TanStack/router/pull/8530) [`ff66a03`](https://github.com/TanStack/router/commit/ff66a03df4816f44a48a4a37189fc4021b1c8480) - Consolidate the root match context provider while preserving match context in the root shell.
+
+- [#8522](https://github.com/TanStack/router/pull/8522) [`863c8a7`](https://github.com/TanStack/router/commit/863c8a736b96746c56278a16c50554356f5523d1) - Reuse Link href classification and active/inactive results across location updates while preserving live history href formatting.
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+
## 1.170.40
### Patch Changes
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index 0755b40aa3..4b004dd879 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-router",
- "version": "1.170.40",
+ "version": "1.170.41",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-client/CHANGELOG.md b/packages/react-start-client/CHANGELOG.md
index 05d493cad2..1629dec515 100644
--- a/packages/react-start-client/CHANGELOG.md
+++ b/packages/react-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-start-client
+## 1.168.39
+
+### Patch Changes
+
+- Updated dependencies [[`60b8ad1`](https://github.com/TanStack/router/commit/60b8ad1ad00812bf966a8eeee6be238c37ddad74), [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb), [`ff66a03`](https://github.com/TanStack/router/commit/ff66a03df4816f44a48a4a37189fc4021b1c8480), [`863c8a7`](https://github.com/TanStack/router/commit/863c8a736b96746c56278a16c50554356f5523d1)]:
+ - @tanstack/react-router@1.170.41
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-client-core@1.170.34
+
## 1.168.38
### Patch Changes
diff --git a/packages/react-start-client/package.json b/packages/react-start-client/package.json
index 1ba7594f6d..0d41558a1f 100644
--- a/packages/react-start-client/package.json
+++ b/packages/react-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-client",
- "version": "1.168.38",
+ "version": "1.168.39",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index 0eac4439fd..f911c0307e 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,16 @@
# @tanstack/react-start-rsc
+## 0.1.59
+
+### Patch Changes
+
+- Updated dependencies [[`60b8ad1`](https://github.com/TanStack/router/commit/60b8ad1ad00812bf966a8eeee6be238c37ddad74), [`41ebd28`](https://github.com/TanStack/router/commit/41ebd288677beacb8eb56953f5f8c26e9d33313e), [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`05223c2`](https://github.com/TanStack/router/commit/05223c2ada4d48af4b3881f10e3b6261898b2d40), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb), [`ff66a03`](https://github.com/TanStack/router/commit/ff66a03df4816f44a48a4a37189fc4021b1c8480), [`863c8a7`](https://github.com/TanStack/router/commit/863c8a736b96746c56278a16c50554356f5523d1)]:
+ - @tanstack/react-router@1.170.41
+ - @tanstack/start-plugin-core@1.171.49
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-client-core@1.170.34
+ - @tanstack/start-storage-context@1.167.36
+
## 0.1.58
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index 9cd7d0ee29..34c446b37f 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.58",
+ "version": "0.1.59",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start-server/CHANGELOG.md b/packages/react-start-server/CHANGELOG.md
index 370829a92b..758053adb5 100644
--- a/packages/react-start-server/CHANGELOG.md
+++ b/packages/react-start-server/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/react-start-server
+## 1.167.46
+
+### Patch Changes
+
+- Updated dependencies [[`60b8ad1`](https://github.com/TanStack/router/commit/60b8ad1ad00812bf966a8eeee6be238c37ddad74), [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb), [`ff66a03`](https://github.com/TanStack/router/commit/ff66a03df4816f44a48a4a37189fc4021b1c8480), [`863c8a7`](https://github.com/TanStack/router/commit/863c8a736b96746c56278a16c50554356f5523d1)]:
+ - @tanstack/react-router@1.170.41
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-server-core@1.169.39
+
## 1.167.45
### Patch Changes
diff --git a/packages/react-start-server/package.json b/packages/react-start-server/package.json
index c0d6cd06bc..76b1aa7eb3 100644
--- a/packages/react-start-server/package.json
+++ b/packages/react-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-server",
- "version": "1.167.45",
+ "version": "1.167.46",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index 72f34da2cd..5fcfc22f08 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,18 @@
# @tanstack/react-start
+## 1.168.60
+
+### Patch Changes
+
+- Updated dependencies [[`60b8ad1`](https://github.com/TanStack/router/commit/60b8ad1ad00812bf966a8eeee6be238c37ddad74), [`41ebd28`](https://github.com/TanStack/router/commit/41ebd288677beacb8eb56953f5f8c26e9d33313e), [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`05223c2`](https://github.com/TanStack/router/commit/05223c2ada4d48af4b3881f10e3b6261898b2d40), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb), [`ff66a03`](https://github.com/TanStack/router/commit/ff66a03df4816f44a48a4a37189fc4021b1c8480), [`863c8a7`](https://github.com/TanStack/router/commit/863c8a736b96746c56278a16c50554356f5523d1)]:
+ - @tanstack/react-router@1.170.41
+ - @tanstack/start-plugin-core@1.171.49
+ - @tanstack/start-server-core@1.169.39
+ - @tanstack/react-start-client@1.168.39
+ - @tanstack/react-start-rsc@0.1.59
+ - @tanstack/react-start-server@1.167.46
+ - @tanstack/start-client-core@1.170.34
+
## 1.168.59
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index 9eb7ad03d7..7edacd9d72 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.59",
+ "version": "1.168.60",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-cli/CHANGELOG.md b/packages/router-cli/CHANGELOG.md
index 0a24b5eee7..deba113f88 100644
--- a/packages/router-cli/CHANGELOG.md
+++ b/packages/router-cli/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-cli
+## 1.167.40
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-generator@1.167.40
+
## 1.167.39
### Patch Changes
diff --git a/packages/router-cli/package.json b/packages/router-cli/package.json
index 6b933f813c..63e1f1a52a 100644
--- a/packages/router-cli/package.json
+++ b/packages/router-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-cli",
- "version": "1.167.39",
+ "version": "1.167.40",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-core/CHANGELOG.md b/packages/router-core/CHANGELOG.md
index 48adb2a91a..146d5ceb44 100644
--- a/packages/router-core/CHANGELOG.md
+++ b/packages/router-core/CHANGELOG.md
@@ -1,5 +1,11 @@
# @tanstack/router-core
+## 1.171.34
+
+### Patch Changes
+
+- [#8573](https://github.com/TanStack/router/pull/8573) [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb) - Align server function request and response handling.
+
## 1.171.33
### Patch Changes
diff --git a/packages/router-core/package.json b/packages/router-core/package.json
index 12cf13b6c6..b4e6fd6e75 100644
--- a/packages/router-core/package.json
+++ b/packages/router-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-core",
- "version": "1.171.33",
+ "version": "1.171.34",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-generator/CHANGELOG.md b/packages/router-generator/CHANGELOG.md
index 418275e2db..b686f27dc6 100644
--- a/packages/router-generator/CHANGELOG.md
+++ b/packages/router-generator/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-generator
+## 1.167.40
+
+### Patch Changes
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+
## 1.167.39
### Patch Changes
diff --git a/packages/router-generator/package.json b/packages/router-generator/package.json
index b27ea01b5b..351589e5e9 100644
--- a/packages/router-generator/package.json
+++ b/packages/router-generator/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-generator",
- "version": "1.167.39",
+ "version": "1.167.40",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-plugin/CHANGELOG.md b/packages/router-plugin/CHANGELOG.md
index 57357f9746..00ec297c09 100644
--- a/packages/router-plugin/CHANGELOG.md
+++ b/packages/router-plugin/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/router-plugin
+## 1.168.42
+
+### Patch Changes
+
+- Updated dependencies [[`60b8ad1`](https://github.com/TanStack/router/commit/60b8ad1ad00812bf966a8eeee6be238c37ddad74), [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb), [`ff66a03`](https://github.com/TanStack/router/commit/ff66a03df4816f44a48a4a37189fc4021b1c8480), [`863c8a7`](https://github.com/TanStack/router/commit/863c8a736b96746c56278a16c50554356f5523d1)]:
+ - @tanstack/react-router@1.170.41
+ - @tanstack/router-core@1.171.34
+ - @tanstack/router-generator@1.167.40
+
## 1.168.41
### Patch Changes
diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json
index affae0bab4..7a36e2c7f4 100644
--- a/packages/router-plugin/package.json
+++ b/packages/router-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-plugin",
- "version": "1.168.41",
+ "version": "1.168.42",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-vite-plugin/CHANGELOG.md b/packages/router-vite-plugin/CHANGELOG.md
index be7211da3a..3344a1135f 100644
--- a/packages/router-vite-plugin/CHANGELOG.md
+++ b/packages/router-vite-plugin/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-vite-plugin
+## 1.167.42
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/router-plugin@1.168.42
+
## 1.167.41
### Patch Changes
diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json
index cfcfd02130..b98a0cdc32 100644
--- a/packages/router-vite-plugin/package.json
+++ b/packages/router-vite-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-vite-plugin",
- "version": "1.167.41",
+ "version": "1.167.42",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-router/CHANGELOG.md b/packages/solid-router/CHANGELOG.md
index 5b094ae86b..239f34bc88 100644
--- a/packages/solid-router/CHANGELOG.md
+++ b/packages/solid-router/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/solid-router
+## 1.170.38
+
+### Patch Changes
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+
## 1.170.37
### Patch Changes
diff --git a/packages/solid-router/package.json b/packages/solid-router/package.json
index 6e0c833e16..d8ffcd2f31 100644
--- a/packages/solid-router/package.json
+++ b/packages/solid-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-router",
- "version": "1.170.37",
+ "version": "1.170.38",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-client/CHANGELOG.md b/packages/solid-start-client/CHANGELOG.md
index 4ac8dde2fa..608534af4a 100644
--- a/packages/solid-start-client/CHANGELOG.md
+++ b/packages/solid-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-start-client
+## 1.168.37
+
+### Patch Changes
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+ - @tanstack/solid-router@1.170.38
+ - @tanstack/start-client-core@1.170.34
+
## 1.168.36
### Patch Changes
diff --git a/packages/solid-start-client/package.json b/packages/solid-start-client/package.json
index ae7c9c0fe8..5cde7dc982 100644
--- a/packages/solid-start-client/package.json
+++ b/packages/solid-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-client",
- "version": "1.168.36",
+ "version": "1.168.37",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start-server/CHANGELOG.md b/packages/solid-start-server/CHANGELOG.md
index bec2966ba2..334ebf7c15 100644
--- a/packages/solid-start-server/CHANGELOG.md
+++ b/packages/solid-start-server/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/solid-start-server
+## 1.167.44
+
+### Patch Changes
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-server-core@1.169.39
+ - @tanstack/solid-router@1.170.38
+
## 1.167.43
### Patch Changes
diff --git a/packages/solid-start-server/package.json b/packages/solid-start-server/package.json
index 07df57429e..04cff794d7 100644
--- a/packages/solid-start-server/package.json
+++ b/packages/solid-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start-server",
- "version": "1.167.43",
+ "version": "1.167.44",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start/CHANGELOG.md b/packages/solid-start/CHANGELOG.md
index e56a4e7ef9..da089aa385 100644
--- a/packages/solid-start/CHANGELOG.md
+++ b/packages/solid-start/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/solid-start
+## 1.168.57
+
+### Patch Changes
+
+- Updated dependencies [[`41ebd28`](https://github.com/TanStack/router/commit/41ebd288677beacb8eb56953f5f8c26e9d33313e), [`05223c2`](https://github.com/TanStack/router/commit/05223c2ada4d48af4b3881f10e3b6261898b2d40), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/start-plugin-core@1.171.49
+ - @tanstack/start-server-core@1.169.39
+ - @tanstack/solid-router@1.170.38
+ - @tanstack/solid-start-client@1.168.37
+ - @tanstack/solid-start-server@1.167.44
+ - @tanstack/start-client-core@1.170.34
+
## 1.168.56
### Patch Changes
diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json
index 91f7b707bd..ecda690bc3 100644
--- a/packages/solid-start/package.json
+++ b/packages/solid-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start",
- "version": "1.168.56",
+ "version": "1.168.57",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-client-core/CHANGELOG.md b/packages/start-client-core/CHANGELOG.md
index 22b2a1c6d1..d97716d8ee 100644
--- a/packages/start-client-core/CHANGELOG.md
+++ b/packages/start-client-core/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/start-client-core
+## 1.170.34
+
+### Patch Changes
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-storage-context@1.167.36
+
## 1.170.33
### Patch Changes
diff --git a/packages/start-client-core/package.json b/packages/start-client-core/package.json
index 55a3f56edb..9e911146a8 100644
--- a/packages/start-client-core/package.json
+++ b/packages/start-client-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-client-core",
- "version": "1.170.33",
+ "version": "1.170.34",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-plugin-core/CHANGELOG.md b/packages/start-plugin-core/CHANGELOG.md
index bde1d3f9c8..58d85a47c3 100644
--- a/packages/start-plugin-core/CHANGELOG.md
+++ b/packages/start-plugin-core/CHANGELOG.md
@@ -1,5 +1,19 @@
# @tanstack/start-plugin-core
+## 1.171.49
+
+### Patch Changes
+
+- [#8127](https://github.com/TanStack/router/pull/8127) [`41ebd28`](https://github.com/TanStack/router/commit/41ebd288677beacb8eb56953f5f8c26e9d33313e) - fix: use http scheme for sitemap xmlns per sitemaps.org spec
+
+- [#8533](https://github.com/TanStack/router/pull/8533) [`05223c2`](https://github.com/TanStack/router/commit/05223c2ada4d48af4b3881f10e3b6261898b2d40) - Defer sitemap and XML dependencies until sitemap generation is enabled to reduce Start plugin startup work.
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-server-core@1.169.39
+ - @tanstack/router-generator@1.167.40
+ - @tanstack/router-plugin@1.168.42
+
## 1.171.48
### Patch Changes
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index b837c5edcc..46336e366b 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-plugin-core",
- "version": "1.171.48",
+ "version": "1.171.49",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-server-core/CHANGELOG.md b/packages/start-server-core/CHANGELOG.md
index 87db4bb072..81b9ea6dfb 100644
--- a/packages/start-server-core/CHANGELOG.md
+++ b/packages/start-server-core/CHANGELOG.md
@@ -1,5 +1,16 @@
# @tanstack/start-server-core
+## 1.169.39
+
+### Patch Changes
+
+- [#8573](https://github.com/TanStack/router/pull/8573) [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb) - Align server function request and response handling.
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-client-core@1.170.34
+ - @tanstack/start-storage-context@1.167.36
+
## 1.169.38
### Patch Changes
diff --git a/packages/start-server-core/package.json b/packages/start-server-core/package.json
index 4587a6d3ec..dd4b15506e 100644
--- a/packages/start-server-core/package.json
+++ b/packages/start-server-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-server-core",
- "version": "1.169.38",
+ "version": "1.169.39",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-static-server-functions/CHANGELOG.md b/packages/start-static-server-functions/CHANGELOG.md
index 5cf90eee96..b212575d5e 100644
--- a/packages/start-static-server-functions/CHANGELOG.md
+++ b/packages/start-static-server-functions/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/start-static-server-functions
+## 1.167.39
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/react-start@1.168.60
+ - @tanstack/solid-start@1.168.57
+ - @tanstack/start-client-core@1.170.34
+
## 1.167.38
### Patch Changes
diff --git a/packages/start-static-server-functions/package.json b/packages/start-static-server-functions/package.json
index 3bda76b2ad..f18c4a6588 100644
--- a/packages/start-static-server-functions/package.json
+++ b/packages/start-static-server-functions/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-static-server-functions",
- "version": "1.167.38",
+ "version": "1.167.39",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-storage-context/CHANGELOG.md b/packages/start-storage-context/CHANGELOG.md
index b18837c3a3..6a6d0e4002 100644
--- a/packages/start-storage-context/CHANGELOG.md
+++ b/packages/start-storage-context/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/start-storage-context
+## 1.167.36
+
+### Patch Changes
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+
## 1.167.35
### Patch Changes
diff --git a/packages/start-storage-context/package.json b/packages/start-storage-context/package.json
index 47d65c1e00..2e8033123f 100644
--- a/packages/start-storage-context/package.json
+++ b/packages/start-storage-context/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-storage-context",
- "version": "1.167.35",
+ "version": "1.167.36",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md
index 1224692281..4d27c2d8ad 100644
--- a/packages/vue-router/CHANGELOG.md
+++ b/packages/vue-router/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-router
+## 1.170.37
+
+### Patch Changes
+
+- [#8568](https://github.com/TanStack/router/pull/8568) [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949) - Update TanStack Store to 0.11.2 to prevent unrelated atom reads inside subscription observers from triggering extra notifications.
+
+- Updated dependencies [[`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/router-core@1.171.34
+
## 1.170.36
### Patch Changes
diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json
index 97952fa240..e02f7aa4af 100644
--- a/packages/vue-router/package.json
+++ b/packages/vue-router/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-router",
- "version": "1.170.36",
+ "version": "1.170.37",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-client/CHANGELOG.md b/packages/vue-start-client/CHANGELOG.md
index eaf98f2385..8e4ff25b0c 100644
--- a/packages/vue-start-client/CHANGELOG.md
+++ b/packages/vue-start-client/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-start-client
+## 1.167.40
+
+### Patch Changes
+
+- Updated dependencies [[`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/vue-router@1.170.37
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-client-core@1.170.34
+
## 1.167.39
### Patch Changes
diff --git a/packages/vue-start-client/package.json b/packages/vue-start-client/package.json
index 7f5a621dfb..58b878b841 100644
--- a/packages/vue-start-client/package.json
+++ b/packages/vue-start-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-client",
- "version": "1.167.39",
+ "version": "1.167.40",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start-server/CHANGELOG.md b/packages/vue-start-server/CHANGELOG.md
index d5a4218807..209d848178 100644
--- a/packages/vue-start-server/CHANGELOG.md
+++ b/packages/vue-start-server/CHANGELOG.md
@@ -1,5 +1,14 @@
# @tanstack/vue-start-server
+## 1.167.44
+
+### Patch Changes
+
+- Updated dependencies [[`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/vue-router@1.170.37
+ - @tanstack/router-core@1.171.34
+ - @tanstack/start-server-core@1.169.39
+
## 1.167.43
### Patch Changes
diff --git a/packages/vue-start-server/package.json b/packages/vue-start-server/package.json
index a0dd73bfc4..de1d4abbbd 100644
--- a/packages/vue-start-server/package.json
+++ b/packages/vue-start-server/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start-server",
- "version": "1.167.43",
+ "version": "1.167.44",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md
index 60b7289a42..7d3317a376 100644
--- a/packages/vue-start/CHANGELOG.md
+++ b/packages/vue-start/CHANGELOG.md
@@ -1,5 +1,17 @@
# @tanstack/vue-start
+## 1.168.56
+
+### Patch Changes
+
+- Updated dependencies [[`41ebd28`](https://github.com/TanStack/router/commit/41ebd288677beacb8eb56953f5f8c26e9d33313e), [`614bc27`](https://github.com/TanStack/router/commit/614bc27034c8ec98747bf305ed41d4a619640949), [`05223c2`](https://github.com/TanStack/router/commit/05223c2ada4d48af4b3881f10e3b6261898b2d40), [`d521abd`](https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb)]:
+ - @tanstack/start-plugin-core@1.171.49
+ - @tanstack/vue-router@1.170.37
+ - @tanstack/start-server-core@1.169.39
+ - @tanstack/vue-start-client@1.167.40
+ - @tanstack/vue-start-server@1.167.44
+ - @tanstack/start-client-core@1.170.34
+
## 1.168.55
### Patch Changes
diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json
index 8b46cc8448..6e3c35d44f 100644
--- a/packages/vue-start/package.json
+++ b/packages/vue-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start",
- "version": "1.168.55",
+ "version": "1.168.56",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4f52909cae..102917b107 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -11290,7 +11290,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11330,7 +11330,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11373,7 +11373,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11416,7 +11416,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11453,7 +11453,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11487,7 +11487,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11527,7 +11527,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11573,7 +11573,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11616,7 +11616,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11656,7 +11656,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
compression:
specifier: ^1.8.0
@@ -11699,7 +11699,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11757,7 +11757,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11800,7 +11800,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11840,7 +11840,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11880,7 +11880,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
solid-js:
specifier: 1.9.12
@@ -11914,7 +11914,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -11954,7 +11954,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12003,7 +12003,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12052,7 +12052,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12098,7 +12098,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12138,7 +12138,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12175,7 +12175,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12209,7 +12209,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12240,7 +12240,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12271,7 +12271,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12311,7 +12311,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12348,7 +12348,7 @@ importers:
examples/solid/quickstart-webpack-file-based:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12412,7 +12412,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12449,7 +12449,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12492,7 +12492,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12529,7 +12529,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12572,7 +12572,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12627,7 +12627,7 @@ importers:
examples/solid/start-basic:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12682,7 +12682,7 @@ importers:
specifier: ^7.0.0
version: 7.0.0(@typescript/typescript6@6.0.2)(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12734,7 +12734,7 @@ importers:
specifier: ^0.41.1
version: 0.41.1
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12777,7 +12777,7 @@ importers:
examples/solid/start-basic-cloudflare:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12820,7 +12820,7 @@ importers:
examples/solid/start-basic-netlify:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12860,7 +12860,7 @@ importers:
examples/solid/start-basic-nitro:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12906,7 +12906,7 @@ importers:
specifier: ^5.90.0
version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -12952,7 +12952,7 @@ importers:
examples/solid/start-basic-static:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13007,7 +13007,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13074,7 +13074,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13132,7 +13132,7 @@ importers:
examples/solid/start-counter:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13178,7 +13178,7 @@ importers:
specifier: ^0.7.0
version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13221,7 +13221,7 @@ importers:
specifier: ^5.102.0
version: 5.102.0(solid-js@1.9.12)
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13267,7 +13267,7 @@ importers:
examples/solid/start-streaming-data-from-server-functions:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13307,7 +13307,7 @@ importers:
specifier: ^2.48.1
version: 2.48.1
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13347,7 +13347,7 @@ importers:
examples/solid/start-tailwind-v4:
dependencies:
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13396,7 +13396,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13433,7 +13433,7 @@ importers:
specifier: ^4.2.2
version: 4.2.2(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
@@ -13476,7 +13476,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/router-plugin
'@tanstack/solid-router':
- specifier: ^1.170.37
+ specifier: ^1.170.38
version: link:../../../packages/solid-router
'@tanstack/solid-router-devtools':
specifier: workspace:^
From d35aab425b07b46e222a507c0f0239644669757b Mon Sep 17 00:00:00 2001
From: Flo
Date: Thu, 1 Oct 2026 13:52:43 +0200
Subject: [PATCH 029/127] fix(router): cancel pending link preload before
navigation (#8579)
---
.changeset/quick-links-cancel.md | 7 +++++++
packages/react-router/src/link.tsx | 1 +
packages/solid-router/src/link.tsx | 1 +
packages/vue-router/src/link.tsx | 1 +
4 files changed, 10 insertions(+)
create mode 100644 .changeset/quick-links-cancel.md
diff --git a/.changeset/quick-links-cancel.md b/.changeset/quick-links-cancel.md
new file mode 100644
index 0000000000..0c0dab233a
--- /dev/null
+++ b/.changeset/quick-links-cancel.md
@@ -0,0 +1,7 @@
+---
+'@tanstack/react-router': patch
+'@tanstack/solid-router': patch
+'@tanstack/vue-router': patch
+---
+
+Cancel pending link preload timers when starting navigation to avoid redundant preloading while the destination is loading.
diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx
index 7861827719..b99ad65662 100644
--- a/packages/react-router/src/link.tsx
+++ b/packages/react-router/src/link.tsx
@@ -446,6 +446,7 @@ export function useLinkProps<
e.button === 0
) {
e.preventDefault()
+ cancelPreload(innerRef)
// All is well? Navigate!
// N.B. we don't call `router.commitLocation(next) here because we want to run `validateSearch` before committing
diff --git a/packages/solid-router/src/link.tsx b/packages/solid-router/src/link.tsx
index a26483706c..94f453bb2c 100644
--- a/packages/solid-router/src/link.tsx
+++ b/packages/solid-router/src/link.tsx
@@ -409,6 +409,7 @@ export function useLinkProps<
e.button === 0
) {
e.preventDefault()
+ cancelPreload(ref)
// All is well? Navigate!
// N.B. we don't call `router.commitLocation(next) here because we want to run `validateSearch` before committing
diff --git a/packages/vue-router/src/link.tsx b/packages/vue-router/src/link.tsx
index cb964c7381..2c1ae102e9 100644
--- a/packages/vue-router/src/link.tsx
+++ b/packages/vue-router/src/link.tsx
@@ -345,6 +345,7 @@ function useLinkPropsImpl(
}
e.preventDefault()
+ enqueuePreload()
// All is well? Navigate!
router.navigate({
From 1f0f20a3206a28365d74fd2485b9a8eedbf74dd0 Mon Sep 17 00:00:00 2001
From: Sarah Gerrard
Date: Thu, 1 Oct 2026 11:50:06 -0700
Subject: [PATCH 030/127] chore(react-start-rsc): upgrade Rspack to 2.2.7
(#8542)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
packages/react-start-rsc/package.json | 2 +-
pnpm-lock.yaml | 398 +++++++++-----------------
2 files changed, 136 insertions(+), 264 deletions(-)
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index 34c446b37f..0be518d39e 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -107,7 +107,7 @@
"pathe": "catalog:"
},
"devDependencies": {
- "@rspack/core": "2.0.0",
+ "@rspack/core": "2.2.7",
"@testing-library/react": "catalog:",
"@vitejs/plugin-react": "catalog:",
"@vitejs/plugin-rsc": "^0.5.30",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 102917b107..3a44f02d76 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -150,13 +150,13 @@ importers:
version: 2.30.0(@types/node@25.0.9)
'@nx/devkit':
specifier: 23.2.0
- version: 23.2.0(nx@23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23)))
+ version: 23.2.0(nx@23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23)))
'@playwright/test':
specifier: ^1.63.0
version: 1.63.0
'@swc-node/register':
specifier: ^1.11.1
- version: 1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0)
+ version: 1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0)
'@tanstack/eslint-config':
specifier: 0.4.0
version: 0.4.0(@typescript-eslint/utils@8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0))(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@7.2.0))(supports-color@7.2.0)
@@ -177,7 +177,7 @@ importers:
version: 4.0.3
nx:
specifier: 23.2.0
- version: 23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23))
+ version: 23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23))
prettier:
specifier: ^3.8.0
version: 3.8.1
@@ -247,7 +247,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/router-plugin':
specifier: workspace:*
version: link:../../packages/router-plugin
@@ -1477,7 +1477,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tailwindcss/postcss':
specifier: ^4.2.2
version: 4.2.2
@@ -1532,7 +1532,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tailwindcss/postcss':
specifier: ^4.2.2
version: 4.2.2
@@ -1761,7 +1761,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tailwindcss/postcss':
specifier: ^4.2.2
version: 4.2.2
@@ -2188,7 +2188,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/router-e2e-utils':
specifier: workspace:^
version: link:../../e2e-utils
@@ -2368,7 +2368,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tailwindcss/postcss':
specifier: ^4.2.2
version: 4.2.2
@@ -2426,7 +2426,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/router-e2e-utils':
specifier: workspace:^
version: link:../../e2e-utils
@@ -2631,7 +2631,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tailwindcss/postcss':
specifier: ^4.2.2
version: 4.2.2
@@ -2747,7 +2747,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/router-e2e-utils':
specifier: workspace:^
version: link:../../e2e-utils
@@ -2992,7 +2992,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/router-e2e-utils':
specifier: workspace:^
version: link:../../e2e-utils
@@ -3038,7 +3038,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/eslint-plugin-start':
specifier: workspace:^
version: link:../../../packages/eslint-plugin-start
@@ -3206,7 +3206,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/router-e2e-utils':
specifier: workspace:^
version: link:../../e2e-utils
@@ -3447,7 +3447,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tailwindcss/postcss':
specifier: ^4.2.2
version: 4.2.2
@@ -3828,7 +3828,7 @@ importers:
version: link:../../../packages/start-static-server-functions
nitro:
specifier: ^3.0.1-alpha.2
- version: 3.0.1-alpha.2(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(ioredis@5.11.1(supports-color@10.2.2))(lru-cache@11.5.1)(mysql2@3.15.3)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
+ version: 3.0.1-alpha.2(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(ioredis@5.11.1(supports-color@10.2.2))(lru-cache@11.5.1)(mysql2@3.15.3)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))
react:
specifier: ^19.2.3
version: 19.2.3
@@ -6536,7 +6536,7 @@ importers:
version: 1.1.2(@rsbuild/core@2.1.1)(supports-color@10.2.2)
'@rsbuild/plugin-vue':
specifier: ^1.2.7
- version: 1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
+ version: 1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
'@rsbuild/plugin-vue-jsx':
specifier: ^2.0.0
version: 2.0.0(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.1.1)(supports-color@10.2.2)
@@ -6594,7 +6594,7 @@ importers:
version: 1.1.2(@rsbuild/core@2.1.1)(supports-color@10.2.2)
'@rsbuild/plugin-vue':
specifier: ^1.2.7
- version: 1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
+ version: 1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
'@rsbuild/plugin-vue-jsx':
specifier: ^2.0.0
version: 2.0.0(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.1.1)(supports-color@10.2.2)
@@ -6820,7 +6820,7 @@ importers:
version: 1.1.2(@rsbuild/core@2.1.1)(supports-color@10.2.2)
'@rsbuild/plugin-vue':
specifier: ^1.2.7
- version: 1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
+ version: 1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
'@rsbuild/plugin-vue-jsx':
specifier: ^2.0.0
version: 2.0.0(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.1.1)(supports-color@10.2.2)
@@ -9062,7 +9062,7 @@ importers:
version: 2.1.1
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@tanstack/router-plugin':
specifier: workspace:*
version: link:../../../packages/router-plugin
@@ -10180,10 +10180,10 @@ importers:
version: 2.0.14
'@rsbuild/plugin-react':
specifier: ^2.0.0
- version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.2.3(@swc/helpers@0.5.23))
+ version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.2.7(@swc/helpers@0.5.23))
'@rsbuild/plugin-tailwindcss':
specifier: ^2.0.3
- version: 2.0.3(@rsbuild/core@2.0.14)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(webpack@5.110.3)
+ version: 2.0.3(@rsbuild/core@2.0.14)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(webpack@5.110.3)
'@types/node':
specifier: 25.0.9
version: 25.0.9
@@ -13801,7 +13801,7 @@ importers:
dependencies:
nitropack:
specifier: ^2.13.4
- version: 2.13.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(mysql2@3.15.3)(rolldown@1.0.2)(srvx@0.11.22)(supports-color@10.2.2)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
+ version: 2.13.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(mysql2@3.15.3)(rolldown@1.0.2)(srvx@0.11.22)(supports-color@10.2.2)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
pathe:
specifier: 'catalog:'
version: 2.0.3
@@ -14188,8 +14188,8 @@ importers:
specifier: 'catalog:'
version: 1.26.2(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(ts-api-utils@2.4.0(@typescript/typescript6@6.0.2))
'@rspack/core':
- specifier: 2.0.0
- version: 2.0.0(@swc/helpers@0.5.23)
+ specifier: 2.2.7
+ version: 2.2.7(@swc/helpers@0.5.23)
'@tanstack/vite-config':
specifier: 'catalog:'
version: 0.5.2(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(supports-color@10.2.2)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))
@@ -14225,7 +14225,7 @@ importers:
version: 19.2.3(react@19.2.3)
react-server-dom-rspack:
specifier: ^0.0.2
- version: 0.0.2(@rspack/core@2.0.0(@swc/helpers@0.5.23))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
+ version: 0.0.2(@rspack/core@2.2.7(@swc/helpers@0.5.23))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
rimraf:
specifier: 'catalog:'
version: 6.1.2
@@ -14561,7 +14561,7 @@ importers:
version: 5.0.0
unplugin:
specifier: ^3.3.0
- version: 3.3.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
+ version: 3.3.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
vite:
specifier: ^8.0.14
version: 8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0)
@@ -21015,11 +21015,6 @@ packages:
'@rsbuild/core':
optional: true
- '@rspack/binding-darwin-arm64@2.0.0':
- resolution: {integrity: sha512-ICBHDKYyndFqljLhjxvKfWWZu39RJSH2jkSmbceXl0kmptLSE0cLWpvk+eGSzLqtxKN0jVchwCw+5P5mWCzwAw==}
- cpu: [arm64]
- os: [darwin]
-
'@rspack/binding-darwin-arm64@2.0.8':
resolution: {integrity: sha512-vCgbgH7B7qom+uID+RCZsTCOYFb9wC4/4+1U6rMfytrXGVJ72eNQs2tbdjOl0lb18CT3N/n+VkWynUiLk84GwA==}
cpu: [arm64]
@@ -21030,16 +21025,11 @@ packages:
cpu: [arm64]
os: [darwin]
- '@rspack/binding-darwin-arm64@2.2.3':
- resolution: {integrity: sha512-MGLx4lMTY6XEtJi55S+fk83+683GeUDuoqzjixbq6ehHdr/l6nGiHhgvMtV5DYt9sCytUDzyrCkcJ0AWqJxnTA==}
+ '@rspack/binding-darwin-arm64@2.2.7':
+ resolution: {integrity: sha512-m0ijteZwZfUZeFcbyxwTe6N+I7aceV5/iW39b7fIIoMN/mSv9zL0ieeRzwuFe7mTYGwCuwNieDZHXfMFdp2Q2w==}
cpu: [arm64]
os: [darwin]
- '@rspack/binding-darwin-x64@2.0.0':
- resolution: {integrity: sha512-YQ96LMmzIzhZt9cZWUDWXSxS9UWWHWoLxJyZ5f42DSaVPVelBg5ThbVORDwOP5QDA2xFXj60rVnmmcZLzg/aDA==}
- cpu: [x64]
- os: [darwin]
-
'@rspack/binding-darwin-x64@2.0.8':
resolution: {integrity: sha512-satPm2PD4B7jDTVlVAdvMVdUszwLvWUEnUDzLb77mvVkezKNDZmuhb+e8s+FfKs8hJpNbZ9VAejuA2rr8o985w==}
cpu: [x64]
@@ -21050,17 +21040,11 @@ packages:
cpu: [x64]
os: [darwin]
- '@rspack/binding-darwin-x64@2.2.3':
- resolution: {integrity: sha512-5B/c1YTYEz9m7TyqtGQgTmXMr9PoPewyqsyHB4N0AB7nxDhtgmki0GniP2Lqtx3LJzOvQMjwet+I2lmWxvxwCg==}
+ '@rspack/binding-darwin-x64@2.2.7':
+ resolution: {integrity: sha512-f27/OubIeCe5Hzze1bm+k/CQ2XX9hk3E/FuK4lym1bjqZ9spWSuolC3sK/yU/Pc3kwMPuf53byUm3FM+QC/blw==}
cpu: [x64]
os: [darwin]
- '@rspack/binding-linux-arm64-gnu@2.0.0':
- resolution: {integrity: sha512-Ufn33gzkIV7JY69k6vJQEdOzRvBqThIgH46pwXksHSMwRZp8IbJhXfyYIAVsRWCk8fXpr9t1nAvCDvJXT2EeyA==}
- cpu: [arm64]
- os: [linux]
- libc: [glibc]
-
'@rspack/binding-linux-arm64-gnu@2.0.8':
resolution: {integrity: sha512-pSI+npPQE/uDtiboqvcOIRJbEV2+B+H1xffmko/gw50la92oTUW60kVULFwsb6L0+GVCzIcwX3yq60GtYIn+Ug==}
cpu: [arm64]
@@ -21073,18 +21057,12 @@ packages:
os: [linux]
libc: [glibc]
- '@rspack/binding-linux-arm64-gnu@2.2.3':
- resolution: {integrity: sha512-sU+jPGD2xz3BxFvsdBQVGce538YHqrSKMB4ZSfKhj6RSKjeGzpJ1BVl8+IndiQsfTgaUxi7N+r5cs/ezGy1TVQ==}
+ '@rspack/binding-linux-arm64-gnu@2.2.7':
+ resolution: {integrity: sha512-uGEX6kY/Pi3wPZgaEk6vTevZOHjKw8qmd5pqWVwRmpLhwvPB7LGqVqx5BMnNYBjsndVUWJQQRlGL8DoVG5IXXQ==}
cpu: [arm64]
os: [linux]
libc: [glibc]
- '@rspack/binding-linux-arm64-musl@2.0.0':
- resolution: {integrity: sha512-CZbvFKlNY9UC0C+Czz6i8JFCzGpuL9oX8gEqcJA1+84Y6eEEBH50UiTzeCewxKW3dOofkZdvT5vgNMXz6aMUmg==}
- cpu: [arm64]
- os: [linux]
- libc: [musl]
-
'@rspack/binding-linux-arm64-musl@2.0.8':
resolution: {integrity: sha512-igjJ43yxWQ72GZqjDDZSSHax9/Vg+6rLMmOvFglTJUkQpB4Tyvu/YjW+WRjYj2xRw6blOjLxUSJWASvuSqqlvg==}
cpu: [arm64]
@@ -21097,14 +21075,14 @@ packages:
os: [linux]
libc: [musl]
- '@rspack/binding-linux-arm64-musl@2.2.3':
- resolution: {integrity: sha512-EQuADbqWbVgNAh5ep/u/B7Z/8UUkZjMLzHAOKZJklBpe4Y8mnhFNjieX0xc9NadR+drj9tqmEANxzTOkFtVPyQ==}
+ '@rspack/binding-linux-arm64-musl@2.2.7':
+ resolution: {integrity: sha512-qBvztXsOgdi69zi8BhIUz+yc/alqR/wQVmcdCh+1SbhcsNpMsFUndxvVoR1tOboBsEo//gxOG4GxH8zlemhbUA==}
cpu: [arm64]
os: [linux]
libc: [musl]
- '@rspack/binding-linux-ppc64-gnu@2.2.3':
- resolution: {integrity: sha512-kyXROzr519a5juBII9ysuc5ZD2apEZ0DJqL5PPCAOVHjzMfThEIBwnX3gicNCmp+kY0CCIOl2LagwbtFaOzoiA==}
+ '@rspack/binding-linux-ppc64-gnu@2.2.7':
+ resolution: {integrity: sha512-t+/tOPoMu3ZZF8I1Wvqd4Jrib1teOOgb0S4jGb4nSVryuDIWgjny0FLGv5xc8RC7e4esVF93D4wF62Kt9Pxfvw==}
cpu: [ppc64]
os: [linux]
libc: [glibc]
@@ -21115,8 +21093,8 @@ packages:
os: [linux]
libc: [glibc]
- '@rspack/binding-linux-riscv64-gnu@2.2.3':
- resolution: {integrity: sha512-F3x6Nu0RUSoLtiaMse3hYQ3Nf5A2de6vTWWDXj14Ll6BpGWXGn+U/eXT/nB199fFnDEYf+CJEa7d6fzcYdwdjA==}
+ '@rspack/binding-linux-riscv64-gnu@2.2.7':
+ resolution: {integrity: sha512-ZkN6K4PRTPqfYI7gPYv1PqgUXKsZDeeFPFoQ4LLiFxhIGczdJY5XAPPoHN+N7d91hAGWi6u+UHYrUp1HvudBOw==}
cpu: [riscv64]
os: [linux]
libc: [glibc]
@@ -21127,24 +21105,18 @@ packages:
os: [linux]
libc: [musl]
- '@rspack/binding-linux-riscv64-musl@2.2.3':
- resolution: {integrity: sha512-O3HK7OnPvoBxZu4MX2j+t3gk4qiUsFYqj/29L3WgU1iQsdUSIN6PInW2JvbiLqyuzt09VltIEXTKayY8EysCpQ==}
+ '@rspack/binding-linux-riscv64-musl@2.2.7':
+ resolution: {integrity: sha512-ywcmeNAC59HtVJ4a5jy5cEUA4JNa19QlVtTW09Pzh0+luNEasWaDfOaXJpYJTGWcycVwzMm3A9aNN3MqvO87EQ==}
cpu: [riscv64]
os: [linux]
libc: [musl]
- '@rspack/binding-linux-s390x-gnu@2.2.3':
- resolution: {integrity: sha512-SIxfGdwBdAjwJ8pDlPTb8MPIZIv/i2lKHn4/ywuDpFOxlUA4Bo/OKqQOenHx2MFD2mN8jigBZQTF0KVe5YP1uQ==}
+ '@rspack/binding-linux-s390x-gnu@2.2.7':
+ resolution: {integrity: sha512-U/np+nOj9mka5CdM9FKNkrAShw0UoaarBLzOxbBHu4sqMt3iXQCi91fblLdhUDoWuIQrnV/WrqygFeIP2qAHIw==}
cpu: [s390x]
os: [linux]
libc: [glibc]
- '@rspack/binding-linux-x64-gnu@2.0.0':
- resolution: {integrity: sha512-dPjFGpoCvZfFpJBsWAUR+PR7mWYxpou6L026qIOpAVkz7WiTzErwKD3P1jVrpP4dM9yLb3fVE+PHHjTglhTJ4g==}
- cpu: [x64]
- os: [linux]
- libc: [glibc]
-
'@rspack/binding-linux-x64-gnu@2.0.8':
resolution: {integrity: sha512-zrkoEOnqj1hOEBO5T2I/2Ts2HSJsYFh1qXwMpK4dMJFGGNWDfNeUa6/LF5uq3VINF3JUl7RL47AgrucoSZJXPA==}
cpu: [x64]
@@ -21157,18 +21129,12 @@ packages:
os: [linux]
libc: [glibc]
- '@rspack/binding-linux-x64-gnu@2.2.3':
- resolution: {integrity: sha512-IzQGcw09WYn/IzwB1SQpg7FQ211MBr+fJB2/WoRrPS6CNdtlkDHZaI8z2oq+2Oc5Su21jgX75VlWFajirUx5Dw==}
+ '@rspack/binding-linux-x64-gnu@2.2.7':
+ resolution: {integrity: sha512-PkryZX3GZeBQfzvKEhwGGd9m43PwqcsqWd14kmsVADeBCqHLxJahMGiGmajd28vSa42xbw7HTb8yY4jXzv5QtA==}
cpu: [x64]
os: [linux]
libc: [glibc]
- '@rspack/binding-linux-x64-musl@2.0.0':
- resolution: {integrity: sha512-4fgDTMWt0mJDiugdia2mdOjTbnm7yM1Drzl1JpPqlUlOr113byOhc+qgN57LURSGypz2yz/h/Zad7/UnVAxYJw==}
- cpu: [x64]
- os: [linux]
- libc: [musl]
-
'@rspack/binding-linux-x64-musl@2.0.8':
resolution: {integrity: sha512-6CtDaGZjNDvJd9TBp7a9zABbrPORO21W96+3ZcGBn0YNUPUk4ARxIxrTTpeJ/1F41QDM8AYIkGDdqEYMqTYBsA==}
cpu: [x64]
@@ -21181,16 +21147,12 @@ packages:
os: [linux]
libc: [musl]
- '@rspack/binding-linux-x64-musl@2.2.3':
- resolution: {integrity: sha512-9OKSx2ickrR+PFal94XE6Hkj49AQ2HI3KuR9XeRkKOwSxjwrskV/Pn1wc2itDOHkm/QHP7k+MttsYb4FGuNIqw==}
+ '@rspack/binding-linux-x64-musl@2.2.7':
+ resolution: {integrity: sha512-atJn62IgXnc/RhWiFgEiNx7IHAJbHunttzjMpWJLjWiFuJ2c+tLQrTBIiqO3VAIXh+haN1jZLHXuMVj5/J+edA==}
cpu: [x64]
os: [linux]
libc: [musl]
- '@rspack/binding-wasm32-wasi@2.0.0':
- resolution: {integrity: sha512-ANk73ZKtPrZf9gdtyRK2nQUfhi1uXoC5P2KF89pyVAE8+zcoLBnYtZGYpWa/cmNi5BcO5g4Z+v2l1UA3bUPLQQ==}
- cpu: [wasm32]
-
'@rspack/binding-wasm32-wasi@2.0.8':
resolution: {integrity: sha512-Yf4SiqTUroT5Ju+te0YAY2xxKOb35tECsO21v7hYyGa705wrgoAK/MmF7enOvs9GR1iZIqgiLD/wxsIxl8GjJw==}
cpu: [wasm32]
@@ -21199,15 +21161,10 @@ packages:
resolution: {integrity: sha512-OicgaB3Dcd+KXsH/I3DkJG7XQyREJScg/jLkCtycFn9BhT0IVJvgi37F8QNJKl8Bp9YZIGehsqK9HpQWav6SLw==}
cpu: [wasm32]
- '@rspack/binding-wasm32-wasi@2.2.3':
- resolution: {integrity: sha512-gici3jWJi0GDy9kbYh57LoA57H8A2EAD9cV2jFKp1YoJ2aX2U9lANh4L+xoKPTvVQYpRvleoA5jkAvyfeLQ5bw==}
+ '@rspack/binding-wasm32-wasi@2.2.7':
+ resolution: {integrity: sha512-SRDYrqWnD8Y+VNj8+11KggFaVMFSbyu+9WC2f9sygzjFu78GmF0kLKaHNQMaJv6MUMSBk/OhtEbUB4hmH7czVQ==}
cpu: [wasm32]
- '@rspack/binding-win32-arm64-msvc@2.0.0':
- resolution: {integrity: sha512-IHZFRtJ85ONbM+BCtF4TeYXS2Fu9X0IJS2phX1rPibYq9iEtHGfBt4cNlnsJPhbPAXVvi4Oli/yiLRJ1zxtCIg==}
- cpu: [arm64]
- os: [win32]
-
'@rspack/binding-win32-arm64-msvc@2.0.8':
resolution: {integrity: sha512-8NCuiQsAhXrwRBy57QZoypqrws/zLBkaQVGiB8hksr6v++8hNigNjqpQARLbd0iyMuHsQQ++8+auGk6xlDXmzw==}
cpu: [arm64]
@@ -21218,16 +21175,11 @@ packages:
cpu: [arm64]
os: [win32]
- '@rspack/binding-win32-arm64-msvc@2.2.3':
- resolution: {integrity: sha512-1MG66kcuqAGFs9ewiBc+/NJSTQr1jHrkZ2nCVMyhukl1o8embmFZa3BCibYgBYs5P7FRc6Sa+CDXcrfDZOLInQ==}
+ '@rspack/binding-win32-arm64-msvc@2.2.7':
+ resolution: {integrity: sha512-etHFjzSP/jnnrVYuim9C/nhSlN0/tQowVz0CSJOUHtDH7ZZiUsvWtkH9Zx3tDaZOB7sAw9cbL36mbmdkb4U6cw==}
cpu: [arm64]
os: [win32]
- '@rspack/binding-win32-ia32-msvc@2.0.0':
- resolution: {integrity: sha512-n4tbIqacq/FhNJflMlgZV50AeQFTLh5hnDS3v4W+rJWa3IW1VfgB0+XppdeW+Dqhw7QcMIsCmro01kwNdlXZDQ==}
- cpu: [ia32]
- os: [win32]
-
'@rspack/binding-win32-ia32-msvc@2.0.8':
resolution: {integrity: sha512-bxiekytbX7V9KFAra+HkwtNWC6pYfHEBBZFpiT0xUs3mCFOmAAFVBsBSQsoCP9AdCEXoMAvNdnrHNw3iov4OZw==}
cpu: [ia32]
@@ -21238,16 +21190,11 @@ packages:
cpu: [ia32]
os: [win32]
- '@rspack/binding-win32-ia32-msvc@2.2.3':
- resolution: {integrity: sha512-CAigxxh9DYJmEwH9f6FRkSsmt0GhKVqKaFRVFFrF9WDL7gXP3hyE/h/cCeMdmlTzRt8Mht87AvnDX7PG3neMrA==}
+ '@rspack/binding-win32-ia32-msvc@2.2.7':
+ resolution: {integrity: sha512-26HiMUQk8QKVw477gW9HorIQ3r0le3AL4OFigJr1/HAumi5qyOPazck+wWtUDh1R9bSf8etZjkuseBGtjN5+KQ==}
cpu: [ia32]
os: [win32]
- '@rspack/binding-win32-x64-msvc@2.0.0':
- resolution: {integrity: sha512-cJOgikIW2t3S+42TQZsv+DJriJt2m6lnUk+pUFu/fO93rrMvNrx8gfMxR8W5zDTreBX0cfMx2pw6EVmyi/YzsQ==}
- cpu: [x64]
- os: [win32]
-
'@rspack/binding-win32-x64-msvc@2.0.8':
resolution: {integrity: sha512-7zPs8YCe/ZVJTwd+5lpB0CP0tkn2pONf/T1ycmVY76u21Nrwt8mXQGc/2yH2eWP4B7fikYBr3hGr7mpR2fajqQ==}
cpu: [x64]
@@ -21258,34 +21205,19 @@ packages:
cpu: [x64]
os: [win32]
- '@rspack/binding-win32-x64-msvc@2.2.3':
- resolution: {integrity: sha512-qa5Wc34a+Uux5foZ1Z+9fPQceVRbgTunaIulHezVF/ZxvqKO4DkAC7tFl53shB0YRVBAPg8R78MGd8cByfoxLQ==}
+ '@rspack/binding-win32-x64-msvc@2.2.7':
+ resolution: {integrity: sha512-ut8tVSXP8DWQE/JUwQ1oqwuAaAgySgYF66HpWmxfR9J4nLzGmhd7CnnaCTT3vUyQQNmLKFida/AbiqJ/gWmPrw==}
cpu: [x64]
os: [win32]
- '@rspack/binding@2.0.0':
- resolution: {integrity: sha512-WA2f9eQpejkvf5Vrnf6wNCn1m8RT1p08NjgOZpKhsCzr0uBjWeRvGduawlrFFHZh/jPnWZTVaVdQ08FEAWbwGw==}
-
'@rspack/binding@2.0.8':
resolution: {integrity: sha512-3uZ+y8aQxq33ty2srMxg2Nu0XuBI6vVrG50rkDaXqwWqOohfgGUSfFuQK7EnSUNy4aFUQlCG6NHialQHJov0wg==}
'@rspack/binding@2.1.1':
resolution: {integrity: sha512-6062hZP33fn1w51ClpQnum19GGXl/3eS754xrRYbQ7wwBNZk94HVwfSyiqcNCtY/pB1lsFjnaTKiW/Q+jv0axQ==}
- '@rspack/binding@2.2.3':
- resolution: {integrity: sha512-532+T5N6yIdukChiL85H4NFN2vn9oi8wlLa1ByPNtpNYriE9s24fUhn0RiK7w/xACqnNpYmXCqLYCvjOzyCy+w==}
-
- '@rspack/core@2.0.0':
- resolution: {integrity: sha512-WD1mJM9LbZ7Z399Rbv9dE3BNEV0+3sE5OzDdzV8hOxUb3mX++ynK5n9kil8w60B6nGdcKeV9ly5aN4PgqiwWUg==}
- engines: {node: ^20.19.0 || >=22.12.0}
- peerDependencies:
- '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0
- '@swc/helpers': '>=0.5.1'
- peerDependenciesMeta:
- '@module-federation/runtime-tools':
- optional: true
- '@swc/helpers':
- optional: true
+ '@rspack/binding@2.2.7':
+ resolution: {integrity: sha512-opY7Sw6iwtBa23CeNj18GOqKBlaJUZXp52kNIGyNq+7jpCQKrJYeX5wiK7uBn8/ZpHQfhwNL2xxu5yzG4JFH1g==}
'@rspack/core@2.0.8':
resolution: {integrity: sha512-+NLGJf8gZxihDmMFzjlly3toc2SMjeDmuvz0/Cai9AMdV4F+Pqcnt2BA9V4e3SY2jmhJQtPwgyyLtR1RiJO77g==}
@@ -21311,8 +21243,8 @@ packages:
'@swc/helpers':
optional: true
- '@rspack/core@2.2.3':
- resolution: {integrity: sha512-VHejw+PDd5B5v6VduFyjLSTIFaHBMNGPMKw+Y0zjkMqjYhDD1hjLOBC5frRKjTWcfYdk+Q73auWPp9k/H9PfIQ==}
+ '@rspack/core@2.2.7':
+ resolution: {integrity: sha512-kWKd4lYp13GPAQy2eQITLTvPbl+ST7ffG/MCGHoX138o5eTetMQMe/oc7UAZAfjervAM6UOzEhiiCirPTpRBUQ==}
engines: {node: ^20.19.0 || >=22.12.0}
peerDependencies:
'@module-federation/runtime-tools': ^0.24.1 || ^2.0.0
@@ -33346,13 +33278,6 @@ snapshots:
'@tybys/wasm-util': 0.10.2
optional: true
- '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)':
- dependencies:
- '@emnapi/core': 1.11.1
- '@emnapi/runtime': 1.11.3
- '@tybys/wasm-util': 0.10.2
- optional: true
-
'@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)':
dependencies:
'@emnapi/core': 1.11.3
@@ -33832,11 +33757,11 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.19.0
- '@nx/devkit@23.2.0(nx@23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23)))':
+ '@nx/devkit@23.2.0(nx@23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23)))':
dependencies:
ejs: 5.0.1
minimatch: 10.2.5
- nx: 23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23))
+ nx: 23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23))
semver: 7.8.5
tslib: 2.8.1
yargs-parser: 21.1.1
@@ -34005,9 +33930,9 @@ snapshots:
'@oxc-minify/binding-openharmony-arm64@0.110.0':
optional: true
- '@oxc-minify/binding-wasm32-wasi@0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)':
+ '@oxc-minify/binding-wasm32-wasi@0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)':
dependencies:
- '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
transitivePeerDependencies:
- '@emnapi/core'
- '@emnapi/runtime'
@@ -34074,9 +33999,9 @@ snapshots:
'@oxc-resolver/binding-openharmony-arm64@11.19.1':
optional: true
- '@oxc-resolver/binding-wasm32-wasi@11.19.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)':
+ '@oxc-resolver/binding-wasm32-wasi@11.19.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)':
dependencies:
- '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
transitivePeerDependencies:
- '@emnapi/core'
- '@emnapi/runtime'
@@ -34139,9 +34064,9 @@ snapshots:
'@oxc-transform/binding-openharmony-arm64@0.110.0':
optional: true
- '@oxc-transform/binding-wasm32-wasi@0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)':
+ '@oxc-transform/binding-wasm32-wasi@0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)':
dependencies:
- '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
transitivePeerDependencies:
- '@emnapi/core'
- '@emnapi/runtime'
@@ -35480,7 +35405,7 @@ snapshots:
'@rsbuild/core@2.2.5':
dependencies:
- '@rspack/core': 2.2.3(@swc/helpers@0.5.23)
+ '@rspack/core': 2.2.7(@swc/helpers@0.5.23)
'@swc/helpers': 0.5.23
transitivePeerDependencies:
- '@module-federation/runtime-tools'
@@ -35498,18 +35423,18 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@rsbuild/plugin-react@2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.2.3(@swc/helpers@0.5.23))':
+ '@rsbuild/plugin-react@2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.2.7(@swc/helpers@0.5.23))':
dependencies:
- '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(react-refresh@0.18.0)
+ '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(react-refresh@0.18.0)
react-refresh: 0.18.0
optionalDependencies:
'@rsbuild/core': 2.0.14
transitivePeerDependencies:
- '@rspack/core'
- '@rsbuild/plugin-react@2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))':
+ '@rsbuild/plugin-react@2.0.0(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))':
dependencies:
- '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(react-refresh@0.18.0)
+ '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(react-refresh@0.18.0)
react-refresh: 0.18.0
optionalDependencies:
'@rsbuild/core': 2.1.1
@@ -35528,9 +35453,9 @@ snapshots:
- solid-js
- supports-color
- '@rsbuild/plugin-tailwindcss@2.0.3(@rsbuild/core@2.0.14)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(webpack@5.110.3)':
+ '@rsbuild/plugin-tailwindcss@2.0.3(@rsbuild/core@2.0.14)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(webpack@5.110.3)':
dependencies:
- '@tailwindcss/webpack': 4.3.1(@rspack/core@2.2.3(@swc/helpers@0.5.23))(webpack@5.110.3)
+ '@tailwindcss/webpack': 4.3.1(@rspack/core@2.2.7(@swc/helpers@0.5.23))(webpack@5.110.3)
optionalDependencies:
'@rsbuild/core': 2.0.14
transitivePeerDependencies:
@@ -35548,9 +35473,9 @@ snapshots:
- '@babel/core'
- supports-color
- '@rsbuild/plugin-vue@1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))':
+ '@rsbuild/plugin-vue@1.2.7(@rsbuild/core@2.1.1)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))':
dependencies:
- rspack-vue-loader: 17.5.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
+ rspack-vue-loader: 17.5.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))
optionalDependencies:
'@rsbuild/core': 2.1.1
transitivePeerDependencies:
@@ -35558,19 +35483,13 @@ snapshots:
- '@vue/compiler-sfc'
- vue
- '@rspack/binding-darwin-arm64@2.0.0':
- optional: true
-
'@rspack/binding-darwin-arm64@2.0.8':
optional: true
'@rspack/binding-darwin-arm64@2.1.1':
optional: true
- '@rspack/binding-darwin-arm64@2.2.3':
- optional: true
-
- '@rspack/binding-darwin-x64@2.0.0':
+ '@rspack/binding-darwin-arm64@2.2.7':
optional: true
'@rspack/binding-darwin-x64@2.0.8':
@@ -35579,10 +35498,7 @@ snapshots:
'@rspack/binding-darwin-x64@2.1.1':
optional: true
- '@rspack/binding-darwin-x64@2.2.3':
- optional: true
-
- '@rspack/binding-linux-arm64-gnu@2.0.0':
+ '@rspack/binding-darwin-x64@2.2.7':
optional: true
'@rspack/binding-linux-arm64-gnu@2.0.8':
@@ -35591,10 +35507,7 @@ snapshots:
'@rspack/binding-linux-arm64-gnu@2.1.1':
optional: true
- '@rspack/binding-linux-arm64-gnu@2.2.3':
- optional: true
-
- '@rspack/binding-linux-arm64-musl@2.0.0':
+ '@rspack/binding-linux-arm64-gnu@2.2.7':
optional: true
'@rspack/binding-linux-arm64-musl@2.0.8':
@@ -35603,28 +35516,25 @@ snapshots:
'@rspack/binding-linux-arm64-musl@2.1.1':
optional: true
- '@rspack/binding-linux-arm64-musl@2.2.3':
+ '@rspack/binding-linux-arm64-musl@2.2.7':
optional: true
- '@rspack/binding-linux-ppc64-gnu@2.2.3':
+ '@rspack/binding-linux-ppc64-gnu@2.2.7':
optional: true
'@rspack/binding-linux-riscv64-gnu@2.1.1':
optional: true
- '@rspack/binding-linux-riscv64-gnu@2.2.3':
+ '@rspack/binding-linux-riscv64-gnu@2.2.7':
optional: true
'@rspack/binding-linux-riscv64-musl@2.1.1':
optional: true
- '@rspack/binding-linux-riscv64-musl@2.2.3':
+ '@rspack/binding-linux-riscv64-musl@2.2.7':
optional: true
- '@rspack/binding-linux-s390x-gnu@2.2.3':
- optional: true
-
- '@rspack/binding-linux-x64-gnu@2.0.0':
+ '@rspack/binding-linux-s390x-gnu@2.2.7':
optional: true
'@rspack/binding-linux-x64-gnu@2.0.8':
@@ -35633,10 +35543,7 @@ snapshots:
'@rspack/binding-linux-x64-gnu@2.1.1':
optional: true
- '@rspack/binding-linux-x64-gnu@2.2.3':
- optional: true
-
- '@rspack/binding-linux-x64-musl@2.0.0':
+ '@rspack/binding-linux-x64-gnu@2.2.7':
optional: true
'@rspack/binding-linux-x64-musl@2.0.8':
@@ -35645,14 +35552,7 @@ snapshots:
'@rspack/binding-linux-x64-musl@2.1.1':
optional: true
- '@rspack/binding-linux-x64-musl@2.2.3':
- optional: true
-
- '@rspack/binding-wasm32-wasi@2.0.0':
- dependencies:
- '@emnapi/core': 1.10.0
- '@emnapi/runtime': 1.10.0
- '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)
+ '@rspack/binding-linux-x64-musl@2.2.7':
optional: true
'@rspack/binding-wasm32-wasi@2.0.8':
@@ -35669,26 +35569,20 @@ snapshots:
'@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)
optional: true
- '@rspack/binding-wasm32-wasi@2.2.3':
+ '@rspack/binding-wasm32-wasi@2.2.7':
dependencies:
'@emnapi/core': 1.11.3
'@emnapi/runtime': 1.11.3
'@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
optional: true
- '@rspack/binding-win32-arm64-msvc@2.0.0':
- optional: true
-
'@rspack/binding-win32-arm64-msvc@2.0.8':
optional: true
'@rspack/binding-win32-arm64-msvc@2.1.1':
optional: true
- '@rspack/binding-win32-arm64-msvc@2.2.3':
- optional: true
-
- '@rspack/binding-win32-ia32-msvc@2.0.0':
+ '@rspack/binding-win32-arm64-msvc@2.2.7':
optional: true
'@rspack/binding-win32-ia32-msvc@2.0.8':
@@ -35697,10 +35591,7 @@ snapshots:
'@rspack/binding-win32-ia32-msvc@2.1.1':
optional: true
- '@rspack/binding-win32-ia32-msvc@2.2.3':
- optional: true
-
- '@rspack/binding-win32-x64-msvc@2.0.0':
+ '@rspack/binding-win32-ia32-msvc@2.2.7':
optional: true
'@rspack/binding-win32-x64-msvc@2.0.8':
@@ -35709,22 +35600,9 @@ snapshots:
'@rspack/binding-win32-x64-msvc@2.1.1':
optional: true
- '@rspack/binding-win32-x64-msvc@2.2.3':
+ '@rspack/binding-win32-x64-msvc@2.2.7':
optional: true
- '@rspack/binding@2.0.0':
- optionalDependencies:
- '@rspack/binding-darwin-arm64': 2.0.0
- '@rspack/binding-darwin-x64': 2.0.0
- '@rspack/binding-linux-arm64-gnu': 2.0.0
- '@rspack/binding-linux-arm64-musl': 2.0.0
- '@rspack/binding-linux-x64-gnu': 2.0.0
- '@rspack/binding-linux-x64-musl': 2.0.0
- '@rspack/binding-wasm32-wasi': 2.0.0
- '@rspack/binding-win32-arm64-msvc': 2.0.0
- '@rspack/binding-win32-ia32-msvc': 2.0.0
- '@rspack/binding-win32-x64-msvc': 2.0.0
-
'@rspack/binding@2.0.8':
optionalDependencies:
'@rspack/binding-darwin-arm64': 2.0.8
@@ -35753,28 +35631,22 @@ snapshots:
'@rspack/binding-win32-ia32-msvc': 2.1.1
'@rspack/binding-win32-x64-msvc': 2.1.1
- '@rspack/binding@2.2.3':
+ '@rspack/binding@2.2.7':
optionalDependencies:
- '@rspack/binding-darwin-arm64': 2.2.3
- '@rspack/binding-darwin-x64': 2.2.3
- '@rspack/binding-linux-arm64-gnu': 2.2.3
- '@rspack/binding-linux-arm64-musl': 2.2.3
- '@rspack/binding-linux-ppc64-gnu': 2.2.3
- '@rspack/binding-linux-riscv64-gnu': 2.2.3
- '@rspack/binding-linux-riscv64-musl': 2.2.3
- '@rspack/binding-linux-s390x-gnu': 2.2.3
- '@rspack/binding-linux-x64-gnu': 2.2.3
- '@rspack/binding-linux-x64-musl': 2.2.3
- '@rspack/binding-wasm32-wasi': 2.2.3
- '@rspack/binding-win32-arm64-msvc': 2.2.3
- '@rspack/binding-win32-ia32-msvc': 2.2.3
- '@rspack/binding-win32-x64-msvc': 2.2.3
-
- '@rspack/core@2.0.0(@swc/helpers@0.5.23)':
- dependencies:
- '@rspack/binding': 2.0.0
- optionalDependencies:
- '@swc/helpers': 0.5.23
+ '@rspack/binding-darwin-arm64': 2.2.7
+ '@rspack/binding-darwin-x64': 2.2.7
+ '@rspack/binding-linux-arm64-gnu': 2.2.7
+ '@rspack/binding-linux-arm64-musl': 2.2.7
+ '@rspack/binding-linux-ppc64-gnu': 2.2.7
+ '@rspack/binding-linux-riscv64-gnu': 2.2.7
+ '@rspack/binding-linux-riscv64-musl': 2.2.7
+ '@rspack/binding-linux-s390x-gnu': 2.2.7
+ '@rspack/binding-linux-x64-gnu': 2.2.7
+ '@rspack/binding-linux-x64-musl': 2.2.7
+ '@rspack/binding-wasm32-wasi': 2.2.7
+ '@rspack/binding-win32-arm64-msvc': 2.2.7
+ '@rspack/binding-win32-ia32-msvc': 2.2.7
+ '@rspack/binding-win32-x64-msvc': 2.2.7
'@rspack/core@2.0.8(@swc/helpers@0.5.23)':
dependencies:
@@ -35788,19 +35660,19 @@ snapshots:
optionalDependencies:
'@swc/helpers': 0.5.23
- '@rspack/core@2.2.3(@swc/helpers@0.5.23)':
+ '@rspack/core@2.2.7(@swc/helpers@0.5.23)':
dependencies:
- '@rspack/binding': 2.2.3
+ '@rspack/binding': 2.2.7
optionalDependencies:
'@swc/helpers': 0.5.23
'@rspack/lite-tapable@1.1.0': {}
- '@rspack/plugin-react-refresh@2.0.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(react-refresh@0.18.0)':
+ '@rspack/plugin-react-refresh@2.0.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(react-refresh@0.18.0)':
dependencies:
react-refresh: 0.18.0
optionalDependencies:
- '@rspack/core': 2.2.3(@swc/helpers@0.5.23)
+ '@rspack/core': 2.2.7(@swc/helpers@0.5.23)
'@rushstack/node-core-library@5.7.0(@types/node@25.0.9)':
dependencies:
@@ -36200,14 +36072,14 @@ snapshots:
'@swc/core': 1.15.33(@swc/helpers@0.5.23)
'@swc/types': 0.1.26
- '@swc-node/register@1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0)':
+ '@swc-node/register@1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0)':
dependencies:
'@swc-node/core': 1.14.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)
'@swc-node/sourcemap-support': 0.6.1
'@swc/core': 1.15.33(@swc/helpers@0.5.23)
colorette: 2.0.20
debug: 4.4.3(supports-color@7.2.0)
- oxc-resolver: 11.19.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ oxc-resolver: 11.19.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
pirates: 4.0.7
tslib: 2.8.1
typescript: '@typescript/typescript6@6.0.2'
@@ -36428,14 +36300,14 @@ snapshots:
tailwindcss: 4.2.2
vite: 8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0)
- '@tailwindcss/webpack@4.3.1(@rspack/core@2.2.3(@swc/helpers@0.5.23))(webpack@5.110.3)':
+ '@tailwindcss/webpack@4.3.1(@rspack/core@2.2.7(@swc/helpers@0.5.23))(webpack@5.110.3)':
dependencies:
'@alloc/quick-lru': 5.2.0
'@tailwindcss/node': 4.3.1
'@tailwindcss/oxide': 4.3.1
tailwindcss: 4.3.1
optionalDependencies:
- '@rspack/core': 2.2.3(@swc/helpers@0.5.23)
+ '@rspack/core': 2.2.7(@swc/helpers@0.5.23)
webpack: 5.110.3(@swc/core@1.15.33(@swc/helpers@0.5.23))(clean-css@5.3.3)(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.23)(sharp@0.35.4(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4)
'@tanstack/devtools-client@0.0.4':
@@ -42677,7 +42549,7 @@ snapshots:
nf3@0.3.6: {}
- nitro@3.0.1-alpha.2(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(ioredis@5.11.1(supports-color@10.2.2))(lru-cache@11.5.1)(mysql2@3.15.3)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0)):
+ nitro@3.0.1-alpha.2(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(ioredis@5.11.1(supports-color@10.2.2))(lru-cache@11.5.1)(mysql2@3.15.3)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0)):
dependencies:
consola: 3.4.2
crossws: 0.4.3(srvx@0.10.1)
@@ -42687,8 +42559,8 @@ snapshots:
nf3: 0.3.6
ofetch: 2.0.0-alpha.3
ohash: 2.0.11
- oxc-minify: 0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
- oxc-transform: 0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ oxc-minify: 0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
+ oxc-transform: 0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
srvx: 0.10.1
undici: 7.24.4
unenv: 2.0.0-rc.24
@@ -42890,7 +42762,7 @@ snapshots:
- sqlite3
- uploadthing
- nitropack@2.13.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(@rspack/core@2.2.3(@swc/helpers@0.5.23))(mysql2@3.15.3)(rolldown@1.0.2)(srvx@0.11.22)(supports-color@10.2.2)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3):
+ nitropack@2.13.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(@rspack/core@2.2.7(@swc/helpers@0.5.23))(mysql2@3.15.3)(rolldown@1.0.2)(srvx@0.11.22)(supports-color@10.2.2)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3):
dependencies:
'@cloudflare/kv-asset-handler': 0.4.2
'@rollup/plugin-alias': 6.0.0(rollup@4.63.1)
@@ -42955,7 +42827,7 @@ snapshots:
uncrypto: 0.1.3
unctx: 2.5.0
unenv: 2.0.0-rc.24
- unimport: 6.4.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
+ unimport: 6.4.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
unplugin-utils: 0.3.1
unstorage: 1.17.5(@netlify/blobs@10.1.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.11.1(supports-color@10.2.2))
untyped: 2.0.0
@@ -43090,7 +42962,7 @@ snapshots:
nwsapi@2.2.16: {}
- nx@23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23)):
+ nx@23.2.0(@swc-node/register@1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0))(@swc/core@1.15.33(@swc/helpers@0.5.23)):
dependencies:
'@clack/core': 1.4.3
'@clack/prompts': 1.7.0
@@ -43227,7 +43099,7 @@ snapshots:
'@nx/nx-linux-x64-musl': 23.2.0
'@nx/nx-win32-arm64-msvc': 23.2.0
'@nx/nx-win32-x64-msvc': 23.2.0
- '@swc-node/register': 1.11.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0)
+ '@swc-node/register': 1.11.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(@typescript/typescript6@6.0.2)(supports-color@7.2.0)
'@swc/core': 1.15.33(@swc/helpers@0.5.23)
nypm@0.6.0:
@@ -43347,7 +43219,7 @@ snapshots:
outvariant@1.4.3: {}
- oxc-minify@0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3):
+ oxc-minify@0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3):
optionalDependencies:
'@oxc-minify/binding-android-arm-eabi': 0.110.0
'@oxc-minify/binding-android-arm64': 0.110.0
@@ -43365,7 +43237,7 @@ snapshots:
'@oxc-minify/binding-linux-x64-gnu': 0.110.0
'@oxc-minify/binding-linux-x64-musl': 0.110.0
'@oxc-minify/binding-openharmony-arm64': 0.110.0
- '@oxc-minify/binding-wasm32-wasi': 0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ '@oxc-minify/binding-wasm32-wasi': 0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
'@oxc-minify/binding-win32-arm64-msvc': 0.110.0
'@oxc-minify/binding-win32-ia32-msvc': 0.110.0
'@oxc-minify/binding-win32-x64-msvc': 0.110.0
@@ -43373,7 +43245,7 @@ snapshots:
- '@emnapi/core'
- '@emnapi/runtime'
- oxc-resolver@11.19.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3):
+ oxc-resolver@11.19.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3):
optionalDependencies:
'@oxc-resolver/binding-android-arm-eabi': 11.19.1
'@oxc-resolver/binding-android-arm64': 11.19.1
@@ -43391,7 +43263,7 @@ snapshots:
'@oxc-resolver/binding-linux-x64-gnu': 11.19.1
'@oxc-resolver/binding-linux-x64-musl': 11.19.1
'@oxc-resolver/binding-openharmony-arm64': 11.19.1
- '@oxc-resolver/binding-wasm32-wasi': 11.19.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ '@oxc-resolver/binding-wasm32-wasi': 11.19.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
'@oxc-resolver/binding-win32-arm64-msvc': 11.19.1
'@oxc-resolver/binding-win32-ia32-msvc': 11.19.1
'@oxc-resolver/binding-win32-x64-msvc': 11.19.1
@@ -43399,7 +43271,7 @@ snapshots:
- '@emnapi/core'
- '@emnapi/runtime'
- oxc-transform@0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3):
+ oxc-transform@0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3):
optionalDependencies:
'@oxc-transform/binding-android-arm-eabi': 0.110.0
'@oxc-transform/binding-android-arm64': 0.110.0
@@ -43417,7 +43289,7 @@ snapshots:
'@oxc-transform/binding-linux-x64-gnu': 0.110.0
'@oxc-transform/binding-linux-x64-musl': 0.110.0
'@oxc-transform/binding-openharmony-arm64': 0.110.0
- '@oxc-transform/binding-wasm32-wasi': 0.110.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)
+ '@oxc-transform/binding-wasm32-wasi': 0.110.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)
'@oxc-transform/binding-win32-arm64-msvc': 0.110.0
'@oxc-transform/binding-win32-ia32-msvc': 0.110.0
'@oxc-transform/binding-win32-x64-msvc': 0.110.0
@@ -44066,9 +43938,9 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.9
- react-server-dom-rspack@0.0.2(@rspack/core@2.0.0(@swc/helpers@0.5.23))(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
+ react-server-dom-rspack@0.0.2(@rspack/core@2.2.7(@swc/helpers@0.5.23))(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
dependencies:
- '@rspack/core': 2.0.0(@swc/helpers@0.5.23)
+ '@rspack/core': 2.2.7(@swc/helpers@0.5.23)
react: 19.2.3
react-dom: 19.2.3(react@19.2.3)
@@ -44408,12 +44280,12 @@ snapshots:
rrweb-cssom@0.8.0: {}
- rspack-vue-loader@17.5.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2)):
+ rspack-vue-loader@17.5.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2)):
dependencies:
'@rspack/lite-tapable': 1.1.0
chalk: 4.1.2
optionalDependencies:
- '@rspack/core': 2.2.3(@swc/helpers@0.5.23)
+ '@rspack/core': 2.2.7(@swc/helpers@0.5.23)
'@vue/compiler-sfc': 3.5.25
vue: 3.5.25(@typescript/typescript6@6.0.2)
@@ -45467,7 +45339,7 @@ snapshots:
unicorn-magic@0.4.0: {}
- unimport@6.4.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3):
+ unimport@6.4.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3):
dependencies:
acorn: 8.18.0
escape-string-regexp: 5.0.0
@@ -45481,7 +45353,7 @@ snapshots:
scule: 1.3.0
strip-literal: 4.0.0
tinyglobby: 0.2.17
- unplugin: 3.3.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
+ unplugin: 3.3.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3)
unplugin-utils: 0.3.2
optionalDependencies:
rolldown: 1.0.2
@@ -45529,13 +45401,13 @@ snapshots:
picomatch: 4.0.7
webpack-virtual-modules: 0.6.2
- unplugin@3.3.0(@rspack/core@2.2.3(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3):
+ unplugin@3.3.0(@rspack/core@2.2.7(@swc/helpers@0.5.23))(esbuild@0.28.2)(rolldown@1.0.2)(rollup@4.63.1)(vite@8.0.14(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass@1.97.2)(terser@5.37.0)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3):
dependencies:
'@jridgewell/remapping': 2.3.5
picomatch: 4.0.7
webpack-virtual-modules: 0.6.2
optionalDependencies:
- '@rspack/core': 2.2.3(@swc/helpers@0.5.23)
+ '@rspack/core': 2.2.7(@swc/helpers@0.5.23)
esbuild: 0.28.2
rolldown: 1.0.2
rollup: 4.63.1
From 2413cc009826fba4f97b166a35a8a50a4a8fe4bb Mon Sep 17 00:00:00 2001
From: Flo
Date: Sat, 3 Oct 2026 22:33:29 +0200
Subject: [PATCH 031/127] perf(react-router): reduce component nesting per
route match (#8594)
* perf(react-router): reduce component nesting per route match
* make it stable between server and client
---
.changeset/cold-icons-teach.md | 5 ++++
packages/react-router/src/Match.tsx | 44 ++++++++++++-----------------
2 files changed, 23 insertions(+), 26 deletions(-)
create mode 100644 .changeset/cold-icons-teach.md
diff --git a/.changeset/cold-icons-teach.md b/.changeset/cold-icons-teach.md
new file mode 100644
index 0000000000..71d89d79d2
--- /dev/null
+++ b/.changeset/cold-icons-teach.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/react-router': patch
+---
+
+reduce component nesting per route match
diff --git a/packages/react-router/src/Match.tsx b/packages/react-router/src/Match.tsx
index 474a155fbf..db1d341ec4 100644
--- a/packages/react-router/src/Match.tsx
+++ b/packages/react-router/src/Match.tsx
@@ -68,22 +68,16 @@ export const Match = React.memo(function MatchImpl({
if (isServer ?? router.isServer) {
const match = router.stores.byRoute.get(routeId)!.get()!
- return
+ return matchView(router, match)
}
const matchStore = router.stores.getMatchStore(routeId)
// eslint-disable-next-line react-hooks/rules-of-hooks
- const match = useSelector(matchStore)
- return
+ const match = useSelector(matchStore)!
+ return matchView(router, match)
})
-function MatchView({
- router,
- match,
-}: {
- router: ReturnType
- match: AnyRouteMatch
-}) {
+function matchView(router: ReturnType, match: AnyRouteMatch) {
const route: AnyRoute = router.routesById[match.routeId]
const pendingElement = renderPending(router, route)
@@ -169,24 +163,22 @@ function MatchView({
router.options.scrollRestoration ? (
) : null
- const ShellComponent = route.isRoot
- ? (route.options as RootRouteOptions).shellComponent
- : undefined
- // The shell and route boundaries must share this match's context.
- return (
+ const ShellComponent =
+ route.isRoot && (route.options as RootRouteOptions).shellComponent
+
+ return ShellComponent ? (
+ // The shell and route boundaries must share this match's context.
- {ShellComponent ? (
-
- {content}
- {scrollRestoration}
-
- ) : (
- <>
- {content}
- {scrollRestoration}
- >
- )}
+
+ {content}
+ {scrollRestoration}
+
+
+ ) : (
+
+ {content}
+ {scrollRestoration}
)
}
From b839f47027956f71ed2db51f436701801addb1d6 Mon Sep 17 00:00:00 2001
From: Flo
Date: Sun, 4 Oct 2026 13:02:43 +0200
Subject: [PATCH 032/127] test(e2e): wait for the destination route before
asserting shared widget CSS (#8603)
/lazy-css-lazy and /lazy-css-static both render `shared-widget`, and the URL
updates before the departing route unmounts, so assertions after `waitForURL`
could hit the old widget while it was being detached and read `""`. Wait for a
destination-only marker and use retrying `toHaveCSS` assertions instead.
Co-authored-by: Claude Opus 5.5
---
.../tests/start-manifest.spec.ts | 73 ++++++-------------
.../tests/start-manifest.spec.ts | 70 +++++++-----------
.../tests/start-manifest.spec.ts | 70 +++++++-----------
3 files changed, 73 insertions(+), 140 deletions(-)
diff --git a/e2e/react-start/start-manifest/tests/start-manifest.spec.ts b/e2e/react-start/start-manifest/tests/start-manifest.spec.ts
index 7dfa390997..bd7bd20e98 100644
--- a/e2e/react-start/start-manifest/tests/start-manifest.spec.ts
+++ b/e2e/react-start/start-manifest/tests/start-manifest.spec.ts
@@ -27,12 +27,6 @@ async function getBackgroundColor(testId: string, page: Page) {
.evaluate((element) => getComputedStyle(element).backgroundColor)
}
-async function getBorderTopColor(testId: string, page: Page) {
- return page
- .getByTestId(testId)
- .evaluate((element) => getComputedStyle(element).borderTopColor)
-}
-
function getStylesheetHrefsFromHtml(html: string) {
return Array.from(
html.matchAll(/ ]+rel="stylesheet"[^>]+href="([^"]+)"/g),
@@ -362,24 +356,19 @@ test('shared widget CSS stays applied when navigating from static to lazy route'
const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
- expect(await getBackgroundColor('shared-widget', page)).toBe(SHARED_WIDGET_BG)
- await expect
- .poll(() => getBorderTopColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
+ // Both routes render `shared-widget`: wait for the destination route before
+ // asserting on it, so the assertions cannot match the departing widget.
await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS stays applied when navigating from lazy to static route', async ({
@@ -389,28 +378,19 @@ test('shared widget CSS stays applied when navigating from lazy to static route'
await page.goto(buildUrl(baseURL!, '/lazy-css-lazy'))
await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ const widget = page.getByTestId('shared-widget')
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
await page.getByTestId('nav-/lazy-css-static').click()
await page.waitForURL('**/lazy-css-static')
+ // The URL updates before the lazy route unmounts, and both routes render
+ // `shared-widget`: wait for a marker only the static route renders.
await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
- const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
- await expect
- .poll(() => getBorderTopColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS is applied on direct navigation to lazy route', async ({
@@ -422,17 +402,8 @@ test('shared widget CSS is applied on direct navigation to lazy route', async ({
const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
-
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
- await expect
- .poll(() => getBorderTopColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS persists after navigating away from lazy and back', async ({
@@ -442,19 +413,21 @@ test('shared widget CSS persists after navigating away from lazy and back', asyn
await page.goto(buildUrl(baseURL!, '/lazy-css-static'))
await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
+ const widget = page.getByTestId('shared-widget')
+
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
- await expect(page.getByTestId('shared-widget')).toBeVisible()
+ await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
+ await expect(widget).toBeVisible()
await page.getByTestId('nav-home').click()
await page.waitForURL((url) => url.pathname === '/')
+ await expect(page.getByTestId('home-copy')).toBeVisible()
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
+ await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
diff --git a/e2e/solid-start/start-manifest/tests/start-manifest.spec.ts b/e2e/solid-start/start-manifest/tests/start-manifest.spec.ts
index 836f62a97f..ba74448d54 100644
--- a/e2e/solid-start/start-manifest/tests/start-manifest.spec.ts
+++ b/e2e/solid-start/start-manifest/tests/start-manifest.spec.ts
@@ -356,24 +356,19 @@ test('shared widget CSS stays applied when navigating from static to lazy route'
const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
- expect(await getBackgroundColor('shared-widget', page)).toBe(SHARED_WIDGET_BG)
- expect(
- await widget.evaluate(
- (element) => getComputedStyle(element).borderTopColor,
- ),
- ).toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
+ // Both routes render `shared-widget`: wait for the destination route before
+ // asserting on it, so the assertions cannot match the departing widget.
await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS stays applied when navigating from lazy to static route', async ({
@@ -383,27 +378,19 @@ test('shared widget CSS stays applied when navigating from lazy to static route'
await page.goto(buildUrl(baseURL!, '/lazy-css-lazy'))
await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ const widget = page.getByTestId('shared-widget')
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
await page.getByTestId('nav-/lazy-css-static').click()
await page.waitForURL('**/lazy-css-static')
+ // The URL updates before the lazy route unmounts, and both routes render
+ // `shared-widget`: wait for a marker only the static route renders.
+ await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
- const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
- expect(
- await widget.evaluate(
- (element) => getComputedStyle(element).borderTopColor,
- ),
- ).toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS is applied on direct navigation to lazy route', async ({
@@ -415,17 +402,8 @@ test('shared widget CSS is applied on direct navigation to lazy route', async ({
const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
-
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
- expect(
- await widget.evaluate(
- (element) => getComputedStyle(element).borderTopColor,
- ),
- ).toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS persists after navigating away from lazy and back', async ({
@@ -435,19 +413,21 @@ test('shared widget CSS persists after navigating away from lazy and back', asyn
await page.goto(buildUrl(baseURL!, '/lazy-css-static'))
await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
+ const widget = page.getByTestId('shared-widget')
+
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
- await expect(page.getByTestId('shared-widget')).toBeVisible()
+ await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
+ await expect(widget).toBeVisible()
await page.getByTestId('nav-home').click()
- await page.waitForURL(/\/([^/]*)(\/)?($|\?)/)
+ await page.waitForURL((url) => url.pathname === '/')
+ await expect(page.getByTestId('home-copy')).toBeVisible()
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
+ await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
diff --git a/e2e/vue-start/start-manifest/tests/start-manifest.spec.ts b/e2e/vue-start/start-manifest/tests/start-manifest.spec.ts
index 6c0f0d15ab..4d5bea0a33 100644
--- a/e2e/vue-start/start-manifest/tests/start-manifest.spec.ts
+++ b/e2e/vue-start/start-manifest/tests/start-manifest.spec.ts
@@ -372,24 +372,19 @@ test('shared widget CSS stays applied when navigating from static to lazy route'
const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
- expect(await getBackgroundColor('shared-widget', page)).toBe(SHARED_WIDGET_BG)
- expect(
- await widget.evaluate(
- (element) => getComputedStyle(element).borderTopColor,
- ),
- ).toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
+ // Both routes render `shared-widget`: wait for the destination route before
+ // asserting on it, so the assertions cannot match the departing widget.
await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS stays applied when navigating from lazy to static route', async ({
@@ -399,27 +394,19 @@ test('shared widget CSS stays applied when navigating from lazy to static route'
await page.goto(buildUrl(baseURL!, '/lazy-css-lazy'))
await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ const widget = page.getByTestId('shared-widget')
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
await page.getByTestId('nav-/lazy-css-static').click()
await page.waitForURL('**/lazy-css-static')
+ // The URL updates before the lazy route unmounts, and both routes render
+ // `shared-widget`: wait for a marker only the static route renders.
+ await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
- const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
- expect(
- await widget.evaluate(
- (element) => getComputedStyle(element).borderTopColor,
- ),
- ).toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS is applied on direct navigation to lazy route', async ({
@@ -431,17 +418,8 @@ test('shared widget CSS is applied on direct navigation to lazy route', async ({
const widget = page.getByTestId('shared-widget')
await expect(widget).toBeVisible()
-
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
- expect(
- await widget.evaluate(
- (element) => getComputedStyle(element).borderTopColor,
- ),
- ).toBe(SHARED_WIDGET_BORDER)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
test('shared widget CSS persists after navigating away from lazy and back', async ({
@@ -451,19 +429,21 @@ test('shared widget CSS persists after navigating away from lazy and back', asyn
await page.goto(buildUrl(baseURL!, '/lazy-css-static'))
await expect(page.getByTestId('lazy-css-static-hydrated')).toBeVisible()
+ const widget = page.getByTestId('shared-widget')
+
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
- await expect(page.getByTestId('shared-widget')).toBeVisible()
+ await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
+ await expect(widget).toBeVisible()
await page.getByTestId('nav-home').click()
- await page.waitForURL(/\/([^/]*)(\/)?($|\?)/)
+ await page.waitForURL((url) => url.pathname === '/')
+ await expect(page.getByTestId('home-copy')).toBeVisible()
await page.getByTestId('nav-/lazy-css-lazy').click()
await page.waitForURL('**/lazy-css-lazy')
+ await expect(page.getByTestId('lazy-css-lazy-heading')).toBeVisible()
- await expect
- .poll(() => getBackgroundColor('shared-widget', page), {
- timeout: 5_000,
- })
- .toBe(SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG)
+ await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER)
})
From dfe3dea88a28400db1677111e2b15ae7914782c2 Mon Sep 17 00:00:00 2001
From: Flo
Date: Sun, 4 Oct 2026 18:52:45 +0200
Subject: [PATCH 033/127] perf(router-core, history): small parsing and
bundle-size cleanups (#8605)
* fix(history): keep a leading query or fragment out of parseHref's pathname
parseHref compared the '?' and '#' indexes with '> 0', so an href that
starts with a query or fragment (reachable via hash history '/#?x=1'
or memory entries) kept it in the pathname as well, and the router
location became '?x=1?x=1'.
Co-Authored-By: Claude Opus 5.5
* perf(history): read hash-history locations with indexOf/slice
Replace split('#').slice(1)/join('#') with one indexOf and two slices
when reading the hash-history location. Characterization tests from
#8351 cover nested fragments, encoded '#', and an empty hash.
Co-Authored-By: Claude Opus 5.5
* perf(router-core,history): use slice where substring bounds are ordered
Every converted call has non-negative, ordered bounds (fixed offsets,
indexOf results within the same segment, or guarded by a '<' check).
extractParams' affix-stripping calls and the wildcard-tail suffix in
parseSegments keep substring: their bounds can cross.
Co-Authored-By: Claude Opus 5.5
* perf(router-core,history): drop a duplicated flag and a createHref wrapper
buildLocation's currentMatch now reads the location through current(),
which already marks the build as location-dependent. Browser history
passes its createHref directly; createHistory already wraps it.
Co-Authored-By: Claude Opus 5.5
---------
Co-authored-by: Claude Opus 5.5
---
.changeset/build-location-one-liners.md | 6 ++
.changeset/history-hash-allocations.md | 5 +
.changeset/history-leading-query-pathname.md | 5 +
.changeset/ordered-slice-bounds.md | 6 ++
packages/history/src/index.ts | 33 ++++---
.../history/tests/createHashHistory.test.ts | 98 +++++++++++++++++++
packages/history/tests/parseHref.test.ts | 12 +++
.../router-core/src/new-process-route-tree.ts | 14 +--
packages/router-core/src/router.ts | 6 +-
packages/router-core/src/searchParams.ts | 2 +-
.../tests/history-normalization.test.ts | 22 +++++
11 files changed, 182 insertions(+), 27 deletions(-)
create mode 100644 .changeset/build-location-one-liners.md
create mode 100644 .changeset/history-hash-allocations.md
create mode 100644 .changeset/history-leading-query-pathname.md
create mode 100644 .changeset/ordered-slice-bounds.md
diff --git a/.changeset/build-location-one-liners.md b/.changeset/build-location-one-liners.md
new file mode 100644
index 0000000000..6986df6704
--- /dev/null
+++ b/.changeset/build-location-one-liners.md
@@ -0,0 +1,6 @@
+---
+'@tanstack/history': patch
+'@tanstack/router-core': patch
+---
+
+Drop a duplicated current-location flag and a redundant `createHref` wrapper.
diff --git a/.changeset/history-hash-allocations.md b/.changeset/history-hash-allocations.md
new file mode 100644
index 0000000000..ba8755bb97
--- /dev/null
+++ b/.changeset/history-hash-allocations.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/history': patch
+---
+
+Avoid temporary arrays when reading hash-history locations.
diff --git a/.changeset/history-leading-query-pathname.md b/.changeset/history-leading-query-pathname.md
new file mode 100644
index 0000000000..5eef2604d0
--- /dev/null
+++ b/.changeset/history-leading-query-pathname.md
@@ -0,0 +1,5 @@
+---
+'@tanstack/history': patch
+---
+
+Keep a leading query or fragment out of the parsed pathname, so hash-history URLs like `/#?x=1` no longer repeat the query in the router location.
diff --git a/.changeset/ordered-slice-bounds.md b/.changeset/ordered-slice-bounds.md
new file mode 100644
index 0000000000..0838a6aee8
--- /dev/null
+++ b/.changeset/ordered-slice-bounds.md
@@ -0,0 +1,6 @@
+---
+'@tanstack/history': patch
+'@tanstack/router-core': patch
+---
+
+Use `slice` instead of `substring` where the bounds are always ordered and non-negative.
diff --git a/packages/history/src/index.ts b/packages/history/src/index.ts
index 1c9bd5ed18..9924779d8f 100644
--- a/packages/history/src/index.ts
+++ b/packages/history/src/index.ts
@@ -546,7 +546,7 @@ export function createBrowserHistory(opts?: {
}
win.history.go(n)
},
- createHref: (href) => createHref(href),
+ createHref,
flush,
destroy: () => {
win.history.pushState = originalPushState
@@ -613,14 +613,17 @@ export function createHashHistory(opts?: { window?: any }): RouterHistory {
return createBrowserHistory({
window: win,
parseLocation: () => {
- const hashSplit = win.location.hash.split('#').slice(1)
- const pathPart = hashSplit[0] ?? '/'
- const searchPart = win.location.search
- const hashEntries = hashSplit.slice(1)
- const hashPart =
- hashEntries.length === 0 ? '' : `#${hashEntries.join('#')}`
- const hashHref = `${pathPart}${searchPart}${hashPart}`
- return parseHref(hashHref, win.history.state)
+ // `#/path?query#fragment`: the router's own fragment starts at the
+ // second '#'. A non-empty `location.hash` always starts with '#'.
+ const hash = win.location.hash
+ let hashIndex = hash.indexOf('#', 1)
+ if (hashIndex < 0) {
+ hashIndex = hash.length
+ }
+ return parseHref(
+ `${hash ? hash.slice(1, hashIndex) : '/'}${win.location.search}${hash.slice(hashIndex)}`,
+ win.history.state,
+ )
},
createHref: (href) =>
`${win.location.pathname}${win.location.search}#${href}`,
@@ -753,17 +756,17 @@ export function parseHref(
return {
href: sanitizedHref,
- pathname: sanitizedHref.substring(
+ pathname: sanitizedHref.slice(
0,
- hashIndex > 0
- ? searchIndex > 0
+ hashIndex > -1
+ ? searchIndex > -1
? Math.min(hashIndex, searchIndex)
: hashIndex
- : searchIndex > 0
+ : searchIndex > -1
? searchIndex
: sanitizedHref.length,
),
- hash: hashIndex > -1 ? sanitizedHref.substring(hashIndex) : '',
+ hash: hashIndex > -1 ? sanitizedHref.slice(hashIndex) : '',
search:
searchIndex > -1
? sanitizedHref.slice(
@@ -777,5 +780,5 @@ export function parseHref(
// Thanks co-pilot!
function createRandomKey() {
- return (Math.random() + 1).toString(36).substring(7)
+ return (Math.random() + 1).toString(36).slice(7)
}
diff --git a/packages/history/tests/createHashHistory.test.ts b/packages/history/tests/createHashHistory.test.ts
index 621cefe156..e54b1a1ae1 100644
--- a/packages/history/tests/createHashHistory.test.ts
+++ b/packages/history/tests/createHashHistory.test.ts
@@ -25,6 +25,32 @@ describe('createHashHistory', () => {
},
)
+ test('reads a hash route that starts with a query without leaking it into the pathname', () => {
+ const window = {
+ location: { pathname: '/', search: '', hash: '#?x=1' },
+ history: {
+ state: { __TSR_index: 0, __TSR_key: 'initial' },
+ length: 1,
+ pushState: vi.fn(),
+ replaceState: vi.fn(),
+ back: vi.fn(),
+ forward: vi.fn(),
+ go: vi.fn(),
+ },
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ }
+ const history = createHashHistory({ window })
+
+ expect(history.location).toMatchObject({
+ href: '?x=1',
+ pathname: '',
+ search: '?x=1',
+ hash: '',
+ })
+ history.destroy()
+ })
+
test('normalizes the final browser href without changing the logical hash location', async () => {
const pushState = vi.fn()
const window = {
@@ -59,6 +85,78 @@ describe('createHashHistory', () => {
history.destroy()
})
+ test.each([
+ [
+ '/?shell=1#/hello#section#tail',
+ {
+ href: '/hello?shell=1#section#tail',
+ pathname: '/hello',
+ search: '?shell=1',
+ hash: '#section#tail',
+ },
+ ],
+ [
+ '/?shell=1#/hello?route=2#section',
+ {
+ href: '/hello?route=2?shell=1#section',
+ pathname: '/hello',
+ search: '?route=2?shell=1',
+ hash: '#section',
+ },
+ ],
+ [
+ '/#/hello##tail#',
+ {
+ href: '/hello##tail#',
+ pathname: '/hello',
+ search: '',
+ hash: '##tail#',
+ },
+ ],
+ [
+ '/#/hello%23nested?value=%23#anchor%23tail',
+ {
+ href: '/hello%23nested?value=%23#anchor%23tail',
+ pathname: '/hello%23nested',
+ search: '?value=%23',
+ hash: '#anchor%23tail',
+ },
+ ],
+ [
+ '/?shell=1#//evil.example/path#fragment',
+ {
+ href: '/evil.example/path?shell=1#fragment',
+ pathname: '/evil.example/path',
+ search: '?shell=1',
+ hash: '#fragment',
+ },
+ ],
+ [
+ '/?shell=1#',
+ {
+ href: '/?shell=1',
+ pathname: '/',
+ search: '?shell=1',
+ hash: '',
+ },
+ ],
+ ])('preserves the logical URL when reading %s', (href, expected) => {
+ const originalHref = window.location.href
+ const originalState = window.history.state
+ window.history.replaceState(null, '', href)
+ const history = createHashHistory()
+
+ try {
+ expect(history.location).toMatchObject(expected)
+ window.history.replaceState(window.history.state, '', '/shell')
+ window.history.pushState(window.history.state, '', href)
+ expect(history.location).toMatchObject(expected)
+ } finally {
+ history.destroy()
+ window.history.replaceState(originalState, '', originalHref)
+ }
+ })
+
describe('parseLocation', () => {
describe.each([
['/', { pathname: '/', search: '' }, 'neither search params nor hash'],
diff --git a/packages/history/tests/parseHref.test.ts b/packages/history/tests/parseHref.test.ts
index 10df49d330..aa6882e6fc 100644
--- a/packages/history/tests/parseHref.test.ts
+++ b/packages/history/tests/parseHref.test.ts
@@ -21,6 +21,18 @@ describe('parseHref', () => {
expect(parsed.hash).toEqual('#qux')
})
+ test.each([
+ ['?x=1', { pathname: '', search: '?x=1', hash: '' }],
+ ['#top', { pathname: '', search: '', hash: '#top' }],
+ ['?x=1#top', { pathname: '', search: '?x=1', hash: '#top' }],
+ ['#top?x=1', { pathname: '', search: '', hash: '#top?x=1' }],
+ ])(
+ 'keeps a leading query or fragment out of the pathname: %j',
+ (href, expected) => {
+ expect(parseHref(href, undefined)).toMatchObject({ href, ...expected })
+ },
+ )
+
test.each([
{ __TSR_index: 2 },
{ __TSR_index: 2, key: 'legacy-key', __TSR_key: 'current-key' },
diff --git a/packages/router-core/src/new-process-route-tree.ts b/packages/router-core/src/new-process-route-tree.ts
index df1e224e82..fd63889df2 100644
--- a/packages/router-core/src/new-process-route-tree.ts
+++ b/packages/router-core/src/new-process-route-tree.ts
@@ -60,11 +60,11 @@ export function parseSegment(
/** The next slash, or the length of the path. */
end: number,
): InterpolationSegment {
- const part = path.substring(start, end)
+ const part = path.slice(start, end)
if (part.charCodeAt(0) === 36) {
return part.length === 1
? [SEGMENT_TYPE_WILDCARD, '_splat', '', undefined]
- : [SEGMENT_TYPE_PARAM, part.substring(1), '', '']
+ : [SEGMENT_TYPE_PARAM, part.slice(1), '', '']
}
const open = part.indexOf('{')
if (open >= 0) {
@@ -76,7 +76,7 @@ export function parseSegment(
part.charCodeAt(nameStart - 1) === 36 &&
(!optional || nameStart < close)
) {
- const key = part.substring(nameStart, close)
+ const key = part.slice(nameStart, close)
return [
optional
? SEGMENT_TYPE_OPTIONAL_PARAM
@@ -84,8 +84,8 @@ export function parseSegment(
? SEGMENT_TYPE_PARAM
: SEGMENT_TYPE_WILDCARD,
key || '_splat',
- part.substring(0, open),
- path.substring(start + close + 1, key ? end : path.length),
+ part.slice(0, open),
+ path.slice(start + close + 1, key ? end : path.length),
]
}
}
@@ -193,7 +193,7 @@ export function parseSegments(
if (interpolation && literalStart < end) {
// Retain original spelling before matcher case folding.
if (literalStart < start - 1) {
- interpolation.push(path.substring(literalStart, start - 1))
+ interpolation.push(path.slice(literalStart, start - 1))
}
segment[2 /* prefix */] = '/' + prefix
if (
@@ -253,7 +253,7 @@ export function parseSegments(
}
if (interpolation && literalStart < literalEnd) {
- interpolation.push(path.substring(literalStart, literalEnd))
+ interpolation.push(path.slice(literalStart, literalEnd))
}
// Discard push()'s spare capacity before retaining this array on both owners.
const segmentData = interpolation?.slice()
diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts
index a70df71652..d3379a85f2 100644
--- a/packages/router-core/src/router.ts
+++ b/packages/router-core/src/router.ts
@@ -1926,10 +1926,8 @@ export class RouterCore<
usedCurrent = true
return currentLocation
}
- const currentMatch = () => {
- usedCurrent = true
- return (lightweight ??= this.matchRoutesLightweight(currentLocation))
- }
+ const currentMatch = () =>
+ (lightweight ??= this.matchRoutesLightweight(current()))
// check that from path exists in the current route tree
// do this check only on navigations during test or development
diff --git a/packages/router-core/src/searchParams.ts b/packages/router-core/src/searchParams.ts
index 926e4e53dd..19155586e8 100644
--- a/packages/router-core/src/searchParams.ts
+++ b/packages/router-core/src/searchParams.ts
@@ -27,7 +27,7 @@ export function parseSearchWith(parser: (str: string) => any) {
const isJsonParser = parser === JSON.parse
return (searchStr: string): AnySchema => {
if (searchStr[0] === '?') {
- searchStr = searchStr.substring(1)
+ searchStr = searchStr.slice(1)
}
const query: Record = decode(searchStr)
diff --git a/packages/router-core/tests/history-normalization.test.ts b/packages/router-core/tests/history-normalization.test.ts
index 3d0bf8fbbc..b862a35b7d 100644
--- a/packages/router-core/tests/history-normalization.test.ts
+++ b/packages/router-core/tests/history-normalization.test.ts
@@ -190,4 +190,26 @@ describe('history normalization boundaries', () => {
}
},
)
+
+ test('reads a hash route that starts with a query once', async () => {
+ window.history.replaceState(null, '', '/shell#?x=1')
+ const history = createHashHistory()
+ try {
+ const root = new BaseRootRoute()
+ const index = new BaseRoute({ getParentRoute: () => root, path: '/' })
+ const router = createTestRouter({
+ routeTree: root.addChildren([index]),
+ history,
+ isServer: false,
+ })
+ await router.load()
+ expect(router.state.location.search).toEqual({ x: 1 })
+ // The query must not also be read as part of the pathname.
+ expect(router.state.location.href).toMatch(/^\/?\?x=1$/)
+ expect(router.state.matches.at(-1)?.routeId).toBe(index.id)
+ } finally {
+ history.destroy()
+ window.history.replaceState(null, '', '/')
+ }
+ })
})
From 2741b159af279ce6db14c5e85aa8671ddbed1b9e Mon Sep 17 00:00:00 2001
From: Flo
Date: Sun, 4 Oct 2026 19:25:58 +0200
Subject: [PATCH 034/127] test(benchmarks): add a client-nav scenario for
departing, staying and mounting Links (#8604)
* test(benchmarks): add a client-nav scenario for departing, staying and mounting Links
Co-Authored-By: Claude Opus 5.5
* test(benchmarks): size link-churn to 60 staying and 200 departing Links
Co-Authored-By: Claude Opus 5.5
* test(benchmarks): halve link-churn to 30 staying and 100 departing Links
Co-Authored-By: Claude Opus 5.5
---------
Co-authored-by: Claude Opus 5.5
---
benchmarks/client-nav/README.md | 1 +
benchmarks/client-nav/package.json | 6 +
.../scenarios/link-churn/react/project.json | 40 ++++
.../scenarios/link-churn/react/setup.ts | 18 ++
.../scenarios/link-churn/react/speed.bench.ts | 32 ++++
.../scenarios/link-churn/react/speed.flame.ts | 18 ++
.../scenarios/link-churn/react/src/main.tsx | 37 ++++
.../link-churn/react/src/routeTree.gen.ts | 121 ++++++++++++
.../link-churn/react/src/routes/__root.tsx | 39 ++++
.../react/src/routes/hub.detail.$id.tsx | 21 +++
.../link-churn/react/src/routes/hub.list.tsx | 65 +++++++
.../link-churn/react/src/routes/hub.tsx | 64 +++++++
.../link-churn/react/src/routes/other.tsx | 14 ++
.../scenarios/link-churn/react/tsconfig.json | 21 +++
.../scenarios/link-churn/react/vite.config.ts | 42 +++++
.../client-nav/scenarios/link-churn/shared.ts | 178 ++++++++++++++++++
.../scenarios/link-churn/solid/project.json | 40 ++++
.../scenarios/link-churn/solid/setup.ts | 18 ++
.../scenarios/link-churn/solid/speed.bench.ts | 32 ++++
.../scenarios/link-churn/solid/speed.flame.ts | 18 ++
.../scenarios/link-churn/solid/src/main.tsx | 34 ++++
.../link-churn/solid/src/routeTree.gen.ts | 121 ++++++++++++
.../link-churn/solid/src/routes/__root.tsx | 39 ++++
.../solid/src/routes/hub.detail.$id.tsx | 24 +++
.../link-churn/solid/src/routes/hub.list.tsx | 68 +++++++
.../link-churn/solid/src/routes/hub.tsx | 67 +++++++
.../link-churn/solid/src/routes/other.tsx | 14 ++
.../scenarios/link-churn/solid/tsconfig.json | 21 +++
.../scenarios/link-churn/solid/vite.config.ts | 50 +++++
.../scenarios/link-churn/vue/project.json | 40 ++++
.../scenarios/link-churn/vue/setup.ts | 18 ++
.../scenarios/link-churn/vue/speed.bench.ts | 32 ++++
.../scenarios/link-churn/vue/speed.flame.ts | 18 ++
.../scenarios/link-churn/vue/src/main.tsx | 41 ++++
.../link-churn/vue/src/routeTree.gen.ts | 121 ++++++++++++
.../link-churn/vue/src/routes/__root.tsx | 46 +++++
.../vue/src/routes/hub.detail.$id.tsx | 27 +++
.../link-churn/vue/src/routes/hub.list.tsx | 74 ++++++++
.../link-churn/vue/src/routes/hub.tsx | 69 +++++++
.../link-churn/vue/src/routes/other.tsx | 17 ++
.../scenarios/link-churn/vue/tsconfig.json | 21 +++
.../scenarios/link-churn/vue/vite.config.ts | 44 +++++
42 files changed, 1831 insertions(+)
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/project.json
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/setup.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/speed.bench.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/speed.flame.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/src/main.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/src/routeTree.gen.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/src/routes/__root.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.detail.$id.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.list.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/src/routes/other.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/tsconfig.json
create mode 100644 benchmarks/client-nav/scenarios/link-churn/react/vite.config.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/shared.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/project.json
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/setup.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/speed.bench.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/speed.flame.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/src/main.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/src/routeTree.gen.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/src/routes/__root.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.detail.$id.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.list.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/src/routes/other.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/tsconfig.json
create mode 100644 benchmarks/client-nav/scenarios/link-churn/solid/vite.config.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/project.json
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/setup.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/speed.bench.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/speed.flame.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/src/main.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/src/routeTree.gen.ts
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/src/routes/__root.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.detail.$id.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.list.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/src/routes/other.tsx
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/tsconfig.json
create mode 100644 benchmarks/client-nav/scenarios/link-churn/vue/vite.config.ts
diff --git a/benchmarks/client-nav/README.md b/benchmarks/client-nav/README.md
index b49bc02376..ab09596200 100644
--- a/benchmarks/client-nav/README.md
+++ b/benchmarks/client-nav/README.md
@@ -59,6 +59,7 @@ be attributed to a specific feature area.
| `head` | `HeadContent` per-navigation work: nested route `head()` evaluation, title/meta/link dedupe across matches, and head tag DOM updates during navigation. |
| `history` | History push/replace/back/forward traversal, location masking, registered-but-never-blocking `useBlocker`, and `useCanGoBack`/`useLocation` subscriptions. |
| `hydration` | Initial DOM hydration: execute the SSR payload, restore `beforeLoad` context and loader data, and hydrate 192 ordinary and eight hash-sensitive Links through their follow-up effects in React and Solid. |
+| `link-churn` | Links that depart, stay and mount: 30 `/hub` layout Links stay while 100 `/hub/list` leaf Links leave (alone, or with the layout to `/other`) and remount on return; a search-only change rebuilds updater and `to="."` Links. Unlike `links`, whose root-layout Links never depart. |
| `links` | Per-navigation cost of ~200 mounted ` `s: link prop building, active-state recompute across `activeOptions` variants, `activeProps` swaps, and `useMatchRoute` probes (the `MatchRoute` component is avoided: vue-router's implementation leaks one subscription per render). |
| `loaders` | Client loader dispatch: always-stale re-runs (`staleTime: 0`), cached revisits (re-run once per lap by the `invalidate` step), `loaderDeps`-keyed caching, `router.invalidate()`, and `useLoaderData` selectors. |
| `mount` | Cold start: `createRouter` (route-tree processing) + first render + initial `router.load()` + unmount, with a fresh router per mount. |
diff --git a/benchmarks/client-nav/package.json b/benchmarks/client-nav/package.json
index 1aadf1e07c..bc2eb66c4c 100644
--- a/benchmarks/client-nav/package.json
+++ b/benchmarks/client-nav/package.json
@@ -65,6 +65,7 @@
"@benchmarks/client-nav-head-react",
"@benchmarks/client-nav-history-react",
"@benchmarks/client-nav-hydration-react",
+ "@benchmarks/client-nav-link-churn-react",
"@benchmarks/client-nav-links-react",
"@benchmarks/client-nav-loaders-react",
"@benchmarks/client-nav-mount-react",
@@ -94,6 +95,7 @@
"@benchmarks/client-nav-head-solid",
"@benchmarks/client-nav-history-solid",
"@benchmarks/client-nav-hydration-solid",
+ "@benchmarks/client-nav-link-churn-solid",
"@benchmarks/client-nav-links-solid",
"@benchmarks/client-nav-loaders-solid",
"@benchmarks/client-nav-mount-solid",
@@ -122,6 +124,7 @@
"@benchmarks/client-nav-control-flow-vue",
"@benchmarks/client-nav-head-vue",
"@benchmarks/client-nav-history-vue",
+ "@benchmarks/client-nav-link-churn-vue",
"@benchmarks/client-nav-links-vue",
"@benchmarks/client-nav-loaders-vue",
"@benchmarks/client-nav-mount-vue",
@@ -205,8 +208,11 @@
"@benchmarks/client-nav-history-vue",
"@benchmarks/client-nav-hydration-react",
"@benchmarks/client-nav-hydration-solid",
+ "@benchmarks/client-nav-link-churn-react",
"@benchmarks/client-nav-links-react",
+ "@benchmarks/client-nav-link-churn-solid",
"@benchmarks/client-nav-links-solid",
+ "@benchmarks/client-nav-link-churn-vue",
"@benchmarks/client-nav-links-vue",
"@benchmarks/client-nav-loaders-react",
"@benchmarks/client-nav-loaders-solid",
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/project.json b/benchmarks/client-nav/scenarios/link-churn/react/project.json
new file mode 100644
index 0000000000..1606b2c456
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/project.json
@@ -0,0 +1,40 @@
+{
+ "name": "@benchmarks/client-nav-link-churn-react",
+ "projectType": "application",
+ "targets": {
+ "build:client": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": [
+ {
+ "projects": ["@tanstack/react-router", "@tanstack/router-plugin"],
+ "target": "build"
+ }
+ ],
+ "options": {
+ "command": "NODE_ENV=production vite build --config {projectRoot}/vite.config.ts"
+ }
+ },
+ "test:types:client": {
+ "executor": "nx:run-commands",
+ "dependsOn": [
+ {
+ "projects": ["@tanstack/react-router", "@tanstack/router-plugin"],
+ "target": "build"
+ }
+ ],
+ "options": {
+ "command": "tsc -p {projectRoot}/tsconfig.json --noEmit"
+ }
+ },
+ "test:flame": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": ["build:client"],
+ "options": {
+ "command": "NODE_ENV=production flame run --md-format=detailed --delay=none --node-options=\"--stack-size=65500\" ./scenarios/link-churn/react/speed.flame.ts",
+ "cwd": "benchmarks/client-nav"
+ }
+ }
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/setup.ts b/benchmarks/client-nav/scenarios/link-churn/react/setup.ts
new file mode 100644
index 0000000000..59221603da
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/setup.ts
@@ -0,0 +1,18 @@
+import { createScenarioSetup } from '../../harness'
+import { assertStepResult, initialUrl, scenarioSteps } from '../shared'
+import type * as App from './src/main'
+
+const appModulePath = './dist/app.js'
+const { mountTestApp } = (await import(
+ /* @vite-ignore */ appModulePath
+)) as typeof App
+
+export function setup() {
+ return createScenarioSetup({
+ frameworkLabel: 'React',
+ mount: mountTestApp,
+ steps: scenarioSteps,
+ assertAfterStep: assertStepResult,
+ initialUrl,
+ })
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/speed.bench.ts b/benchmarks/client-nav/scenarios/link-churn/react/speed.bench.ts
new file mode 100644
index 0000000000..05197319b8
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/speed.bench.ts
@@ -0,0 +1,32 @@
+import { afterEach, beforeEach, bench, describe } from 'vitest'
+import { benchOptions, ticksPerIteration } from '../shared'
+import { setup } from './setup'
+
+describe('client-link-churn', () => {
+ const test = setup()
+
+ /**
+ * Running `vitest bench` ignores suite hooks, so Tinybench uses the `setup`
+ * and `teardown` options below. CodSpeed bypasses those options but supports
+ * `beforeEach` and `afterEach`. Only one lifecycle path runs in either
+ * environment, and every measured invocation receives fresh application state.
+ */
+
+ beforeEach(test.before)
+ afterEach(test.after)
+
+ bench(
+ 'client-link-churn navigation loop (react)',
+ async () => {
+ for (let i = 0; i < ticksPerIteration; i++) {
+ await test.tick()
+ }
+ await test.finishBatch()
+ },
+ {
+ ...benchOptions,
+ setup: test.before,
+ teardown: test.after,
+ },
+ )
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/speed.flame.ts b/benchmarks/client-nav/scenarios/link-churn/react/speed.flame.ts
new file mode 100644
index 0000000000..f4a0b4e6ff
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/speed.flame.ts
@@ -0,0 +1,18 @@
+import { window } from '../../../jsdom.ts'
+import { setup } from './setup.ts'
+
+const DURATION_MS = 10_000
+
+const test = setup()
+
+try {
+ await test.before()
+
+ const startedAt = performance.now()
+ while (performance.now() - startedAt < DURATION_MS) {
+ await test.tick()
+ }
+} finally {
+ test.after()
+ window.close()
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/src/main.tsx b/benchmarks/client-nav/scenarios/link-churn/react/src/main.tsx
new file mode 100644
index 0000000000..5febd6f795
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/src/main.tsx
@@ -0,0 +1,37 @@
+import type { RouterHistory } from '@tanstack/history'
+import { RouterProvider, createRouter } from '@tanstack/react-router'
+import { createRoot } from 'react-dom/client'
+import { routeTree } from './routeTree.gen'
+
+export function createTestRouter(history: RouterHistory) {
+ return createRouter({
+ routeTree,
+ history,
+ scrollRestoration: true,
+ // Key the scroll-restoration cache by pathname instead of the default
+ // random per-entry location key: with push navigations the default mints
+ // a fresh key per navigation and the module-level cache grows one entry
+ // per push for the whole run, which is non-stationary.
+ getScrollRestorationKey: (location) => location.pathname,
+ })
+}
+
+declare module '@tanstack/react-router' {
+ interface Register {
+ router: ReturnType
+ }
+}
+
+export function mountTestApp(container: HTMLElement, history: RouterHistory) {
+ const router = createTestRouter(history)
+
+ const reactRoot = createRoot(container)
+ reactRoot.render( )
+
+ return {
+ router,
+ unmount() {
+ reactRoot.unmount()
+ },
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/link-churn/react/src/routeTree.gen.ts
new file mode 100644
index 0000000000..4535430b61
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/src/routeTree.gen.ts
@@ -0,0 +1,121 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as HubRouteImport } from './routes/hub'
+import { Route as OtherRouteImport } from './routes/other'
+import { Route as HubListRouteImport } from './routes/hub.list'
+import { Route as HubDetailIdRouteImport } from './routes/hub.detail.$id'
+
+const HubRoute = HubRouteImport.update({
+ id: '/hub',
+ path: '/hub',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const OtherRoute = OtherRouteImport.update({
+ id: '/other',
+ path: '/other',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const HubListRoute = HubListRouteImport.update({
+ id: '/list',
+ path: '/list',
+ getParentRoute: () => HubRoute,
+} as any)
+const HubDetailIdRoute = HubDetailIdRouteImport.update({
+ id: '/detail/$id',
+ path: '/detail/$id',
+ getParentRoute: () => HubRoute,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRoutesByTo {
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths: '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ fileRoutesByTo: FileRoutesByTo
+ to: '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ id: '__root__' | '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ HubRoute: typeof HubRouteWithChildren
+ OtherRoute: typeof OtherRoute
+}
+
+declare module '@tanstack/react-router' {
+ interface FileRoutesByPath {
+ '/hub': {
+ id: '/hub'
+ path: '/hub'
+ fullPath: '/hub'
+ preLoaderRoute: typeof HubRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/other': {
+ id: '/other'
+ path: '/other'
+ fullPath: '/other'
+ preLoaderRoute: typeof OtherRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/hub/list': {
+ id: '/hub/list'
+ path: '/list'
+ fullPath: '/hub/list'
+ preLoaderRoute: typeof HubListRouteImport
+ parentRoute: typeof HubRoute
+ }
+ '/hub/detail/$id': {
+ id: '/hub/detail/$id'
+ path: '/detail/$id'
+ fullPath: '/hub/detail/$id'
+ preLoaderRoute: typeof HubDetailIdRouteImport
+ parentRoute: typeof HubRoute
+ }
+ }
+}
+
+interface HubRouteChildren {
+ HubListRoute: typeof HubListRoute
+ HubDetailIdRoute: typeof HubDetailIdRoute
+}
+
+const HubRouteChildren: HubRouteChildren = {
+ HubListRoute: HubListRoute,
+ HubDetailIdRoute: HubDetailIdRoute,
+}
+
+const HubRouteWithChildren = HubRoute._addFileChildren(HubRouteChildren)
+
+const rootRouteChildren: RootRouteChildren = {
+ HubRoute: HubRouteWithChildren,
+ OtherRoute: OtherRoute,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes()
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/__root.tsx b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/__root.tsx
new file mode 100644
index 0000000000..199cf1ff73
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/__root.tsx
@@ -0,0 +1,39 @@
+import { Link, Outlet, createRootRoute } from '@tanstack/react-router'
+import { sortedSearch } from '../../../shared'
+
+export const Route = createRootRoute({
+ component: RootComponent,
+})
+
+function RootComponent() {
+ return (
+ <>
+
+
+ List
+
+
+ List sorted
+
+
+ Detail 1
+
+
+ Detail 2
+
+
+ Other
+
+
+
+ >
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.detail.$id.tsx b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.detail.$id.tsx
new file mode 100644
index 0000000000..143cb39a7a
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.detail.$id.tsx
@@ -0,0 +1,21 @@
+import { Link, createFileRoute } from '@tanstack/react-router'
+import { detailMarker } from '../../../shared'
+
+export const Route = createFileRoute('/hub/detail/$id')({
+ component: DetailPage,
+})
+
+function DetailPage() {
+ const params = Route.useParams()
+
+ return (
+
+ {detailMarker(params.id)}
+ Back to list
+
+ Next
+
+ Elsewhere
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.list.tsx b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.list.tsx
new file mode 100644
index 0000000000..5aa37b20a7
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.list.tsx
@@ -0,0 +1,65 @@
+import { Link, createFileRoute } from '@tanstack/react-router'
+import {
+ listItemIds,
+ listMarker,
+ listRelativeTestId,
+ listSortedMarker,
+} from '../../../shared'
+
+export const Route = createFileRoute('/hub/list')({
+ component: ListPage,
+})
+
+const ascSearch = { sort: 'asc' } as const
+
+// List Links depart whenever the list leaf is left.
+function ListLinks() {
+ return (
+
+ {listItemIds.map((id) => {
+ const page = Number(id)
+ return (
+
+
+ {`Item ${id}`}
+
+
+ {`Item ${id} asc`}
+
+
+ {`Item ${id} exact`}
+
+ ({ ...prev, page })}>
+ {`Page ${id}`}
+
+ ({ ...prev, page, sort: 'asc' as const })}
+ data-testid={id === '1' ? listRelativeTestId : undefined}
+ >
+ {`Page ${id} asc`}
+
+
+ )
+ })}
+
+ )
+}
+
+function ListPage() {
+ const sort = Route.useSearch({ select: (search) => search.sort })
+
+ return (
+
+
+ {sort === 'desc' ? listSortedMarker : listMarker}
+
+
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.tsx b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.tsx
new file mode 100644
index 0000000000..ac12eae2da
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.tsx
@@ -0,0 +1,64 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/react-router'
+import {
+ hubItemIds,
+ hubRelativeTestId,
+ validateHubSearch,
+} from '../../../shared'
+
+export const Route = createFileRoute('/hub')({
+ validateSearch: validateHubSearch,
+ component: HubLayout,
+})
+
+// Layout Links stay mounted while the hub leaves change.
+function HubLinks() {
+ return (
+
+ {hubItemIds.map((id) => {
+ const page = Number(id)
+ return (
+
+
+ {`Detail ${id}`}
+
+
+ {`Detail ${id} exact`}
+
+
+ {`List page ${id}`}
+
+ ({ ...prev, page })}>
+ {`List keep ${id}`}
+
+ ({ ...prev, page })}
+ data-testid={id === '1' ? hubRelativeTestId : undefined}
+ >
+ {`Here page ${id}`}
+
+
+ )
+ })}
+
+ )
+}
+
+function HubLayout() {
+ return (
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/other.tsx b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/other.tsx
new file mode 100644
index 0000000000..1f146b789f
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/src/routes/other.tsx
@@ -0,0 +1,14 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { otherMarker } from '../../../shared'
+
+export const Route = createFileRoute('/other')({
+ component: OtherPage,
+})
+
+function OtherPage() {
+ return (
+
+ {otherMarker}
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/tsconfig.json b/benchmarks/client-nav/scenarios/link-churn/react/tsconfig.json
new file mode 100644
index 0000000000..1d59cbb450
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "extends": "../../../../../tsconfig.json",
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "react",
+ "allowImportingTsExtensions": true,
+ "types": ["node", "vite/client", "vitest/globals"]
+ },
+ "include": [
+ "speed.bench.ts",
+ "speed.flame.ts",
+ "setup.ts",
+ "vite.config.ts",
+ "../shared.ts",
+ "../../harness.ts",
+ "../../../setup-helpers.ts",
+ "../../../jsdom.ts",
+ "../../../vitest.setup.ts",
+ "./src/**/*"
+ ]
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/react/vite.config.ts b/benchmarks/client-nav/scenarios/link-churn/react/vite.config.ts
new file mode 100644
index 0000000000..344974ebf9
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/react/vite.config.ts
@@ -0,0 +1,42 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vitest/config'
+import react from '@vitejs/plugin-react'
+import codspeedPlugin from '@codspeed/vitest-plugin'
+import { tanstackRouter } from '@tanstack/router-plugin/vite'
+import { cpuSimulationExecArgv } from '../../../../cpu-simulation'
+
+const rootDir = fileURLToPath(new URL('.', import.meta.url))
+
+export default defineConfig({
+ root: rootDir,
+ define: {
+ 'process.env.NODE_ENV': JSON.stringify('production'),
+ },
+ plugins: [
+ !!(process.env.VITEST && process.env.WITH_INSTRUMENTATION) &&
+ codspeedPlugin(),
+ tanstackRouter({
+ target: 'react',
+ routesDirectory: `${rootDir}src/routes`,
+ generatedRouteTree: `${rootDir}src/routeTree.gen.ts`,
+ }),
+ react(),
+ ],
+ build: {
+ outDir: './dist',
+ emptyOutDir: true,
+ minify: false,
+ lib: {
+ entry: './src/main.tsx',
+ formats: ['es'],
+ fileName: 'app',
+ },
+ },
+ test: {
+ execArgv: cpuSimulationExecArgv(),
+ name: '@benchmarks/client-nav link-churn (react)',
+ watch: false,
+ environment: 'jsdom',
+ setupFiles: ['../../../vitest.setup.ts'],
+ },
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/shared.ts b/benchmarks/client-nav/scenarios/link-churn/shared.ts
new file mode 100644
index 0000000000..d936af35cc
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/shared.ts
@@ -0,0 +1,178 @@
+/**
+ * Shared definition of the `link-churn` scenario: Links that leave, stay and
+ * arrive across navigations. A `/hub` layout renders Links that stay mounted
+ * while its leaves change; the `/hub/list` leaf renders Links that depart when
+ * leaving it and mount again when returning; `/other` sits outside the layout
+ * so leaving the list there unmounts layout and leaf Links together. The
+ * existing `links` scenario keeps all its Links in the root layout, so none of
+ * them ever departs or remounts. The three framework apps consume these
+ * constants so the workload is identical modulo the rendering layer.
+ */
+import type { ScenarioStep } from '../harness'
+
+// Layout (staying) Links: HUB_ITEM_COUNT ids x 5 variants.
+export const HUB_ITEM_COUNT = 6
+// List leaf (departing) Links: LIST_ITEM_COUNT ids x 5 variants.
+export const LIST_ITEM_COUNT = 20
+
+const ids = (count: number) =>
+ Array.from({ length: count }, (_, index) => String(index + 1))
+
+export const hubItemIds = ids(HUB_ITEM_COUNT)
+export const listItemIds = ids(LIST_ITEM_COUNT)
+
+export interface HubSearch {
+ page?: number
+ sort?: 'asc' | 'desc'
+}
+
+/** Search validation of the `/hub` layout, inherited by its leaves. */
+export function validateHubSearch(search: Record): HubSearch {
+ const result: HubSearch = {}
+ if (typeof search.page === 'number') {
+ result.page = search.page
+ }
+ if (search.sort === 'asc' || search.sort === 'desc') {
+ result.sort = search.sort
+ }
+ return result
+}
+
+export const sortedSearch = { sort: 'desc' } as const
+
+export function detailMarker(id: string) {
+ return `detail-${id}`
+}
+
+export const listMarker = 'list'
+export const listSortedMarker = 'list-desc'
+export const otherMarker = 'other'
+
+// Sampled Links whose href depends on the current location: the first layout
+// `to="."` updater Link and the first list `to="."` updater Link.
+export const hubRelativeTestId = 'hub-relative-1'
+export const listRelativeTestId = 'list-relative-1'
+
+interface StepDef {
+ testId: string
+ marker: string
+ /** Expected number of `.active-link` elements after the step. */
+ activeCount: number
+ /** Expected href of the sampled layout updater Link (null: not mounted). */
+ hubRelativeHref: string | null
+ /** Expected href of the sampled list updater Link (null: not mounted). */
+ listRelativeHref: string | null
+}
+
+// On the list, every layout `includeSearch: false` Link to the list is active.
+const listActiveCount = HUB_ITEM_COUNT
+
+export const stepDefs: ReadonlyArray = [
+ // 1. list -> detail/1: list Links depart, layout Links stay and update.
+ {
+ testId: 'go-detail-1',
+ marker: detailMarker('1'),
+ activeCount: 1,
+ hubRelativeHref: '/hub/detail/1?page=1',
+ listRelativeHref: null,
+ },
+ // 2. detail/1 -> detail/2: same route, new param; every Link stays.
+ {
+ testId: 'go-detail-2',
+ marker: detailMarker('2'),
+ activeCount: 1,
+ hubRelativeHref: '/hub/detail/2?page=1',
+ listRelativeHref: null,
+ },
+ // 3. detail/2 -> list: list Links mount.
+ {
+ testId: 'go-list',
+ marker: listMarker,
+ activeCount: listActiveCount,
+ hubRelativeHref: '/hub/list?page=1',
+ listRelativeHref: '/hub/list?page=1&sort=asc',
+ },
+ // 4. list -> other: layout and list Links depart together.
+ {
+ testId: 'go-other',
+ marker: otherMarker,
+ activeCount: 0,
+ hubRelativeHref: null,
+ listRelativeHref: null,
+ },
+ // 5. other -> list: layout and list Links all mount.
+ {
+ testId: 'go-list',
+ marker: listMarker,
+ activeCount: listActiveCount,
+ hubRelativeHref: '/hub/list?page=1',
+ listRelativeHref: '/hub/list?page=1&sort=asc',
+ },
+ // 6a. list -> list?sort=desc: nothing departs, updater Links rebuild.
+ {
+ testId: 'go-list-sorted',
+ marker: listSortedMarker,
+ activeCount: listActiveCount,
+ hubRelativeHref: '/hub/list?sort=desc&page=1',
+ listRelativeHref: '/hub/list?sort=asc&page=1',
+ },
+ // 6b. back to the plain list so the lap ends on the initial location.
+ {
+ testId: 'go-list',
+ marker: listMarker,
+ activeCount: listActiveCount,
+ hubRelativeHref: '/hub/list?page=1',
+ listRelativeHref: '/hub/list?page=1&sort=asc',
+ },
+]
+
+export const initialUrl = '/hub/list'
+
+export const scenarioSteps: ReadonlyArray = stepDefs.map(
+ (step) => step.testId,
+)
+
+function assertHref(
+ container: HTMLElement,
+ testId: string,
+ expected: string | null,
+ stepIndex: number,
+) {
+ const link = container.querySelector(`[data-testid="${testId}"]`)
+ const href = link ? link.getAttribute('href') : null
+ if (href !== expected) {
+ throw new Error(
+ `Expected "${testId}" href ${JSON.stringify(expected)} after step ${stepIndex}, received ${JSON.stringify(href)}`,
+ )
+ }
+}
+
+export function assertStepResult(stepIndex: number, container: HTMLElement) {
+ const step = stepDefs[stepIndex]!
+
+ const marker = container.querySelector('[data-testid="page-state"]')
+ if (marker?.textContent !== step.marker) {
+ throw new Error(
+ `Expected page marker "${step.marker}" after step ${stepIndex}, received "${marker?.textContent}"`,
+ )
+ }
+
+ const activeLinks = container.querySelectorAll('a.active-link')
+ if (activeLinks.length !== step.activeCount) {
+ throw new Error(
+ `Expected ${step.activeCount} active link(s) after step ${stepIndex}, received ${activeLinks.length}`,
+ )
+ }
+
+ assertHref(container, hubRelativeTestId, step.hubRelativeHref, stepIndex)
+ assertHref(container, listRelativeTestId, step.listRelativeHref, stepIndex)
+}
+
+// One lap through the 7-step sequence per benchmark iteration.
+export const ticksPerIteration = stepDefs.length
+
+export const benchOptions = {
+ warmupIterations: 50,
+ time: 10_000,
+ throws: true,
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/project.json b/benchmarks/client-nav/scenarios/link-churn/solid/project.json
new file mode 100644
index 0000000000..4e46143b32
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/project.json
@@ -0,0 +1,40 @@
+{
+ "name": "@benchmarks/client-nav-link-churn-solid",
+ "projectType": "application",
+ "targets": {
+ "build:client": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": [
+ {
+ "projects": ["@tanstack/solid-router", "@tanstack/router-plugin"],
+ "target": "build"
+ }
+ ],
+ "options": {
+ "command": "NODE_ENV=production vite build --config {projectRoot}/vite.config.ts"
+ }
+ },
+ "test:types:client": {
+ "executor": "nx:run-commands",
+ "dependsOn": [
+ {
+ "projects": ["@tanstack/solid-router", "@tanstack/router-plugin"],
+ "target": "build"
+ }
+ ],
+ "options": {
+ "command": "tsc -p {projectRoot}/tsconfig.json --noEmit"
+ }
+ },
+ "test:flame": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": ["build:client"],
+ "options": {
+ "command": "NODE_ENV=production flame run --md-format=detailed --delay=none --node-options=\"--stack-size=65500\" ./scenarios/link-churn/solid/speed.flame.ts",
+ "cwd": "benchmarks/client-nav"
+ }
+ }
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/setup.ts b/benchmarks/client-nav/scenarios/link-churn/solid/setup.ts
new file mode 100644
index 0000000000..a2a024341d
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/setup.ts
@@ -0,0 +1,18 @@
+import { createScenarioSetup } from '../../harness'
+import { assertStepResult, initialUrl, scenarioSteps } from '../shared'
+import type * as App from './src/main'
+
+const appModulePath = './dist/app.js'
+const { mountTestApp } = (await import(
+ /* @vite-ignore */ appModulePath
+)) as typeof App
+
+export function setup() {
+ return createScenarioSetup({
+ frameworkLabel: 'Solid',
+ mount: mountTestApp,
+ steps: scenarioSteps,
+ assertAfterStep: assertStepResult,
+ initialUrl,
+ })
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/link-churn/solid/speed.bench.ts
new file mode 100644
index 0000000000..9efdb6e3f8
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/speed.bench.ts
@@ -0,0 +1,32 @@
+import { afterEach, beforeEach, bench, describe } from 'vitest'
+import { benchOptions, ticksPerIteration } from '../shared'
+import { setup } from './setup'
+
+describe('client-link-churn', () => {
+ const test = setup()
+
+ /**
+ * Running `vitest bench` ignores suite hooks, so Tinybench uses the `setup`
+ * and `teardown` options below. CodSpeed bypasses those options but supports
+ * `beforeEach` and `afterEach`. Only one lifecycle path runs in either
+ * environment, and every measured invocation receives fresh application state.
+ */
+
+ beforeEach(test.before)
+ afterEach(test.after)
+
+ bench(
+ 'client-link-churn navigation loop (solid)',
+ async () => {
+ for (let i = 0; i < ticksPerIteration; i++) {
+ await test.tick()
+ }
+ await test.finishBatch()
+ },
+ {
+ ...benchOptions,
+ setup: test.before,
+ teardown: test.after,
+ },
+ )
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/speed.flame.ts b/benchmarks/client-nav/scenarios/link-churn/solid/speed.flame.ts
new file mode 100644
index 0000000000..f4a0b4e6ff
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/speed.flame.ts
@@ -0,0 +1,18 @@
+import { window } from '../../../jsdom.ts'
+import { setup } from './setup.ts'
+
+const DURATION_MS = 10_000
+
+const test = setup()
+
+try {
+ await test.before()
+
+ const startedAt = performance.now()
+ while (performance.now() - startedAt < DURATION_MS) {
+ await test.tick()
+ }
+} finally {
+ test.after()
+ window.close()
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/src/main.tsx b/benchmarks/client-nav/scenarios/link-churn/solid/src/main.tsx
new file mode 100644
index 0000000000..fa9d239418
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/src/main.tsx
@@ -0,0 +1,34 @@
+import type { RouterHistory } from '@tanstack/history'
+import { render } from 'solid-js/web'
+import { RouterProvider, createRouter } from '@tanstack/solid-router'
+import { routeTree } from './routeTree.gen'
+
+export function createTestRouter(history: RouterHistory) {
+ return createRouter({
+ routeTree,
+ history,
+ scrollRestoration: true,
+ // Key the scroll-restoration cache by pathname instead of the default
+ // random per-entry location key: with push navigations the default mints
+ // a fresh key per navigation and the module-level cache grows one entry
+ // per push for the whole run, which is non-stationary.
+ getScrollRestorationKey: (location) => location.pathname,
+ })
+}
+
+declare module '@tanstack/solid-router' {
+ interface Register {
+ router: ReturnType
+ }
+}
+
+export function mountTestApp(container: HTMLElement, history: RouterHistory) {
+ const router = createTestRouter(history)
+
+ const unmount = render(() => , container)
+
+ return {
+ router,
+ unmount,
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/link-churn/solid/src/routeTree.gen.ts
new file mode 100644
index 0000000000..e3cb546963
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/src/routeTree.gen.ts
@@ -0,0 +1,121 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as HubRouteImport } from './routes/hub'
+import { Route as OtherRouteImport } from './routes/other'
+import { Route as HubListRouteImport } from './routes/hub.list'
+import { Route as HubDetailIdRouteImport } from './routes/hub.detail.$id'
+
+const HubRoute = HubRouteImport.update({
+ id: '/hub',
+ path: '/hub',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const OtherRoute = OtherRouteImport.update({
+ id: '/other',
+ path: '/other',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const HubListRoute = HubListRouteImport.update({
+ id: '/list',
+ path: '/list',
+ getParentRoute: () => HubRoute,
+} as any)
+const HubDetailIdRoute = HubDetailIdRouteImport.update({
+ id: '/detail/$id',
+ path: '/detail/$id',
+ getParentRoute: () => HubRoute,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRoutesByTo {
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths: '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ fileRoutesByTo: FileRoutesByTo
+ to: '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ id: '__root__' | '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ HubRoute: typeof HubRouteWithChildren
+ OtherRoute: typeof OtherRoute
+}
+
+declare module '@tanstack/solid-router' {
+ interface FileRoutesByPath {
+ '/hub': {
+ id: '/hub'
+ path: '/hub'
+ fullPath: '/hub'
+ preLoaderRoute: typeof HubRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/other': {
+ id: '/other'
+ path: '/other'
+ fullPath: '/other'
+ preLoaderRoute: typeof OtherRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/hub/list': {
+ id: '/hub/list'
+ path: '/list'
+ fullPath: '/hub/list'
+ preLoaderRoute: typeof HubListRouteImport
+ parentRoute: typeof HubRoute
+ }
+ '/hub/detail/$id': {
+ id: '/hub/detail/$id'
+ path: '/detail/$id'
+ fullPath: '/hub/detail/$id'
+ preLoaderRoute: typeof HubDetailIdRouteImport
+ parentRoute: typeof HubRoute
+ }
+ }
+}
+
+interface HubRouteChildren {
+ HubListRoute: typeof HubListRoute
+ HubDetailIdRoute: typeof HubDetailIdRoute
+}
+
+const HubRouteChildren: HubRouteChildren = {
+ HubListRoute: HubListRoute,
+ HubDetailIdRoute: HubDetailIdRoute,
+}
+
+const HubRouteWithChildren = HubRoute._addFileChildren(HubRouteChildren)
+
+const rootRouteChildren: RootRouteChildren = {
+ HubRoute: HubRouteWithChildren,
+ OtherRoute: OtherRoute,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes()
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/__root.tsx b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/__root.tsx
new file mode 100644
index 0000000000..a9de4ea356
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/__root.tsx
@@ -0,0 +1,39 @@
+import { Link, Outlet, createRootRoute } from '@tanstack/solid-router'
+import { sortedSearch } from '../../../shared'
+
+export const Route = createRootRoute({
+ component: RootComponent,
+})
+
+function RootComponent() {
+ return (
+ <>
+
+
+ List
+
+
+ List sorted
+
+
+ Detail 1
+
+
+ Detail 2
+
+
+ Other
+
+
+
+ >
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.detail.$id.tsx b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.detail.$id.tsx
new file mode 100644
index 0000000000..7aca4a9935
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.detail.$id.tsx
@@ -0,0 +1,24 @@
+import { Link, createFileRoute } from '@tanstack/solid-router'
+import { detailMarker } from '../../../shared'
+
+export const Route = createFileRoute('/hub/detail/$id')({
+ component: DetailPage,
+})
+
+function DetailPage() {
+ const params = Route.useParams()
+
+ return (
+
+ {detailMarker(params().id)}
+ Back to list
+
+ Next
+
+ Elsewhere
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.list.tsx b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.list.tsx
new file mode 100644
index 0000000000..5796a50b02
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.list.tsx
@@ -0,0 +1,68 @@
+import { For } from 'solid-js'
+import { Link, createFileRoute } from '@tanstack/solid-router'
+import {
+ listItemIds,
+ listMarker,
+ listRelativeTestId,
+ listSortedMarker,
+} from '../../../shared'
+
+export const Route = createFileRoute('/hub/list')({
+ component: ListPage,
+})
+
+const ascSearch = { sort: 'asc' } as const
+
+// List Links depart whenever the list leaf is left.
+function ListLinks() {
+ return (
+
+
+ {(id) => {
+ const page = Number(id)
+ return (
+
+
+ {`Item ${id}`}
+
+
+ {`Item ${id} asc`}
+
+
+ {`Item ${id} exact`}
+
+ ({ ...prev, page })}>
+ {`Page ${id}`}
+
+ ({ ...prev, page, sort: 'asc' as const })}
+ data-testid={id === '1' ? listRelativeTestId : undefined}
+ >
+ {`Page ${id} asc`}
+
+
+ )
+ }}
+
+
+ )
+}
+
+function ListPage() {
+ const sort = Route.useSearch({ select: (search) => search.sort })
+
+ return (
+
+
+ {sort() === 'desc' ? listSortedMarker : listMarker}
+
+
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.tsx b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.tsx
new file mode 100644
index 0000000000..4682f85aae
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.tsx
@@ -0,0 +1,67 @@
+import { For } from 'solid-js'
+import { Link, Outlet, createFileRoute } from '@tanstack/solid-router'
+import {
+ hubItemIds,
+ hubRelativeTestId,
+ validateHubSearch,
+} from '../../../shared'
+
+export const Route = createFileRoute('/hub')({
+ validateSearch: validateHubSearch,
+ component: HubLayout,
+})
+
+// Layout Links stay mounted while the hub leaves change.
+function HubLinks() {
+ return (
+
+
+ {(id) => {
+ const page = Number(id)
+ return (
+
+
+ {`Detail ${id}`}
+
+
+ {`Detail ${id} exact`}
+
+
+ {`List page ${id}`}
+
+ ({ ...prev, page })}>
+ {`List keep ${id}`}
+
+ ({ ...prev, page })}
+ data-testid={id === '1' ? hubRelativeTestId : undefined}
+ >
+ {`Here page ${id}`}
+
+
+ )
+ }}
+
+
+ )
+}
+
+function HubLayout() {
+ return (
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/other.tsx b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/other.tsx
new file mode 100644
index 0000000000..2606089113
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/other.tsx
@@ -0,0 +1,14 @@
+import { createFileRoute } from '@tanstack/solid-router'
+import { otherMarker } from '../../../shared'
+
+export const Route = createFileRoute('/other')({
+ component: OtherPage,
+})
+
+function OtherPage() {
+ return (
+
+ {otherMarker}
+
+ )
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/tsconfig.json b/benchmarks/client-nav/scenarios/link-churn/solid/tsconfig.json
new file mode 100644
index 0000000000..98d76ad6b8
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "extends": "../../../../../tsconfig.json",
+ "compilerOptions": {
+ "jsx": "preserve",
+ "jsxImportSource": "solid-js",
+ "allowImportingTsExtensions": true,
+ "types": ["node", "vite/client", "vitest/globals"]
+ },
+ "include": [
+ "speed.bench.ts",
+ "speed.flame.ts",
+ "setup.ts",
+ "vite.config.ts",
+ "../shared.ts",
+ "../../harness.ts",
+ "../../../setup-helpers.ts",
+ "../../../jsdom.ts",
+ "../../../vitest.setup.ts",
+ "./src/**/*"
+ ]
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/vite.config.ts b/benchmarks/client-nav/scenarios/link-churn/solid/vite.config.ts
new file mode 100644
index 0000000000..37718a2d6a
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/solid/vite.config.ts
@@ -0,0 +1,50 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vitest/config'
+import solid from 'vite-plugin-solid'
+import codspeedPlugin from '@codspeed/vitest-plugin'
+import { tanstackRouter } from '@tanstack/router-plugin/vite'
+import { cpuSimulationExecArgv } from '../../../../cpu-simulation'
+
+const rootDir = fileURLToPath(new URL('.', import.meta.url))
+
+export default defineConfig({
+ root: rootDir,
+ define: {
+ 'process.env.NODE_ENV': JSON.stringify('production'),
+ },
+ plugins: [
+ !!(process.env.VITEST && process.env.WITH_INSTRUMENTATION) &&
+ codspeedPlugin(),
+ tanstackRouter({
+ target: 'solid',
+ routesDirectory: `${rootDir}src/routes`,
+ generatedRouteTree: `${rootDir}src/routeTree.gen.ts`,
+ }),
+ solid({ hot: false, dev: false }),
+ ],
+ build: {
+ outDir: './dist',
+ emptyOutDir: true,
+ minify: false,
+ lib: {
+ entry: './src/main.tsx',
+ formats: ['es'],
+ fileName: 'app',
+ },
+ },
+ resolve: {
+ conditions: ['solid', 'browser'],
+ },
+ test: {
+ execArgv: cpuSimulationExecArgv(),
+ name: '@benchmarks/client-nav link-churn (solid)',
+ watch: false,
+ environment: 'jsdom',
+ setupFiles: ['../../../vitest.setup.ts'],
+ server: {
+ deps: {
+ inline: [/@solidjs/, /@tanstack\/solid-store/],
+ },
+ },
+ },
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/project.json b/benchmarks/client-nav/scenarios/link-churn/vue/project.json
new file mode 100644
index 0000000000..fb890ddfb8
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/project.json
@@ -0,0 +1,40 @@
+{
+ "name": "@benchmarks/client-nav-link-churn-vue",
+ "projectType": "application",
+ "targets": {
+ "build:client": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": [
+ {
+ "projects": ["@tanstack/vue-router", "@tanstack/router-plugin"],
+ "target": "build"
+ }
+ ],
+ "options": {
+ "command": "NODE_ENV=production vite build --config {projectRoot}/vite.config.ts"
+ }
+ },
+ "test:types:client": {
+ "executor": "nx:run-commands",
+ "dependsOn": [
+ {
+ "projects": ["@tanstack/vue-router", "@tanstack/router-plugin"],
+ "target": "build"
+ }
+ ],
+ "options": {
+ "command": "tsc -p {projectRoot}/tsconfig.json --noEmit"
+ }
+ },
+ "test:flame": {
+ "executor": "nx:run-commands",
+ "cache": false,
+ "dependsOn": ["build:client"],
+ "options": {
+ "command": "NODE_ENV=production flame run --md-format=detailed --delay=none --node-options=\"--stack-size=65500\" ./scenarios/link-churn/vue/speed.flame.ts",
+ "cwd": "benchmarks/client-nav"
+ }
+ }
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/setup.ts b/benchmarks/client-nav/scenarios/link-churn/vue/setup.ts
new file mode 100644
index 0000000000..95cacb9ea8
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/setup.ts
@@ -0,0 +1,18 @@
+import { createScenarioSetup } from '../../harness'
+import { assertStepResult, initialUrl, scenarioSteps } from '../shared'
+import type * as App from './src/main'
+
+const appModulePath = './dist/app.js'
+const { mountTestApp } = (await import(
+ /* @vite-ignore */ appModulePath
+)) as typeof App
+
+export function setup() {
+ return createScenarioSetup({
+ frameworkLabel: 'Vue',
+ mount: mountTestApp,
+ steps: scenarioSteps,
+ assertAfterStep: assertStepResult,
+ initialUrl,
+ })
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/link-churn/vue/speed.bench.ts
new file mode 100644
index 0000000000..4fbbaf4ca0
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/speed.bench.ts
@@ -0,0 +1,32 @@
+import { afterEach, beforeEach, bench, describe } from 'vitest'
+import { benchOptions, ticksPerIteration } from '../shared'
+import { setup } from './setup'
+
+describe('client-link-churn', () => {
+ const test = setup()
+
+ /**
+ * Running `vitest bench` ignores suite hooks, so Tinybench uses the `setup`
+ * and `teardown` options below. CodSpeed bypasses those options but supports
+ * `beforeEach` and `afterEach`. Only one lifecycle path runs in either
+ * environment, and every measured invocation receives fresh application state.
+ */
+
+ beforeEach(test.before)
+ afterEach(test.after)
+
+ bench(
+ 'client-link-churn navigation loop (vue)',
+ async () => {
+ for (let i = 0; i < ticksPerIteration; i++) {
+ await test.tick()
+ }
+ await test.finishBatch()
+ },
+ {
+ ...benchOptions,
+ setup: test.before,
+ teardown: test.after,
+ },
+ )
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/speed.flame.ts b/benchmarks/client-nav/scenarios/link-churn/vue/speed.flame.ts
new file mode 100644
index 0000000000..f4a0b4e6ff
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/speed.flame.ts
@@ -0,0 +1,18 @@
+import { window } from '../../../jsdom.ts'
+import { setup } from './setup.ts'
+
+const DURATION_MS = 10_000
+
+const test = setup()
+
+try {
+ await test.before()
+
+ const startedAt = performance.now()
+ while (performance.now() - startedAt < DURATION_MS) {
+ await test.tick()
+ }
+} finally {
+ test.after()
+ window.close()
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/src/main.tsx b/benchmarks/client-nav/scenarios/link-churn/vue/src/main.tsx
new file mode 100644
index 0000000000..cae9b54f1d
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/src/main.tsx
@@ -0,0 +1,41 @@
+import type { RouterHistory } from '@tanstack/history'
+import * as Vue from 'vue'
+import { RouterProvider, createRouter } from '@tanstack/vue-router'
+import { routeTree } from './routeTree.gen'
+
+export function createTestRouter(history: RouterHistory) {
+ return createRouter({
+ routeTree,
+ history,
+ scrollRestoration: true,
+ // Key the scroll-restoration cache by pathname instead of the default
+ // random per-entry location key: with push navigations the default mints
+ // a fresh key per navigation and the module-level cache grows one entry
+ // per push for the whole run, which is non-stationary.
+ getScrollRestorationKey: (location) => location.pathname,
+ })
+}
+
+declare module '@tanstack/vue-router' {
+ interface Register {
+ router: ReturnType
+ }
+}
+
+export function mountTestApp(container: HTMLElement, history: RouterHistory) {
+ const router = createTestRouter(history)
+
+ const component =
+ const app = Vue.createApp({
+ render: () => component,
+ })
+
+ app.mount(container)
+
+ return {
+ router,
+ unmount() {
+ app.unmount()
+ },
+ }
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/link-churn/vue/src/routeTree.gen.ts
new file mode 100644
index 0000000000..9327bbc01d
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/src/routeTree.gen.ts
@@ -0,0 +1,121 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as HubRouteImport } from './routes/hub'
+import { Route as OtherRouteImport } from './routes/other'
+import { Route as HubListRouteImport } from './routes/hub.list'
+import { Route as HubDetailIdRouteImport } from './routes/hub.detail.$id'
+
+const HubRoute = HubRouteImport.update({
+ id: '/hub',
+ path: '/hub',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const OtherRoute = OtherRouteImport.update({
+ id: '/other',
+ path: '/other',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const HubListRoute = HubListRouteImport.update({
+ id: '/list',
+ path: '/list',
+ getParentRoute: () => HubRoute,
+} as any)
+const HubDetailIdRoute = HubDetailIdRouteImport.update({
+ id: '/detail/$id',
+ path: '/detail/$id',
+ getParentRoute: () => HubRoute,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRoutesByTo {
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/hub': typeof HubRouteWithChildren
+ '/other': typeof OtherRoute
+ '/hub/list': typeof HubListRoute
+ '/hub/detail/$id': typeof HubDetailIdRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths: '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ fileRoutesByTo: FileRoutesByTo
+ to: '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ id: '__root__' | '/hub' | '/other' | '/hub/list' | '/hub/detail/$id'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ HubRoute: typeof HubRouteWithChildren
+ OtherRoute: typeof OtherRoute
+}
+
+declare module '@tanstack/vue-router' {
+ interface FileRoutesByPath {
+ '/hub': {
+ id: '/hub'
+ path: '/hub'
+ fullPath: '/hub'
+ preLoaderRoute: typeof HubRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/other': {
+ id: '/other'
+ path: '/other'
+ fullPath: '/other'
+ preLoaderRoute: typeof OtherRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/hub/list': {
+ id: '/hub/list'
+ path: '/list'
+ fullPath: '/hub/list'
+ preLoaderRoute: typeof HubListRouteImport
+ parentRoute: typeof HubRoute
+ }
+ '/hub/detail/$id': {
+ id: '/hub/detail/$id'
+ path: '/detail/$id'
+ fullPath: '/hub/detail/$id'
+ preLoaderRoute: typeof HubDetailIdRouteImport
+ parentRoute: typeof HubRoute
+ }
+ }
+}
+
+interface HubRouteChildren {
+ HubListRoute: typeof HubListRoute
+ HubDetailIdRoute: typeof HubDetailIdRoute
+}
+
+const HubRouteChildren: HubRouteChildren = {
+ HubListRoute: HubListRoute,
+ HubDetailIdRoute: HubDetailIdRoute,
+}
+
+const HubRouteWithChildren = HubRoute._addFileChildren(HubRouteChildren)
+
+const rootRouteChildren: RootRouteChildren = {
+ HubRoute: HubRouteWithChildren,
+ OtherRoute: OtherRoute,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes()
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/__root.tsx b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/__root.tsx
new file mode 100644
index 0000000000..a4f7985c5a
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/__root.tsx
@@ -0,0 +1,46 @@
+import * as Vue from 'vue'
+import { Link, Outlet, createRootRoute } from '@tanstack/vue-router'
+import { sortedSearch } from '../../../shared'
+
+const RootComponent = Vue.defineComponent({
+ setup() {
+ return () => (
+ <>
+
+
+ List
+
+
+ List sorted
+
+
+ Detail 1
+
+
+ Detail 2
+
+
+ Other
+
+
+
+ >
+ )
+ },
+})
+
+export const Route = createRootRoute({
+ component: RootComponent,
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.detail.$id.tsx b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.detail.$id.tsx
new file mode 100644
index 0000000000..4701ab44eb
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.detail.$id.tsx
@@ -0,0 +1,27 @@
+import * as Vue from 'vue'
+import { Link, createFileRoute } from '@tanstack/vue-router'
+import { detailMarker } from '../../../shared'
+
+const DetailPage = Vue.defineComponent({
+ setup() {
+ const params = Route.useParams()
+
+ return () => (
+
+ {detailMarker(params.value.id)}
+ Back to list
+
+ Next
+
+ Elsewhere
+
+ )
+ },
+})
+
+export const Route = createFileRoute('/hub/detail/$id')({
+ component: DetailPage,
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.list.tsx b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.list.tsx
new file mode 100644
index 0000000000..02abd6db1b
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.list.tsx
@@ -0,0 +1,74 @@
+import * as Vue from 'vue'
+import { Link, createFileRoute } from '@tanstack/vue-router'
+import {
+ listItemIds,
+ listMarker,
+ listRelativeTestId,
+ listSortedMarker,
+} from '../../../shared'
+
+const ascSearch = { sort: 'asc' } as const
+
+// List Links depart whenever the list leaf is left.
+const ListLinks = Vue.defineComponent({
+ setup() {
+ return () => (
+
+ {listItemIds.map((id) => {
+ const page = Number(id)
+ return (
+
+
+ {`Item ${id}`}
+
+
+ {`Item ${id} asc`}
+
+
+ {`Item ${id} exact`}
+
+ ({ ...prev, page })}>
+ {`Page ${id}`}
+
+ ({
+ ...prev,
+ page,
+ sort: 'asc' as const,
+ })}
+ data-testid={id === '1' ? listRelativeTestId : undefined}
+ >
+ {`Page ${id} asc`}
+
+
+ )
+ })}
+
+ )
+ },
+})
+
+const ListPage = Vue.defineComponent({
+ setup() {
+ const sort = Route.useSearch({ select: (search) => search.sort })
+
+ return () => (
+
+
+ {sort.value === 'desc' ? listSortedMarker : listMarker}
+
+
+
+ )
+ },
+})
+
+export const Route = createFileRoute('/hub/list')({
+ component: ListPage,
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.tsx b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.tsx
new file mode 100644
index 0000000000..5be17f3350
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.tsx
@@ -0,0 +1,69 @@
+import * as Vue from 'vue'
+import { Link, Outlet, createFileRoute } from '@tanstack/vue-router'
+import {
+ hubItemIds,
+ hubRelativeTestId,
+ validateHubSearch,
+} from '../../../shared'
+
+// Layout Links stay mounted while the hub leaves change.
+const HubLinks = Vue.defineComponent({
+ setup() {
+ return () => (
+
+ {hubItemIds.map((id) => {
+ const page = Number(id)
+ return (
+
+
+ {`Detail ${id}`}
+
+
+ {`Detail ${id} exact`}
+
+
+ {`List page ${id}`}
+
+ ({ ...prev, page })}>
+ {`List keep ${id}`}
+
+ ({ ...prev, page })}
+ data-testid={id === '1' ? hubRelativeTestId : undefined}
+ >
+ {`Here page ${id}`}
+
+
+ )
+ })}
+
+ )
+ },
+})
+
+const HubLayout = Vue.defineComponent({
+ setup() {
+ return () => (
+
+ )
+ },
+})
+
+export const Route = createFileRoute('/hub')({
+ validateSearch: validateHubSearch,
+ component: HubLayout,
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/other.tsx b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/other.tsx
new file mode 100644
index 0000000000..08dec586fa
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/other.tsx
@@ -0,0 +1,17 @@
+import * as Vue from 'vue'
+import { createFileRoute } from '@tanstack/vue-router'
+import { otherMarker } from '../../../shared'
+
+const OtherPage = Vue.defineComponent({
+ setup() {
+ return () => (
+
+ {otherMarker}
+
+ )
+ },
+})
+
+export const Route = createFileRoute('/other')({
+ component: OtherPage,
+})
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/tsconfig.json b/benchmarks/client-nav/scenarios/link-churn/vue/tsconfig.json
new file mode 100644
index 0000000000..7786fc3da9
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "extends": "../../../../../tsconfig.json",
+ "compilerOptions": {
+ "jsx": "preserve",
+ "jsxImportSource": "vue",
+ "allowImportingTsExtensions": true,
+ "types": ["node", "vite/client", "vitest/globals"]
+ },
+ "include": [
+ "speed.bench.ts",
+ "speed.flame.ts",
+ "setup.ts",
+ "vite.config.ts",
+ "../shared.ts",
+ "../../harness.ts",
+ "../../../setup-helpers.ts",
+ "../../../jsdom.ts",
+ "../../../vitest.setup.ts",
+ "./src/**/*"
+ ]
+}
diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/vite.config.ts b/benchmarks/client-nav/scenarios/link-churn/vue/vite.config.ts
new file mode 100644
index 0000000000..8f56734e04
--- /dev/null
+++ b/benchmarks/client-nav/scenarios/link-churn/vue/vite.config.ts
@@ -0,0 +1,44 @@
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from 'vitest/config'
+import vue from '@vitejs/plugin-vue'
+import vueJsx from '@vitejs/plugin-vue-jsx'
+import codspeedPlugin from '@codspeed/vitest-plugin'
+import { tanstackRouter } from '@tanstack/router-plugin/vite'
+import { cpuSimulationExecArgv } from '../../../../cpu-simulation'
+
+const rootDir = fileURLToPath(new URL('.', import.meta.url))
+
+export default defineConfig({
+ root: rootDir,
+ define: {
+ 'process.env.NODE_ENV': JSON.stringify('production'),
+ },
+ plugins: [
+ !!(process.env.VITEST && process.env.WITH_INSTRUMENTATION) &&
+ codspeedPlugin(),
+ tanstackRouter({
+ target: 'vue',
+ routesDirectory: `${rootDir}src/routes`,
+ generatedRouteTree: `${rootDir}src/routeTree.gen.ts`,
+ }),
+ vue(),
+ vueJsx(),
+ ],
+ build: {
+ outDir: './dist',
+ emptyOutDir: true,
+ minify: false,
+ lib: {
+ entry: './src/main.tsx',
+ formats: ['es'],
+ fileName: 'app',
+ },
+ },
+ test: {
+ execArgv: cpuSimulationExecArgv(),
+ name: '@benchmarks/client-nav link-churn (vue)',
+ watch: false,
+ environment: 'jsdom',
+ setupFiles: ['../../../vitest.setup.ts'],
+ },
+})
From c4cb0e4cae8e3b11cfbaea813a46b76be8f26b34 Mon Sep 17 00:00:00 2001
From: Flo
Date: Sun, 4 Oct 2026 22:46:37 +0200
Subject: [PATCH 035/127] test(router): Link tests that hold on main, ahead of
the departing-Link work (#8611)
Tests written for #8602 that already pass on main: rewrites of Link tests
that asserted on a detached anchor after its route unmounted, and Link
destination tests for Solid, Vue and React (in-place store/reactive inputs,
inherited params, masks, frozen options, state-only navigations).
Co-authored-by: Claude Opus 5.5
---
.../tests/link-destination.test.tsx | 50 ++++
packages/react-router/tests/link.test.tsx | 37 ++-
.../tests/link-destination.test.tsx | 257 ++++++++++++++++++
packages/solid-router/tests/link.test.tsx | 37 ++-
.../tests/link-destination.test.tsx | 168 ++++++++++++
packages/vue-router/tests/link.test.tsx | 37 ++-
6 files changed, 547 insertions(+), 39 deletions(-)
create mode 100644 packages/solid-router/tests/link-destination.test.tsx
create mode 100644 packages/vue-router/tests/link-destination.test.tsx
diff --git a/packages/react-router/tests/link-destination.test.tsx b/packages/react-router/tests/link-destination.test.tsx
index f33fe65803..8d27615ff9 100644
--- a/packages/react-router/tests/link-destination.test.tsx
+++ b/packages/react-router/tests/link-destination.test.tsx
@@ -305,4 +305,54 @@ describe('Link destination updates', () => {
expect(link).toHaveAttribute('data-status', 'active')
expect(link).toHaveTextContent('Current item')
})
+
+ test('masked destinations follow their inputs', async () => {
+ // A stable mask object that inherits params, and a mask prop that changes.
+ const inheritedMask = { to: '/visible/$id', params: true } as const
+ const rootRoute = createRootRoute({
+ component: function Root() {
+ const [id, setId] = React.useState('one')
+ return (
+ <>
+ setId('two')}>Change mask
+
+
+
+ >
+ )
+ },
+ })
+ const routes = ['/source/$id', '/target/$id', '/visible/$id'].map((path) =>
+ createRoute({ getParentRoute: () => rootRoute, path }),
+ )
+ const router = createRouter({
+ routeTree: rootRoute.addChildren(routes),
+ history: createMemoryHistory({ initialEntries: ['/source/one'] }),
+ })
+ render( )
+
+ const propMask = await screen.findByTestId('prop-mask')
+ const inherited = screen.getByTestId('inherited-mask')
+ expect(propMask).toHaveAttribute('href', '/visible/one')
+ expect(inherited).toHaveAttribute('href', '/visible/one')
+
+ await act(() =>
+ router.navigate({ to: '/source/$id', params: { id: 'two' } } as any),
+ )
+ expect(inherited).toHaveAttribute('href', '/visible/two')
+ expect(propMask).toHaveAttribute('href', '/visible/one')
+
+ fireEvent.click(screen.getByRole('button', { name: 'Change mask' }))
+ expect(propMask).toHaveAttribute('href', '/visible/two')
+ })
})
diff --git a/packages/react-router/tests/link.test.tsx b/packages/react-router/tests/link.test.tsx
index 46e6cb8685..56c4ece9db 100644
--- a/packages/react-router/tests/link.test.tsx
+++ b/packages/react-router/tests/link.test.tsx
@@ -1151,10 +1151,13 @@ describe('Link', () => {
expect(indexLink).not.toHaveAttribute('data-status', 'active')
expect(indexLink).toHaveAttribute('href', '/')
- expect(postsLink).toHaveAttribute('data-status', 'active')
- expect(postsLink).toHaveAttribute('aria-current', 'page')
- expect(postsLink).toHaveClass('active')
- expect(postsLink).toHaveAttribute('href', '/posts')
+ // The clicked link left with the index page; check the posts page's own.
+ const activePostsLink = await screen.findByRole('link', { name: 'Posts' })
+ expect(activePostsLink).not.toBe(postsLink)
+ expect(activePostsLink).toHaveAttribute('data-status', 'active')
+ expect(activePostsLink).toHaveAttribute('aria-current', 'page')
+ expect(activePostsLink).toHaveClass('active')
+ expect(activePostsLink).toHaveAttribute('href', '/posts')
})
test('when navigating to /posts with a base url', async () => {
@@ -1211,10 +1214,13 @@ describe('Link', () => {
expect(indexLink).not.toHaveAttribute('data-status', 'active')
expect(indexLink).toHaveAttribute('href', '/app/')
- expect(postsLink).toHaveAttribute('data-status', 'active')
- expect(postsLink).toHaveAttribute('aria-current', 'page')
- expect(postsLink).toHaveClass('active')
- expect(postsLink).toHaveAttribute('href', '/app/posts')
+ // The clicked link left with the index page; check the posts page's own.
+ const activePostsLink = await screen.findByRole('link', { name: 'Posts' })
+ expect(activePostsLink).not.toBe(postsLink)
+ expect(activePostsLink).toHaveAttribute('data-status', 'active')
+ expect(activePostsLink).toHaveAttribute('aria-current', 'page')
+ expect(activePostsLink).toHaveClass('active')
+ expect(activePostsLink).toHaveAttribute('href', '/app/posts')
})
test('when navigating to /posts with search', async () => {
@@ -6803,14 +6809,12 @@ describe('splat routes with empty splat', () => {
async (trailingSlash) => {
const tail = trailingSlash === 'always' ? '/' : ''
- const rootRoute = createRootRoute()
- const indexRoute = createRoute({
- getParentRoute: () => rootRoute,
- path: '/',
+ // The links stay mounted across the navigation so they can turn active.
+ const rootRoute = createRootRoute({
component: () => {
return (
<>
- Index Route
+
{
)
},
})
+ const indexRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/',
+ component: () => {
+ return Index Route
+ },
+ })
const splatRoute = createRoute({
getParentRoute: () => rootRoute,
diff --git a/packages/solid-router/tests/link-destination.test.tsx b/packages/solid-router/tests/link-destination.test.tsx
new file mode 100644
index 0000000000..93c20d2386
--- /dev/null
+++ b/packages/solid-router/tests/link-destination.test.tsx
@@ -0,0 +1,257 @@
+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library'
+import { afterEach, expect, test, vi } from 'vitest'
+import { createSignal } from 'solid-js'
+import { createStore } from 'solid-js/store'
+import {
+ Link,
+ Outlet,
+ RouterProvider,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+ defaultStringifySearch,
+ useLinkProps,
+} from '../src'
+import type { JSX } from 'solid-js'
+
+afterEach(cleanup)
+
+/**
+ * Renders `links` in the root route next to `/source/$id`, `/target/$id` and
+ * `/visible/$id`. `builds()` counts the destination builds that stringify a
+ * search carrying a `build` key, so a reused location does not count.
+ */
+function setup(links: () => JSX.Element, initial = '/source/one') {
+ const counted = vi.fn(defaultStringifySearch)
+ const root = createRootRoute({
+ component: () => (
+ <>
+ {links()}
+
+ >
+ ),
+ })
+ const routes = ['/source/$id', '/target/$id', '/visible/$id'].map((path) =>
+ createRoute({ getParentRoute: () => root, path }),
+ )
+ const router = createRouter({
+ routeTree: root.addChildren(routes),
+ history: createMemoryHistory({ initialEntries: [initial] }),
+ stringifySearch: (search) =>
+ 'build' in search ? counted(search) : defaultStringifySearch(search),
+ })
+ render(() => )
+ const go = (id: string, extra?: object) =>
+ router.navigate({ to: '/source/$id', params: { id }, ...extra } as any)
+ return { router, go, builds: () => counted.mock.calls.length }
+}
+
+test('store-backed params and search follow in-place mutations at the next navigation', async () => {
+ const [params, setParams] = createStore({ id: 'one' })
+ const [search, setSearch] = createStore({ build: 1 })
+ const { go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ expect(link).toHaveAttribute('href', '/target/one?build=1')
+
+ setParams('id', 'two')
+ setSearch('build', 2)
+ // As before: a store read during a build is not tracked.
+ expect(link).toHaveAttribute('href', '/target/one?build=1')
+ await go('two')
+ expect(link).toHaveAttribute('href', '/target/two?build=2')
+
+ setParams('id', 'three')
+ await go('three')
+ expect(link).toHaveAttribute('href', '/target/three?build=2')
+
+ // Clicks and preloads read the store as it is now.
+ setParams('id', 'four')
+ fireEvent.click(link)
+ await vi.waitFor(() =>
+ expect(screen.getByTestId('link')).toHaveAttribute('data-status', 'active'),
+ )
+ expect(link).toHaveAttribute('href', '/target/four?build=2')
+})
+
+test('state store values are not reused either', async () => {
+ const [state, setState] = createStore({ label: 'one' })
+ const seen: Array = []
+ const { router } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ router.subscribe('onResolved', ({ toLocation }) => {
+ seen.push((toLocation.state as any).label)
+ })
+ setState('label', 'two')
+ fireEvent.click(link)
+ await vi.waitFor(() => expect(seen).toEqual(['two']))
+})
+
+test('inherited params and search rebuild on every navigation', async () => {
+ const { go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ expect(link).toHaveAttribute('href', '/target/one')
+ await go('two', { search: { page: 2 } })
+ expect(link).toHaveAttribute('href', '/target/two?page=2')
+ await go('three', { search: { page: 3 } })
+ expect(link).toHaveAttribute('href', '/target/three?page=3')
+})
+
+test('masked destinations follow their inputs', async () => {
+ const [params, setParams] = createStore({ id: 'one' })
+ const [hash, setHash] = createSignal('a')
+ const { go } = setup(() => (
+ <>
+
+
+ >
+ ))
+ const storeMask = await screen.findByTestId('store-mask')
+ const inheritedMask = screen.getByTestId('inherited-mask')
+ expect(storeMask).toHaveAttribute('href', '/visible/one')
+ expect(inheritedMask).toHaveAttribute('href', '/visible/one#a')
+ setParams('id', 'two')
+ await go('two')
+ expect(storeMask).toHaveAttribute('href', '/visible/two')
+ expect(inheritedMask).toHaveAttribute('href', '/visible/two#a')
+ setHash('b')
+ expect(inheritedMask).toHaveAttribute('href', '/visible/two#b')
+})
+
+test('never mutates frozen caller options', async () => {
+ const params = Object.freeze({ id: 'fixed' })
+ const options = Object.freeze({
+ to: '/target/$id',
+ params,
+ search: Object.freeze({ build: 1 }),
+ 'data-testid': 'frozen',
+ })
+ const Links = () => {
+ const frozen = useLinkProps(options as any)
+ return
+ }
+ const result = setup(() => )
+ const frozen = await screen.findByTestId('frozen')
+ expect(frozen).toHaveAttribute('href', '/target/fixed?build=1')
+ await result.go('two')
+ expect(frozen).toHaveAttribute('href', '/target/fixed?build=1')
+ expect(Object.keys(options)).toEqual([
+ 'to',
+ 'params',
+ 'search',
+ 'data-testid',
+ ])
+ expect(Object.keys(params)).toEqual(['id'])
+
+ fireEvent.click(frozen)
+ await vi.waitFor(() =>
+ expect(result.router.state.location.pathname).toBe('/target/fixed'),
+ )
+})
+
+test.each([
+ ['inherited state', true],
+ ['a state updater', (prev: any) => ({ label: `${prev.label}!` })],
+])(
+ 'a click after a same-href, state-only navigation uses the new state (%s)',
+ async (_, state) => {
+ const { router, go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ await go('one', { state: { label: 'next' } })
+ expect(router.state.location.state).toMatchObject({ label: 'next' })
+ fireEvent.click(link)
+ await vi.waitFor(() =>
+ expect(router.state.location.pathname).toBe('/target/fixed'),
+ )
+ expect(router.state.location.state).toMatchObject({
+ label: state === true ? 'next' : 'next!',
+ })
+ },
+)
+
+test('function children render once per active state change', async () => {
+ const calls: Array = []
+ const { go } = setup(() => (
+
+ {({ isActive }) => {
+ calls.push(isActive)
+ return isActive ? 'active' : 'inactive'
+ }}
+
+ ))
+ const link = await screen.findByTestId('link')
+ expect(link).toHaveTextContent('inactive')
+ await go('two')
+ await go('three')
+ expect(calls).toEqual([false])
+ fireEvent.click(link)
+ await vi.waitFor(() => expect(link).toHaveTextContent(/^active$/))
+ expect(calls).toEqual([false, true])
+})
+
+test('refreshes history formatting even when the destination is reused', async () => {
+ let suffix = 'old'
+ const root = createRootRoute({
+ component: () => (
+ <>
+
+
+ >
+ ),
+ })
+ const source = createRoute({
+ getParentRoute: () => root,
+ path: '/source/$id',
+ })
+ const target = createRoute({ getParentRoute: () => root, path: '/target' })
+ const history = createMemoryHistory({ initialEntries: ['/source/one'] })
+ const router = createRouter({
+ routeTree: root.addChildren([source, target]),
+ history: {
+ ...history,
+ get location() {
+ return history.location
+ },
+ createHref: (href) => `${href}#${suffix}`,
+ },
+ })
+ render(() => )
+ const link = await screen.findByTestId('formatted')
+ expect(link).toHaveAttribute('href', '/target#old')
+ suffix = 'new'
+ await router.navigate({ to: '/source/$id', params: { id: 'two' } })
+ expect(link).toHaveAttribute('href', '/target#new')
+})
diff --git a/packages/solid-router/tests/link.test.tsx b/packages/solid-router/tests/link.test.tsx
index 78c4b02347..caae3f55e1 100644
--- a/packages/solid-router/tests/link.test.tsx
+++ b/packages/solid-router/tests/link.test.tsx
@@ -1406,10 +1406,13 @@ describe('Link', () => {
expect(indexLink).not.toHaveAttribute('data-status', 'active')
expect(indexLink).toHaveAttribute('href', '/')
- expect(postsLink).toHaveAttribute('data-status', 'active')
- expect(postsLink).toHaveAttribute('aria-current', 'page')
- expect(postsLink).toHaveClass('active')
- expect(postsLink).toHaveAttribute('href', '/posts')
+ // The clicked link left with the index page; check the posts page's own.
+ const activePostsLink = await screen.findByRole('link', { name: 'Posts' })
+ expect(activePostsLink).not.toBe(postsLink)
+ expect(activePostsLink).toHaveAttribute('data-status', 'active')
+ expect(activePostsLink).toHaveAttribute('aria-current', 'page')
+ expect(activePostsLink).toHaveClass('active')
+ expect(activePostsLink).toHaveAttribute('href', '/posts')
})
test('when navigating to /posts with a base url', async () => {
@@ -1465,10 +1468,13 @@ describe('Link', () => {
expect(indexLink).not.toHaveAttribute('data-status', 'active')
expect(indexLink).toHaveAttribute('href', '/app/')
- expect(postsLink).toHaveAttribute('data-status', 'active')
- expect(postsLink).toHaveAttribute('aria-current', 'page')
- expect(postsLink).toHaveClass('active')
- expect(postsLink).toHaveAttribute('href', '/app/posts')
+ // The clicked link left with the index page; check the posts page's own.
+ const activePostsLink = await screen.findByRole('link', { name: 'Posts' })
+ expect(activePostsLink).not.toBe(postsLink)
+ expect(activePostsLink).toHaveAttribute('data-status', 'active')
+ expect(activePostsLink).toHaveAttribute('aria-current', 'page')
+ expect(activePostsLink).toHaveClass('active')
+ expect(activePostsLink).toHaveAttribute('href', '/app/posts')
})
test('when navigating to /posts with search', async () => {
@@ -6852,14 +6858,12 @@ describe('splat routes with empty splat', () => {
async (trailingSlash) => {
const tail = trailingSlash === 'always' ? '/' : ''
- const rootRoute = createRootRoute()
- const indexRoute = createRoute({
- getParentRoute: () => rootRoute,
- path: '/',
+ // The links stay mounted across the navigation so they can turn active.
+ const rootRoute = createRootRoute({
component: () => {
return (
<>
- Index Route
+
{
)
},
})
+ const indexRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/',
+ component: () => {
+ return Index Route
+ },
+ })
const splatRoute = createRoute({
getParentRoute: () => rootRoute,
diff --git a/packages/vue-router/tests/link-destination.test.tsx b/packages/vue-router/tests/link-destination.test.tsx
new file mode 100644
index 0000000000..e7fd8e6962
--- /dev/null
+++ b/packages/vue-router/tests/link-destination.test.tsx
@@ -0,0 +1,168 @@
+import * as Vue from 'vue'
+import { cleanup, fireEvent, render, screen } from '@testing-library/vue'
+import { afterEach, expect, test, vi } from 'vitest'
+import {
+ Link,
+ Outlet,
+ RouterProvider,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+ defaultStringifySearch,
+} from '../src'
+
+afterEach(() => {
+ cleanup()
+ vi.restoreAllMocks()
+})
+
+/**
+ * Renders `links` in the root route next to `/source/$id`, `/target/$id` and
+ * `/visible/$id`. `builds()` counts the destination builds that stringify a
+ * search carrying a `build` key, so a reused location does not count.
+ */
+function setup(links: () => any, initial = '/source/one') {
+ const counted = vi.fn(defaultStringifySearch)
+ const root = createRootRoute({
+ component: () => (
+ <>
+ {links()}
+
+ >
+ ),
+ })
+ const routes = ['/source/$id', '/target/$id', '/visible/$id'].map((path) =>
+ createRoute({ getParentRoute: () => root, path }),
+ )
+ const router = createRouter({
+ routeTree: root.addChildren(routes),
+ history: createMemoryHistory({ initialEntries: [initial] }),
+ stringifySearch: (search) =>
+ 'build' in search ? counted(search) : defaultStringifySearch(search),
+ })
+ render( )
+ const go = (id: string, extra?: object) =>
+ router.navigate({ to: '/source/$id', params: { id }, ...extra } as any)
+ return { router, go, builds: () => counted.mock.calls.length }
+}
+
+test('reactive params and search follow in-place mutations at the next navigation', async () => {
+ const params = Vue.reactive({ id: 'one' })
+ const search = Vue.reactive({ build: 1 })
+ const { go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ expect(link).toHaveAttribute('href', '/target/one?build=1')
+ params.id = 'two'
+ search.build = 2
+ await go('two')
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/target/two?build=2')
+ params.id = 'three'
+ await go('three')
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/target/three?build=2')
+})
+
+test('inherited params and search rebuild on every navigation', async () => {
+ const { go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ expect(link).toHaveAttribute('href', '/target/one')
+ await go('two', { search: { page: 2 } })
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/target/two?page=2')
+})
+
+test('masked destinations follow their inputs', async () => {
+ const params = Vue.reactive({ id: 'one' })
+ const fixed = { id: 'fixed' }
+ const mask = { to: '/visible/$id', params }
+ const { go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ expect(link).toHaveAttribute('href', '/visible/one')
+ params.id = 'two'
+ await go('two')
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/visible/two')
+})
+
+test('switches a mounted Link between plain and reactive inputs', async () => {
+ const live = Vue.ref(false)
+ const params = Vue.reactive({ id: 'one' })
+ const plain = { id: 'fixed' }
+ const { go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ expect(link).toHaveAttribute('href', '/target/fixed')
+ live.value = true
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/target/one')
+ params.id = 'two'
+ await go('two')
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/target/two')
+ live.value = false
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/target/fixed')
+})
+
+test('never mutates frozen caller options', async () => {
+ const params = Object.freeze({ id: 'fixed' })
+ const search = Object.freeze({ build: 1 })
+ const { go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ await go('two')
+ await Vue.nextTick()
+ expect(link).toHaveAttribute('href', '/target/fixed?build=1')
+ expect(Object.keys(params)).toEqual(['id'])
+})
+
+test.each([
+ ['inherited state', true],
+ ['a state updater', (prev: any) => ({ label: `${prev.label}!` })],
+])(
+ 'a click after a same-href, state-only navigation uses the new state (%s)',
+ async (_, state) => {
+ const fixed = { id: 'fixed' }
+ const { router, go } = setup(() => (
+
+ ))
+ const link = await screen.findByTestId('link')
+ await go('one', { state: { label: 'next' } })
+ await fireEvent.click(link)
+ await vi.waitFor(() =>
+ expect(router.state.location.pathname).toBe('/target/fixed'),
+ )
+ expect(router.state.location.state).toMatchObject({
+ label: state === true ? 'next' : 'next!',
+ })
+ },
+)
diff --git a/packages/vue-router/tests/link.test.tsx b/packages/vue-router/tests/link.test.tsx
index 48fe82e2bb..bae8cf04f9 100644
--- a/packages/vue-router/tests/link.test.tsx
+++ b/packages/vue-router/tests/link.test.tsx
@@ -1547,10 +1547,13 @@ describe('Link', () => {
expect(indexLink).not.toHaveAttribute('data-status', 'active')
expect(indexLink).toHaveAttribute('href', '/')
- expect(postsLink).toHaveAttribute('data-status', 'active')
- expect(postsLink).toHaveAttribute('aria-current', 'page')
- expect(postsLink).toHaveClass('active')
- expect(postsLink).toHaveAttribute('href', '/posts')
+ // The clicked link left with the index page; check the posts page's own.
+ const activePostsLink = await screen.findByRole('link', { name: 'Posts' })
+ expect(activePostsLink).not.toBe(postsLink)
+ expect(activePostsLink).toHaveAttribute('data-status', 'active')
+ expect(activePostsLink).toHaveAttribute('aria-current', 'page')
+ expect(activePostsLink).toHaveClass('active')
+ expect(activePostsLink).toHaveAttribute('href', '/posts')
})
test('when navigating to /posts with a base url', async () => {
@@ -1606,10 +1609,13 @@ describe('Link', () => {
expect(indexLink).not.toHaveAttribute('data-status', 'active')
expect(indexLink).toHaveAttribute('href', '/app/')
- expect(postsLink).toHaveAttribute('data-status', 'active')
- expect(postsLink).toHaveAttribute('aria-current', 'page')
- expect(postsLink).toHaveClass('active')
- expect(postsLink).toHaveAttribute('href', '/app/posts')
+ // The clicked link left with the index page; check the posts page's own.
+ const activePostsLink = await screen.findByRole('link', { name: 'Posts' })
+ expect(activePostsLink).not.toBe(postsLink)
+ expect(activePostsLink).toHaveAttribute('data-status', 'active')
+ expect(activePostsLink).toHaveAttribute('aria-current', 'page')
+ expect(activePostsLink).toHaveClass('active')
+ expect(activePostsLink).toHaveAttribute('href', '/app/posts')
})
test('when navigating to /posts with search', async () => {
@@ -7311,14 +7317,12 @@ describe('splat routes with empty splat', () => {
async (trailingSlash) => {
const tail = trailingSlash === 'always' ? '/' : ''
- const rootRoute = createRootRoute()
- const indexRoute = createRoute({
- getParentRoute: () => rootRoute,
- path: '/',
+ // The links stay mounted across the navigation so they can turn active.
+ const rootRoute = createRootRoute({
component: () => {
return (
<>
- Index Route
+
{
)
},
})
+ const indexRoute = createRoute({
+ getParentRoute: () => rootRoute,
+ path: '/',
+ component: () => {
+ return Index Route
+ },
+ })
const splatRoute = createRoute({
getParentRoute: () => rootRoute,
From efc2042c2d02a9780c3e7efe81f123d066a869eb Mon Sep 17 00:00:00 2001
From: Flo
Date: Mon, 5 Oct 2026 21:27:33 +0200
Subject: [PATCH 036/127] perf(router): skip Link work for routes a navigation
leaves (#8602)
* test(benchmarks): add departing and retained Link navigation cases
Add lane-* cases to the React Link performance harness, with per-navigation
sync, onLoad and total timings in the paired runner.
Co-Authored-By: Claude Fable 5.1
* perf(react-router): share one location subscription per route's Links
Links subscribe to a scope owned by their match context instead of each
subscribing to the location store. A scope skips a location publication
whose navigation leaves its route, so Links that are about to unmount do
no work. Clicks and preloads resolve from the location a Link displays,
and mask builds use the same source location as their destination.
Co-Authored-By: Claude Fable 5.1
* test(benchmarks): add Solid departing and retained Link navigation harness
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): hold the location of Links in a departing match
Each Match owns one memo that keeps its Links' source location when the
publishing navigation leaves the route, so those Links do no work.
Clicks and preloads resolve from that source.
Co-Authored-By: Claude Opus 5.5
* perf(react-router): trim the Link scope's bundle cost
Key each router's link scopes by route id instead of carrying them in a
`[routeId, linkScope]` match context tuple. `matchContext` provides the
route id again, so `Match`, `Outlet`, `useMatch` and `useParentMatches` /
`useChildMatches` match main, and the outside-every-match holder becomes
the `undefined` key of the same registry. A scope without links still
releases its location, so keeping one per route id holds none.
Co-Authored-By: Claude Opus 5.5
* test(benchmarks): add Vue departing and retained Link navigation harness
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): hold the location of Links in a departing match
Co-Authored-By: Claude Opus 5.5
* test(benchmarks): add a real-browser Link INP harness
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): gate departing Links in their own location memo
Drop the per-Match memo and the third match-context slot. Each Link reads
its route id once at setup and, while the publishing navigation leaves
that route, keeps its previous location in the memo it already owns.
Links mounting in an already-departing route read the pending location.
Co-Authored-By: Claude Opus 5.5
* test(benchmarks): add Vue to the real-browser Link INP harness
Co-Authored-By: Claude Opus 5.5
* fix(solid-router): build Link navigations from the live location state
The Link location memo deduplicated by href, so a same-href navigation that only changed history state left clicks and preloads building from the previous location's state.
Compare by identity instead; downstream href and active memos still compare by value, so unchanged Links do not touch the DOM.
Co-Authored-By: Claude Opus 5.5
* perf(react-router): drop the Link scope's reentrant publication re-check
A listener that publishes a new location while a route's Links derive is not a
supported use case, so the scope no longer re-reads the store after notifying.
Co-Authored-By: Claude Opus 5.5
* perf(react-router, router-core): follow-up Link improvements (#8607)
* perf(router-core): cache location-independent masked destinations
A mask that reads the current location already marks the result as
source-dependent through the shared usedCurrent flag, and route masks
belong to the route tree and options whose updates replace the cache.
Co-Authored-By: Claude Opus 5.5
* perf(react-router): hydrate hash-sensitive Links through the scope's server snapshot
The Link's location subscription already has a server-snapshot slot.
Reporting an active hash-sensitive Link as inactive there replaces the
per-Link useHydrated subscription with identical hydration output.
Co-Authored-By: Claude Opus 5.5
* fix(react-router): follow href and reloadDocument changes of a mounted Link
The destination memo did not depend on href, so a Link whose href alone
changed kept displaying, preloading and navigating to the old target.
Clicks also navigated with the memo's copy of the options, so a changed
reloadDocument only applied once another destination prop changed.
Navigate with the current options and the displayed source location.
Co-Authored-By: Claude Opus 5.5
* perf(react-router): hold a Link's intent preload timer on its own ref
Co-Authored-By: Claude Opus 5.5
* perf(history): avoid copying navigation arguments when checking blockers
Co-Authored-By: Claude Opus 5.5
* test(benchmarks): opt-in intent preloading for the Link lane cases
Co-Authored-By: Claude Opus 5.5
* chore: changeset
Co-Authored-By: Claude Opus 5.5
---------
Co-authored-by: Claude Opus 5.5
* perf(solid-router, vue-router): follow-up Link improvements (#8609)
* test(benchmarks): measure Solid and Vue Link lanes with intent preloading
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): reuse a Link-owned destination so fixed Links hit the location cache
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): pass navigation controls through the Link-owned options
Co-Authored-By: Claude Opus 5.5
* test(solid-router): cover Link clicks after a state-only navigation
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): read Link options directly with a single splitProps
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): keep the Link preload timer in a closure
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): let the Link observer read the preload mode directly
The internal useIntersectionObserver no longer returns an unused accessor and
takes the preload mode instead of two predicates (its unit test is updated).
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): create the Link hydration signal only for SSR routers
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): let element insertion track Link children without a memo
Co-Authored-By: Claude Opus 5.5
* fix(solid-router): call a Link's ref once per element
The ref no longer comes from the props memo, so href/active changes do not
re-run the element's ref effect. Drops the mergeRefs import.
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): derive a Link's href and active state in one computation
The destination build, href, external/blocked classification and active state
share one memo whose unchanged result keeps its identity, so a navigation that
leaves a Link as it was notifies nothing downstream. Presentation props only
rerun the props memo. The server derives the same values once, without memos.
Co-Authored-By: Claude Opus 5.5
* test(benchmarks): use the t quantile for the lane comparison's round count
Co-Authored-By: Claude Opus 5.5
* perf(solid-router): split a Link's props once
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): reuse a Link-owned destination so fixed Links hit the location cache
Navigation controls travel on the same object, so clicks no longer re-list them.
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): pick a Link's element props with one shared key set
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): derive a Link's href and active state in one computed
The preload effects read a location-independent mode, so a navigation no
longer queues them for every Link. A Link whose destination updater navigates
while it derives derives again for the newer location.
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): keep the Link preload timer in a closure
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): drop the unused IntersectionObserver ref per Link
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): return plain empty Link props without a router
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): render server Links without reactive wrappers
The server returns shallow refs and reads Link props directly, without the
attrs snapshot, its update hook, the props computed or a template ref.
Co-Authored-By: Claude Opus 5.5
* perf(vue-router): drop the deferred re-derivation for updaters that navigate
A search updater that navigates while a Link derives is not a supported use
case; remove the retry that existed only for it, and its test.
Co-Authored-By: Claude Opus 5.5
* chore: add changeset for the Solid and Vue Link follow-up
Co-Authored-By: Claude Opus 5.5
---------
Co-authored-by: Claude Opus 5.5
* chore(benchmarks): remove the real-browser Link INP harness
Co-Authored-By: Claude Opus 5.5
* fix(solid-router, vue-router): rebuild masks whose options are stores
Router core now reuses masked locations built from the same options object
when the mask does not read the current location. Solid and Vue Links keep
one destination object while their navigation options keep their identity,
and only a store/reactive option value forced a fresh object per location.
A plain mask object holding a store (e.g. `mask={{ to, params: store }}`)
therefore kept the mask built from the store's first value. The mask's own
values are destination options too, so check them for stores as well.
React has no in-place reactive values: a changed mask prop changes identity
and rebuilds. Add the equivalent React coverage for prop and inherited masks.
Co-Authored-By: Claude Opus 5.5
* chore(benchmarks): remove the ad-hoc Link lane harnesses
The link-churn scenario covers this work in CodSpeed. Removes the Solid and
Vue lane harnesses and restores link-performance to its main content.
Co-Authored-By: Claude Opus 5.5
* style: name tuple indexes in Link code
Co-Authored-By: Claude Opus 5.5
* refactor(react-router): stop treating _fromLocation as a Link prop
`_fromLocation` is an internal router option, not a Link prop: the Link
always builds from its own scope's location. It stays among the stripped
router option keys so code that still passes it does not leak an attribute
to the element.
Co-Authored-By: Claude Opus 5.5
* refactor(solid-router): stop treating _fromLocation as a Link prop
`_fromLocation` is an internal router option, not a Link prop: the Link
always builds from the location its match presents.
Co-Authored-By: Claude Opus 5.5
* refactor(vue-router): stop treating _fromLocation as a Link prop
`_fromLocation` is an internal router option, not a Link prop: the Link
always builds from the location its match presents.
Co-Authored-By: Claude Opus 5.5
* refactor(react-router): drop _fromLocation from the Link's option keys
Co-Authored-By: Claude Opus 5.5
---------
Co-authored-by: Claude Fable 5.1
---
.changeset/link-departing-scope.md | 8 +
.changeset/link-followup-react-core.md | 7 +
.changeset/solid-vue-link-follow-up.md | 6 +
packages/history/src/index.ts | 30 +-
packages/react-router/src/link.tsx | 230 ++--
packages/react-router/src/matchContext.tsx | 64 +
.../tests/link-departing-scope.test.tsx | 1122 +++++++++++++++
.../tests/link-destination.test.tsx | 140 ++
packages/router-core/src/index.ts | 6 +-
packages/router-core/src/load-client.ts | 22 +
packages/router-core/src/router.ts | 16 +-
packages/router-core/tests/mask.test.ts | 198 +++
packages/solid-router/src/link.tsx | 585 ++++----
packages/solid-router/src/utils.ts | 87 +-
.../tests/link-departing-scope.test.tsx | 1225 +++++++++++++++++
.../tests/link-destination.test.tsx | 139 ++
packages/solid-router/tests/link.test.tsx | 24 +-
packages/vue-router/src/Match.tsx | 7 +-
packages/vue-router/src/RouterProvider.tsx | 6 +
packages/vue-router/src/link.tsx | 446 +++---
packages/vue-router/src/matchContext.tsx | 33 +-
packages/vue-router/src/utils.ts | 8 +-
.../tests/link-departing-scope.test.tsx | 1127 +++++++++++++++
.../tests/link-destination.test.tsx | 68 +
24 files changed, 4867 insertions(+), 737 deletions(-)
create mode 100644 .changeset/link-departing-scope.md
create mode 100644 .changeset/link-followup-react-core.md
create mode 100644 .changeset/solid-vue-link-follow-up.md
create mode 100644 packages/react-router/tests/link-departing-scope.test.tsx
create mode 100644 packages/solid-router/tests/link-departing-scope.test.tsx
create mode 100644 packages/vue-router/tests/link-departing-scope.test.tsx
diff --git a/.changeset/link-departing-scope.md b/.changeset/link-departing-scope.md
new file mode 100644
index 0000000000..a7d9119959
--- /dev/null
+++ b/.changeset/link-departing-scope.md
@@ -0,0 +1,8 @@
+---
+'@tanstack/react-router': patch
+'@tanstack/router-core': patch
+'@tanstack/solid-router': patch
+'@tanstack/vue-router': patch
+---
+
+Links of a route that the pending navigation leaves skip deriving the destination location, and clicks and preloads follow the href a Link displays. `buildLocation` now builds `mask` and `routeMasks` locations from the same `_fromLocation` as the destination.
diff --git a/.changeset/link-followup-react-core.md b/.changeset/link-followup-react-core.md
new file mode 100644
index 0000000000..defe64eb4a
--- /dev/null
+++ b/.changeset/link-followup-react-core.md
@@ -0,0 +1,7 @@
+---
+'@tanstack/react-router': patch
+'@tanstack/router-core': patch
+'@tanstack/history': patch
+---
+
+Fixed Link destinations that resolve to a route mask are now reused across navigations instead of being rebuilt every time. A mounted Link now follows changes to its `href` and `reloadDocument` props, and React Links no longer each subscribe to a hydration flag.
diff --git a/.changeset/solid-vue-link-follow-up.md b/.changeset/solid-vue-link-follow-up.md
new file mode 100644
index 0000000000..fee693f84f
--- /dev/null
+++ b/.changeset/solid-vue-link-follow-up.md
@@ -0,0 +1,6 @@
+---
+'@tanstack/solid-router': patch
+'@tanstack/vue-router': patch
+---
+
+Solid and Vue Links reuse the router's built destination across navigations and derive their state through fewer reactive nodes. Solid Links call a user `ref` once per element and create no reactive nodes on the server.
diff --git a/packages/history/src/index.ts b/packages/history/src/index.ts
index 9924779d8f..d2f80581b9 100644
--- a/packages/history/src/index.ts
+++ b/packages/history/src/index.ts
@@ -156,27 +156,21 @@ export function createHistory(opts: {
else location = opts.getLocation()
}
- const tryNavigation = async ({
- task,
- navigateOpts,
- ...actionInfo
- }: TryNavigateArgs) => {
- const ignoreBlocker = navigateOpts?.ignoreBlocker ?? false
- if (ignoreBlocker) {
- task()
- return
- }
-
- const blockers = opts.getBlockers?.() ?? []
- const isPushOrReplace =
- actionInfo.type === 'PUSH' || actionInfo.type === 'REPLACE'
- if (typeof document !== 'undefined' && blockers.length && isPushOrReplace) {
+ const tryNavigation = async (args: TryNavigateArgs) => {
+ const blockers = args.navigateOpts?.ignoreBlocker
+ ? undefined
+ : opts.getBlockers?.()
+ if (
+ typeof document !== 'undefined' &&
+ blockers?.length &&
+ (args.type === 'PUSH' || args.type === 'REPLACE')
+ ) {
for (const blocker of blockers) {
- const nextLocation = parseHref(actionInfo.path, actionInfo.state)
+ const nextLocation = parseHref(args.path, args.state)
const isBlocked = await blocker.blockerFn({
currentLocation: location,
nextLocation,
- action: actionInfo.type,
+ action: args.type,
})
if (isBlocked) {
opts.onBlocked?.()
@@ -185,7 +179,7 @@ export function createHistory(opts: {
}
}
- task()
+ args.task()
}
return {
diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx
index b99ad65662..ce6a7ed9d1 100644
--- a/packages/react-router/src/link.tsx
+++ b/packages/react-router/src/link.tsx
@@ -1,7 +1,6 @@
'use client'
import * as React from 'react'
-import { useSelector } from '@tanstack/react-store'
import {
deepEqual,
functionalUpdate,
@@ -12,8 +11,8 @@ import {
} from '@tanstack/router-core'
import { isServer } from '@tanstack/router-core/isServer'
import { useRouter } from './useRouter'
+import { createLinkScope, matchContext } from './matchContext'
-import { useHydrated } from './ClientOnly'
import type {
ActiveOptions,
AnyRouter,
@@ -35,8 +34,8 @@ type LinkState = [href: string | undefined, isActive?: boolean]
// Keep referentially stable values while their contents are equal. Links
// routinely pass inline `params` / `search` object literals, which would
-// otherwise change `_options` identity on every parent render, rebuild the
-// store selector, and discard its memoized selection. One ref holds all of
+// otherwise change `dest` identity on every parent render, rebuild the
+// link state snapshot, and discard its memoized state. One ref holds all of
// them; each entry is replaced only when its own contents change.
//
// The router reuses a built location for as long as it sees the same options
@@ -66,10 +65,6 @@ function preloadLink(router: AnyRouter, options: unknown) {
})
}
-const LINK_SELECTOR_OPTIONS = {
- compare: (a: LinkState, b: LinkState) => a[0] === b[0] && a[1] === b[1],
-}
-
function resolveExternalLink(
to: string | undefined,
protocolAllowlist: AnyRouter['protocolAllowlist'],
@@ -92,7 +87,6 @@ function resolveIsActive(
next: ParsedLocation,
activeOptions: ActiveOptions | undefined,
basepath: string,
- isHydrated: boolean,
): boolean {
const currentPath = removeTrailingSlash(location.pathname, basepath)
const nextPath = removeTrailingSlash(next.pathname, basepath)
@@ -122,10 +116,7 @@ function resolveIsActive(
}
}
- if (activeOptions?.includeHash) {
- return isHydrated && location.hash === next.hash
- }
- return true
+ return !activeOptions?.includeHash || location.hash === next.hash
}
/**
@@ -213,13 +204,13 @@ export function useLinkProps<
// 3. In client bundles, `isServer` is `false`, so the early return never executes
// ==========================================================================
- // The link's own ref: the element for the viewport observer and the key
+ // The link's own ref: the element for the viewport observer and the holder
// of a pending intent timer. A forwarded ref is filled alongside it by one
// callback, memoized on the forwarded ref so React re-attaches it (and
// notifies the consumer) only when their ref changes, not on every render.
// A cleanup returned by a consumer callback is passed through to React.
// eslint-disable-next-line react-hooks/rules-of-hooks
- const innerRef = React.useRef(null)
+ const innerRef: LinkRef = React.useRef(null)
// eslint-disable-next-line react-hooks/rules-of-hooks
const mergedRef = React.useCallback(
(element: Element | null) => {
@@ -240,12 +231,6 @@ export function useLinkProps<
to,
preload: userPreload,
preloadDelay: userPreloadDelay,
- hashScrollIntoView,
- replace,
- startTransition,
- resetScroll,
- viewTransition,
- ignoreBlocker,
disabled,
target,
onClick,
@@ -256,86 +241,109 @@ export function useLinkProps<
onTouchStart,
} = options as typeof options & { to?: string }
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const isHydrated = useHydrated(!!activeOptions?.includeHash)
-
// eslint-disable-next-line react-hooks/rules-of-hooks
const [stableSearch, stableParams, stableActiveOptions] = useStableValues(
options.search,
options.params,
activeOptions,
)
- // `_options` is the options object from the render that last changed the
- // destination. `dest` is its copy that the link owns: one stable object per
- // link lets the router reuse location-independent results.
+ // The links of a route share its location source. Links outside every
+ // match share one that never departs.
// eslint-disable-next-line react-hooks/rules-of-hooks
- const [_options, dest] = React.useMemo(
- () => [options, { ...options } as any] as const,
- // eslint-disable-next-line react-hooks/exhaustive-deps
- [
- router,
- options.from,
- options._fromLocation,
- options.hash,
- options.to,
- stableSearch,
- stableParams,
- options.state,
- options.mask,
- options.unsafeRelative,
- ],
- )
+ const routeId = React.useContext(matchContext)
+ const scope = ((router.stores._linkScopes ??= {})[routeId!] ??=
+ createLinkScope(router, routeId))
- // Derive inside the selector so `compareLinkState` can bail out. Deriving after
- // the subscription instead re-renders every link on every navigation, because
- // the comparator only sees the location, not whether this link's output moved.
+ // `dest` is the link's own copy of the options from the render that last
+ // changed the link: one stable object per link lets the router reuse
+ // location-independent results. It also carries the location the link
+ // displays, so clicks and preloads go where its href points.
+ // The snapshot depends only on the scope's location: it derives once per
+ // location so React can bail out on an unchanged state, and derives eagerly
+ // inside the scope's notification.
// eslint-disable-next-line react-hooks/rules-of-hooks
- const selectLinkState = React.useMemo(() => {
- // Direct destinations and the router's allowlist are stable for this selector.
+ const [dest, getLinkState, getHydrationState] = React.useMemo(() => {
+ // Direct destinations and the router's allowlist are stable for this snapshot.
const directExternalLink = resolveExternalLink(to, router.protocolAllowlist)
if (directExternalLink !== undefined) {
const state: LinkState = [directExternalLink ?? undefined]
- return () => state
+ return [options, () => state] as const
}
- let inactive: LinkState | undefined
- let active: LinkState
+ const dest = { ...options } as any
+ let source: ParsedLocation | undefined
+ let state: LinkState
+ let hydrationState: LinkState | undefined
- return (location: ParsedLocation): LinkState => {
- if (!_options._fromLocation) {
+ const getLinkState = (): LinkState => {
+ // Read the location once and record it only after deriving: a
+ // derivation that throws is retried instead of caching its state.
+ const location = scope[0 /* getSource */]()
+ if (location !== source) {
dest._fromLocation = location
- }
- const next = router.buildLocation(dest)
+ const next = router.buildLocation(dest)
- // History formatters can depend on the current browser URL (hash history).
- // Reuse classification and immutable results until the formatted href changes.
- const href = getHrefOption(next, router, disabled)
- if (!inactive || inactive[0] !== href) {
- inactive = [
- href,
- // Internal/disabled links use false; external/blocked links use undefined.
- !(disabled || (href && !getUrlScheme(href))) && undefined,
- ]
- active = [href, true]
+ // History formatters can depend on the current browser URL (hash history).
+ const href = getHrefOption(next, router, disabled)
+ // Internal and disabled links can be active; external and blocked
+ // links have no active state.
+ const isActive =
+ disabled || (href && !getUrlScheme(href))
+ ? resolveIsActive(
+ location,
+ next,
+ stableActiveOptions,
+ router.basepath,
+ )
+ : undefined
+ // Keep the state while it is equal so React can bail out.
+ if (
+ !state ||
+ state[0 /* href */] !== href ||
+ state[1 /* isActive */] !== isActive
+ ) {
+ state = [href, isActive]
+ }
+ source = location
}
- return inactive[1] !== undefined &&
- resolveIsActive(
- location,
- next,
- stableActiveOptions,
- router.basepath,
- isHydrated,
- )
- ? active
- : inactive
+ return state
}
- }, [stableActiveOptions, disabled, isHydrated, _options, dest, router, to])
+
+ return [
+ dest,
+ getLinkState,
+ // Hydration renders the server's markup, which has no hash, so an active
+ // hash-sensitive link hydrates inactive and React rerenders it after.
+ stableActiveOptions?.includeHash &&
+ ((): LinkState => {
+ const state = getLinkState()
+ return state[1 /* isActive */]
+ ? (hydrationState ??= [state[0 /* href */], false])
+ : state
+ }),
+ ] as const
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [
+ router,
+ scope,
+ options.from,
+ options.hash,
+ options.href,
+ to,
+ stableSearch,
+ stableParams,
+ options.state,
+ options.mask,
+ options.unsafeRelative,
+ stableActiveOptions,
+ disabled,
+ ])
// eslint-disable-next-line react-hooks/rules-of-hooks
- const [href, isActive] = useSelector(
- router.stores.location,
- selectLinkState,
- LINK_SELECTOR_OPTIONS,
+ const [href, isActive] = React.useSyncExternalStore(
+ scope[1 /* subscribe */],
+ getLinkState,
+ getHydrationState || getLinkState,
)
const externalLink = isActive === undefined && href
const linkDisabled = disabled || href === undefined
@@ -351,7 +359,7 @@ export function useLinkProps<
userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0
// `preloadRoute` builds the location itself and only reads the options, so
- // `_options` goes through as-is.
+ // `dest` goes through as-is.
// eslint-disable-next-line react-hooks/rules-of-hooks
const enqueuePreload = React.useCallback(
(e?: React.MouseEvent | React.FocusEvent | IntersectionObserverEntry) => {
@@ -365,23 +373,16 @@ export function useLinkProps<
}
if (!preloadDelay) {
- preloadLink(router, _options)
+ preloadLink(router, dest)
return
}
- if (timeoutMap.has(innerRef)) {
- return
- }
-
- timeoutMap.set(
- innerRef,
- setTimeout(() => {
- timeoutMap.delete(innerRef)
- preloadLink(router, _options)
- }, preloadDelay),
- )
+ innerRef.t ??= setTimeout(() => {
+ innerRef.t = undefined
+ preloadLink(router, dest)
+ }, preloadDelay)
},
- [router, _options, innerRef, preload, preloadDelay],
+ [router, dest, innerRef, preload, preloadDelay],
)
// Preload side effects: `render` preloads once per link, `viewport` watches
@@ -394,7 +395,7 @@ export function useLinkProps<
}
if (preload === 'render' && !hasRenderFetched.current) {
hasRenderFetched.current = true
- preloadLink(router, _options)
+ preloadLink(router, dest)
}
let active = true
let observer: IntersectionObserver | undefined
@@ -419,7 +420,7 @@ export function useLinkProps<
observer?.disconnect()
cancelPreload(innerRef)
}
- }, [router, _options, preload, enqueuePreload, innerRef])
+ }, [router, dest, preload, enqueuePreload, innerRef])
const props = collectElementProps(options, host)
props.ref = forwardedRef ? mergedRef : innerRef
@@ -448,23 +449,16 @@ export function useLinkProps<
e.preventDefault()
cancelPreload(innerRef)
- // All is well? Navigate!
- // N.B. we don't call `router.commitLocation(next) here because we want to run `validateSearch` before committing
- router.navigate({
- ..._options,
- replace,
- resetScroll,
- hashScrollIntoView,
- startTransition,
- viewTransition,
- ignoreBlocker,
- })
+ // The current options carry the navigation controls; `dest` only
+ // contributes the location the link displays. Navigation builds again
+ // to run `validateSearch` before committing.
+ router.navigate({ ...options, _fromLocation: dest._fromLocation })
}
}
const handleTouchStart = () => {
if (preload === 'intent') {
- preloadLink(router, _options)
+ preloadLink(router, dest)
}
}
@@ -496,7 +490,6 @@ const ROUTER_OPTION_KEYS = /* @__PURE__ */ new Set([
'mask',
'from',
'unsafeRelative',
- '_fromLocation',
'reloadDocument',
'preload',
'preloadDelay',
@@ -626,16 +619,16 @@ function getServerLinkProps(
}
const blockedLink = !disabled && !hrefOption
- // Hash is not available on the server, so it never counts as hydrated.
+ // Hash is not available on the server: hash-sensitive links are inactive.
const isActive =
!!next &&
!blockedLink &&
+ !activeOptions?.includeHash &&
resolveIsActive(
router.stores.location.get(),
next,
activeOptions,
router.basepath,
- false,
)
return applyLinkState(
props,
@@ -647,10 +640,13 @@ function getServerLinkProps(
)
}
-const timeoutMap = new WeakMap>()
-const cancelPreload = (eventTarget: object) => {
- clearTimeout(timeoutMap.get(eventTarget))
- timeoutMap.delete(eventTarget)
+// A Link's own ref also holds its pending intent preload timer.
+type LinkRef = React.RefObject & {
+ t?: ReturnType
+}
+const cancelPreload = (ref: LinkRef) => {
+ clearTimeout(ref.t)
+ ref.t = undefined
}
export const composeHandlers = (
@@ -865,8 +861,8 @@ export const Link: LinkComponent<'a'> = React.memo(
areLinkPropsEqual,
) as any
-// A Link's output depends only on its props, the router context and the
-// location store, which React tracks for memoized components, so a parent
+// A Link's output depends only on its props, the router context and its
+// route's location source, which React tracks for memoized components, so a parent
// re-render with equal props can skip it. Router options are compared by
// value: destinations are usually inline object literals. Element props
// (`children`, handlers, `style`, ...) are compared by reference only, since
diff --git a/packages/react-router/src/matchContext.tsx b/packages/react-router/src/matchContext.tsx
index a7030847e1..12db4dbada 100644
--- a/packages/react-router/src/matchContext.tsx
+++ b/packages/react-router/src/matchContext.tsx
@@ -1,6 +1,70 @@
'use client'
import * as React from 'react'
+import { _isRouteDeparting } from '@tanstack/router-core'
+import type { AnyRoute, AnyRouter, ParsedLocation } from '@tanstack/router-core'
+
+declare module '@tanstack/router-core' {
+ // Declaration merging requires the original type parameters.
+ // eslint-disable-next-line unused-imports/no-unused-vars
+ interface RouterStores {
+ /**
+ * The link scope of each route id that rendered links, keyed `undefined`
+ * for links outside every match (route ids start with `/` or are the
+ * root id). A scope without links holds no location.
+ */
+ _linkScopes?: Record
+ }
+}
+
+/**
+ * The location source shared by the links of one route. It holds one location
+ * subscription for all of them while any is subscribed, and skips a
+ * publication whose navigation removes the route: those links keep the
+ * location their route still presents until it unmounts or a newer
+ * publication keeps it. Without subscribers it holds nothing and reads the
+ * live location.
+ */
+export type LinkScope = [
+ getSource: () => ParsedLocation,
+ subscribe: (listener: () => void) => () => void,
+]
+
+export function createLinkScope(
+ router: AnyRouter,
+ routeId?: string,
+): LinkScope {
+ // Stores are created once per router.
+ const store = router.stores.location
+ const listeners = new Set<() => void>()
+ let source: ParsedLocation | undefined
+ let unsubscribe: () => void
+ // Defined outside `subscribe` so the store's subscription does not share a
+ // closure with, and retain, the first listener after it unsubscribes.
+ const update = (location: ParsedLocation) => {
+ if (!_isRouteDeparting(router, routeId, location)) {
+ source = location
+ listeners.forEach((listener) => listener())
+ }
+ }
+ return [
+ () => source ?? store.get(),
+ (listener) => {
+ if (!listeners.size) {
+ source = store.get()
+ unsubscribe = store.subscribe(update).unsubscribe
+ }
+ listeners.add(listener)
+ return () => {
+ listeners.delete(listener)
+ if (!listeners.size) {
+ unsubscribe()
+ source = undefined
+ }
+ }
+ },
+ ]
+}
export const matchContext = React.createContext(undefined)
diff --git a/packages/react-router/tests/link-departing-scope.test.tsx b/packages/react-router/tests/link-departing-scope.test.tsx
new file mode 100644
index 0000000000..04d0c3f32d
--- /dev/null
+++ b/packages/react-router/tests/link-departing-scope.test.tsx
@@ -0,0 +1,1122 @@
+import { setFlagsFromString } from 'node:v8'
+import { runInNewContext } from 'node:vm'
+import React from 'react'
+import {
+ act,
+ cleanup,
+ fireEvent,
+ render,
+ screen,
+ waitFor,
+} from '@testing-library/react'
+import { afterEach, describe, expect, test, vi } from 'vitest'
+import {
+ Link,
+ Outlet,
+ RouterProvider,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouteMask,
+ createRouter,
+ redirect,
+} from '../src'
+
+afterEach(() => {
+ cleanup()
+ vi.restoreAllMocks()
+})
+
+type Deferred = {
+ promise: Promise
+ resolve: () => void
+}
+
+function deferred(): Deferred {
+ let resolve!: () => void
+ const promise = new Promise((r) => (resolve = r))
+ return { promise, resolve }
+}
+
+type Gates = Partial>
+
+function setup({
+ initial = '/a',
+ strict = false,
+ bAfterGate,
+ beforeRender,
+}: {
+ initial?: string
+ strict?: boolean
+ bAfterGate?: () => void
+ beforeRender?: (router: any) => void
+} = {}) {
+ const gates: Gates = {}
+ const counts = {
+ aUpdater: 0,
+ aRenders: 0,
+ goneUpdater: 0,
+ suspendedUpdater: 0,
+ }
+ // The `x` dependency of every `/a` load, preloads included.
+ const aLoads: Array = []
+ // The `x` of every location the `a-next` link derives from.
+ const nextFrom: Array = []
+ const controls: {
+ setHash?: (hash: string | undefined) => void
+ setExtra?: (extra: boolean) => void
+ setGone?: (gone: boolean) => void
+ setRenderPreload?: (renderPreload: boolean) => void
+ } = {}
+ let suspendGate: Deferred | undefined
+
+ function Suspender() {
+ if (suspendGate) {
+ throw suspendGate.promise
+ }
+ return null
+ }
+
+ const root = createRootRoute({
+ component: () => (
+ <>
+
+ root b
+
+
+ >
+ ),
+ })
+ const layout = createRoute({
+ getParentRoute: () => root,
+ id: '_layout',
+ component: () => (
+ <>
+
+ layout b
+
+
+ >
+ ),
+ })
+ function AComponent() {
+ const [hash, setHash] = React.useState(undefined)
+ const [extra, setExtra] = React.useState(false)
+ const [gone, setGone] = React.useState(false)
+ const [renderPreload, setRenderPreload] = React.useState(false)
+ controls.setHash = setHash
+ controls.setExtra = setExtra
+ controls.setGone = setGone
+ controls.setRenderPreload = setRenderPreload
+ return (
+ <>
+ A page
+ {
+ counts.aUpdater++
+ return prev
+ }}
+ >
+ {() => {
+ counts.aRenders++
+ return 'a self'
+ }}
+
+
+ a dot
+
+ {
+ nextFrom.push(prev.x)
+ return { x: `${prev.x}-next` }
+ }}
+ preload="intent"
+ preloadDelay={0}
+ data-testid="a-next"
+ >
+ a next
+
+ {renderPreload ? (
+ ({ x: `${prev.x}-render` })}
+ preload="render"
+ data-testid="a-render"
+ >
+ a render
+
+ ) : null}
+ {extra ? (
+ prev} data-testid="a-extra">
+ a extra
+
+ ) : null}
+ {gone ? null : (
+ {
+ counts.goneUpdater++
+ return prev
+ }}
+ >
+ a gone
+
+ )}
+ suspended}>
+ {
+ counts.suspendedUpdater++
+ return prev
+ }}
+ >
+ a suspended
+
+
+
+ >
+ )
+ }
+ const a = createRoute({
+ getParentRoute: () => layout,
+ path: '/a',
+ loaderDeps: ({ search }: { search: any }) => ({ x: search.x }),
+ loader: ({ deps }: { deps: { x: unknown } }) => {
+ aLoads.push(deps.x)
+ return gates.a?.promise
+ },
+ component: AComponent,
+ })
+ const b = createRoute({
+ getParentRoute: () => layout,
+ path: '/b',
+ loader: async () => {
+ await gates.b?.promise
+ bAfterGate?.()
+ },
+ component: () => B page ,
+ })
+ const c = createRoute({
+ getParentRoute: () => root,
+ path: '/c',
+ component: () => C page ,
+ })
+ const items = createRoute({
+ getParentRoute: () => root,
+ path: '/items/$id',
+ loader: () => gates.items?.promise,
+ component: () => (
+ <>
+ Items page
+
+ item 1
+
+
+ item 2
+
+ >
+ ),
+ })
+
+ const router = createRouter({
+ routeTree: root.addChildren([layout.addChildren([a, b]), c, items]),
+ history: createMemoryHistory({ initialEntries: [initial] }),
+ })
+
+ beforeRender?.(router)
+ const app =
+ render(strict ? {app} : app)
+
+ const link = (id: string) => screen.getByTestId(id)
+ const isActive = (id: string) =>
+ link(id).getAttribute('aria-current') === 'page'
+ const href = (id: string) => link(id).getAttribute('href')
+
+ async function start(options: any) {
+ await act(async () => {
+ void router.navigate(options)
+ await Promise.resolve()
+ })
+ }
+
+ async function settle() {
+ await waitFor(() => expect(router.state.status).toBe('idle'))
+ }
+
+ async function release(name: keyof Gates) {
+ const gate = gates[name]!
+ gates[name] = undefined
+ await act(async () => {
+ gate.resolve()
+ await gate.promise
+ })
+ }
+
+ return {
+ router,
+ gates,
+ counts,
+ aLoads,
+ nextFrom,
+ controls,
+ link,
+ isActive,
+ href,
+ start,
+ settle,
+ release,
+ setSuspendGate: (gate: Deferred | undefined) => (suspendGate = gate),
+ }
+}
+
+describe('links in a departing match', () => {
+ test('skip work at navigation start while staying links update urgently', async () => {
+ const t = setup()
+ await screen.findByText('A page')
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.isActive('root-b')).toBe(false)
+ expect(t.isActive('layout-b')).toBe(false)
+
+ const updater = t.counts.aUpdater
+ const renders = t.counts.aRenders
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+
+ expect(t.router.state.status).toBe('pending')
+ expect(t.router.state.location.pathname).toBe('/b')
+ expect(screen.getByText('A page')).toBeInTheDocument()
+ // Staying root and layout links update while the loader is pending.
+ expect(t.isActive('root-b')).toBe(true)
+ expect(t.isActive('layout-b')).toBe(true)
+ // The departing route's links do no work.
+ expect(t.counts.aUpdater).toBe(updater)
+ expect(t.counts.aRenders).toBe(renders)
+ expect(t.isActive('a-self')).toBe(true)
+
+ await t.release('b')
+ await screen.findByText('B page')
+ expect(t.isActive('root-b')).toBe(true)
+ expect(t.router.state.status).toBe('idle')
+ })
+
+ test('staying route with changed params updates its links while pending', async () => {
+ const t = setup({ initial: '/items/1' })
+ await screen.findByText('Items page')
+ expect(t.isActive('item-1')).toBe(true)
+ expect(t.isActive('item-2')).toBe(false)
+
+ t.gates.items = deferred()
+ await t.start({ to: '/items/$id', params: { id: '2' } })
+ expect(t.router.state.status).toBe('pending')
+ expect(t.isActive('item-1')).toBe(false)
+ expect(t.isActive('item-2')).toBe(true)
+
+ await t.release('items')
+ expect(t.router.state.status).toBe('idle')
+ expect(t.isActive('item-2')).toBe(true)
+ })
+
+ test('a pending departure redirected back to the owner ends consistent', async () => {
+ const t = setup({
+ bAfterGate: () => {
+ throw redirect({ to: '/a', search: { x: 'back' } } as any)
+ },
+ })
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.href('a-self')).toBe('/a')
+
+ await t.release('b')
+ expect(t.router.state.status).toBe('idle')
+ expect(t.router.state.location.href).toBe('/a?x=back')
+ expect(screen.getByText('A page')).toBeInTheDocument()
+ expect(t.href('a-self')).toBe('/a?x=back')
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.href('a-dot')).toBe('/a')
+ expect(t.isActive('root-b')).toBe(false)
+ })
+
+ test('a pending departure superseded by a location that keeps the owner ends consistent', async () => {
+ const t = setup()
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ const updater = t.counts.aUpdater
+ await t.start({ to: '/a', search: { x: 'two' } })
+ expect(t.counts.aUpdater).toBeGreaterThan(updater)
+ expect(t.href('a-self')).toBe('/a?x=two')
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.isActive('root-b')).toBe(false)
+ t.gates.b.resolve()
+ await t.settle()
+ expect(t.router.state.status).toBe('idle')
+ expect(t.router.state.location.href).toBe('/a?x=two')
+ expect(t.href('a-self')).toBe('/a?x=two')
+ expect(t.isActive('a-self')).toBe(true)
+ })
+
+ test('links mounting or changing in a departing match build from its held location', async () => {
+ const t = setup()
+ await screen.findByText('A page')
+ expect(t.href('a-dot')).toBe('/a')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+
+ act(() => {
+ t.controls.setHash!('h')
+ t.controls.setExtra!(true)
+ })
+ // Both build from the location the rest of the match still presents.
+ expect(t.href('a-dot')).toBe('/a#h')
+ expect(t.href('a-extra')).toBe('/a')
+ expect(t.isActive('a-self')).toBe(true)
+
+ await t.start({ to: '/a', search: { x: 'one' } })
+ expect(t.href('a-dot')).toBe('/a#h')
+ expect(t.href('a-extra')).toBe('/a?x=one')
+ expect(t.href('a-self')).toBe('/a?x=one')
+ t.gates.b.resolve()
+ await t.settle()
+ expect(t.href('a-extra')).toBe('/a?x=one')
+ expect(t.isActive('a-extra')).toBe(true)
+ })
+
+ test('a pending navigation within the owner, then a departure, then back', async () => {
+ const t = setup()
+ await screen.findByText('A page')
+
+ t.gates.a = deferred()
+ const firstA = t.gates.a
+ await t.start({ to: '/a', search: { x: 'one' } })
+ expect(t.router.state.status).toBe('pending')
+ // Staying: updates while the owner's own loader is pending.
+ expect(t.href('a-self')).toBe('/a?x=one')
+
+ t.gates.b = deferred()
+ const updater = t.counts.aUpdater
+ const renders = t.counts.aRenders
+ await t.start({ to: '/b' })
+ expect(t.counts.aUpdater).toBe(updater)
+ expect(t.counts.aRenders).toBe(renders)
+ expect(t.href('a-self')).toBe('/a?x=one')
+ expect(t.isActive('root-b')).toBe(true)
+
+ await t.start({ to: '/a', search: { x: 'two' } })
+ expect(t.href('a-self')).toBe('/a?x=two')
+ expect(t.isActive('root-b')).toBe(false)
+
+ firstA.resolve()
+ t.gates.b.resolve()
+ await t.settle()
+ expect(t.router.state.status).toBe('idle')
+ expect(t.href('a-self')).toBe('/a?x=two')
+ expect(t.isActive('a-self')).toBe(true)
+ })
+
+ test('a departing link unmounted while pending does no further work', async () => {
+ const error = vi.spyOn(console, 'error')
+ const warn = vi.spyOn(console, 'warn')
+ const t = setup()
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ const gone = t.counts.goneUpdater
+ await t.start({ to: '/b' })
+ act(() => {
+ t.controls.setGone!(true)
+ })
+ expect(screen.queryByTestId('a-gone')).toBeNull()
+ await t.release('b')
+ await screen.findByText('B page')
+ expect(t.counts.goneUpdater).toBe(gone)
+ expect(error).not.toHaveBeenCalled()
+ expect(warn).not.toHaveBeenCalled()
+ })
+
+ test('an abandoned suspended link render keeps links consistent', async () => {
+ const t = setup()
+ await screen.findByText('A page')
+ const gate = deferred()
+ t.setSuspendGate(gate)
+ // Re-render A so the boundary suspends with its link rendered but not committed.
+ act(() => {
+ t.controls.setHash!('s')
+ })
+ t.setSuspendGate(undefined)
+ await act(async () => {
+ gate.resolve()
+ await gate.promise
+ })
+ expect(t.href('a-suspended')).toBe('/a')
+
+ await t.start({ to: '/a', search: { x: 'one' } })
+ await t.settle()
+ expect(t.href('a-suspended')).toBe('/a?x=one')
+
+ t.gates.b = deferred()
+ const suspended = t.counts.suspendedUpdater
+ await t.start({ to: '/b' })
+ expect(t.counts.suspendedUpdater).toBe(suspended)
+ await t.release('b')
+ await screen.findByText('B page')
+ })
+
+ test('StrictMode double mounting keeps holding and updating', async () => {
+ const t = setup({ strict: true })
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ const updater = t.counts.aUpdater
+ await t.start({ to: '/b' })
+ expect(t.counts.aUpdater).toBe(updater)
+ expect(t.isActive('root-b')).toBe(true)
+ await t.start({ to: '/a', search: { x: 's' } })
+ expect(t.href('a-self')).toBe('/a?x=s')
+ t.gates.b.resolve()
+ await t.settle()
+ expect(t.href('a-self')).toBe('/a?x=s')
+ expect(t.isActive('root-b')).toBe(false)
+ })
+
+ test.each([
+ ['a-dot', '/a'],
+ ['a-next', '/a?x=one-next'],
+ ])(
+ 'clicking held link %s navigates to the href it displays',
+ async (id, displayed) => {
+ const t = setup({ initial: '/a?x=one' })
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ expect(t.router.state.status).toBe('pending')
+ expect(t.href(id)).toBe(displayed)
+
+ await act(async () => {
+ fireEvent.click(t.link(id))
+ await Promise.resolve()
+ })
+ expect(t.router.latestLocation.href).toBe(displayed)
+ t.gates.b.resolve()
+ await t.settle()
+ expect(t.router.state.location.href).toBe(displayed)
+ expect(screen.getByText('A page')).toBeInTheDocument()
+ },
+ )
+
+ test.each(['mouseEnter', 'focus', 'touchStart'] as const)(
+ 'a %s preload of a held link loads the location it displays',
+ async (event) => {
+ const t = setup({ initial: '/a?x=one' })
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ expect(t.href('a-next')).toBe('/a?x=one-next')
+ t.aLoads.length = 0
+
+ await act(async () => {
+ fireEvent[event](t.link('a-next'))
+ await Promise.resolve()
+ })
+ expect(t.aLoads).toEqual(['one-next'])
+ await t.release('b')
+ await screen.findByText('B page')
+ },
+ )
+
+ test('a render preload of a link mounting in a departing match loads the location it displays', async () => {
+ const t = setup({ initial: '/a?x=one' })
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ t.aLoads.length = 0
+
+ await act(async () => {
+ t.controls.setRenderPreload!(true)
+ await Promise.resolve()
+ })
+ expect(t.href('a-render')).toBe('/a?x=one-render')
+ expect(t.aLoads).toEqual(['one-render'])
+ await t.release('b')
+ await screen.findByText('B page')
+ })
+
+ test('staying links click and preload from the live location', async () => {
+ const t = setup({ initial: '/a?x=one' })
+ await screen.findByText('A page')
+ t.gates.a = deferred()
+ await t.start({ to: '/a', search: { x: 'two' } })
+ expect(t.router.state.status).toBe('pending')
+ expect(t.href('a-next')).toBe('/a?x=two-next')
+ t.aLoads.length = 0
+
+ await act(async () => {
+ fireEvent.mouseEnter(t.link('a-next'))
+ await Promise.resolve()
+ })
+ expect(t.aLoads).toEqual(['two-next'])
+ await act(async () => {
+ fireEvent.click(t.link('a-next'))
+ await Promise.resolve()
+ })
+ expect(t.router.latestLocation.href).toBe('/a?x=two-next')
+ await t.release('a')
+ await t.settle()
+ expect(t.router.state.location.href).toBe('/a?x=two-next')
+ expect(t.href('a-next')).toBe('/a?x=two-next-next')
+ })
+
+ test('a revisited route starts with fresh links, also ones mounting during its next departure', async () => {
+ const t = setup({ initial: '/a?x=one' })
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ expect(t.href('a-next')).toBe('/a?x=one-next')
+ await t.release('b')
+ await screen.findByText('B page')
+ await t.settle()
+
+ t.nextFrom.length = 0
+ await act(() => t.router.navigate({ to: '/a', search: { x: 'two' } }))
+ await screen.findByText('A page')
+ await t.settle()
+ // The remounted links never derive from the previous visit's location.
+ expect(t.nextFrom).not.toContain('one')
+ expect(t.href('a-next')).toBe('/a?x=two-next')
+ expect(t.href('a-self')).toBe('/a?x=two')
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.isActive('root-b')).toBe(false)
+
+ // B is cached now: depart to a route that has not loaded yet.
+ t.gates.items = deferred()
+ const updater = t.counts.aUpdater
+ await t.start({ to: '/items/$id', params: { id: '1' } })
+ expect(t.router.state.status).toBe('pending')
+ expect(t.counts.aUpdater).toBe(updater)
+ act(() => {
+ t.controls.setExtra!(true)
+ })
+ // The new link holds this visit's location, not the previous visit's.
+ expect(t.href('a-extra')).toBe('/a?x=two')
+ expect(t.href('a-next')).toBe('/a?x=two-next')
+ expect(t.isActive('root-b')).toBe(false)
+
+ await act(async () => {
+ fireEvent.click(t.link('a-extra'))
+ await Promise.resolve()
+ })
+ expect(t.router.latestLocation.href).toBe('/a?x=two')
+ t.gates.items.resolve()
+ await t.settle()
+ expect(t.router.state.location.href).toBe('/a?x=two')
+ expect(t.isActive('a-extra')).toBe(true)
+ expect(t.href('a-next')).toBe('/a?x=two-next')
+ })
+
+ test('a document redirect from the destination does not break later navigations', async () => {
+ // jsdom reports the attempted document navigation as not implemented.
+ const t = setup({
+ bAfterGate: () => {
+ throw redirect({ to: '/c', reloadDocument: true })
+ },
+ })
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ await t.release('b')
+ await act(async () => {
+ await new Promise((resolve) => setTimeout(resolve, 0))
+ })
+
+ await act(() => t.router.navigate({ to: '/a', search: { x: 'two' } }))
+ await t.settle()
+ expect(t.href('a-self')).toBe('/a?x=two')
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.isActive('root-b')).toBe(false)
+ })
+
+ test('a departure superseded by a history traversal back to the owner updates its links', async () => {
+ const t = setup({ initial: '/a?x=one' })
+ await screen.findByText('A page')
+ await act(() => t.router.navigate({ to: '/a', search: { x: 'two' } }))
+ await t.settle()
+ expect(t.href('a-self')).toBe('/a?x=two')
+
+ t.gates.b = deferred()
+ const updater = t.counts.aUpdater
+ await t.start({ to: '/b' })
+ expect(t.counts.aUpdater).toBe(updater)
+ await act(async () => {
+ t.router.history.go(-2)
+ await Promise.resolve()
+ })
+ await t.settle()
+ expect(t.router.state.location.href).toBe('/a?x=one')
+ expect(t.href('a-self')).toBe('/a?x=one')
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.isActive('root-b')).toBe(false)
+ t.gates.b.resolve()
+ await act(async () => {
+ await t.gates.b?.promise
+ })
+ expect(screen.getByText('A page')).toBeInTheDocument()
+ expect(t.href('a-self')).toBe('/a?x=one')
+ })
+
+ test('invalidating a pending departure keeps holding until it commits', async () => {
+ const t = setup()
+ await screen.findByText('A page')
+ t.gates.b = deferred()
+ const updater = t.counts.aUpdater
+ const renders = t.counts.aRenders
+ await t.start({ to: '/b' })
+ await act(async () => {
+ void t.router.invalidate()
+ await Promise.resolve()
+ })
+ expect(t.router.state.status).toBe('pending')
+ expect(t.router.state.location.pathname).toBe('/b')
+ expect(t.counts.aUpdater).toBe(updater)
+ expect(t.counts.aRenders).toBe(renders)
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.isActive('root-b')).toBe(true)
+ await t.release('b')
+ await screen.findByText('B page')
+ expect(t.counts.aUpdater).toBe(updater)
+ })
+
+ test('a departure redirected or superseded to another departing location does no work', async () => {
+ const t = setup({
+ bAfterGate: () => {
+ throw redirect({ to: '/c' })
+ },
+ })
+ await screen.findByText('A page')
+ const updater = t.counts.aUpdater
+ const renders = t.counts.aRenders
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ t.gates.items = deferred()
+ await t.start({ to: '/items/$id', params: { id: '1' } })
+ // B redirects to C after being superseded; neither keeps A.
+ await t.release('b')
+ expect(t.counts.aUpdater).toBe(updater)
+ expect(t.counts.aRenders).toBe(renders)
+ await t.release('items')
+ await screen.findByText('Items page')
+ expect(t.router.state.location.pathname).toBe('/items/1')
+
+ await act(() => t.router.navigate({ to: '/a' }))
+ await screen.findByText('A page')
+ const again = t.counts.aUpdater
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ await t.release('b')
+ await screen.findByText('C page')
+ expect(t.counts.aUpdater).toBe(again)
+ })
+
+ test('a view transition callback that throws does not break later navigations', async () => {
+ vi.stubGlobal('CSS', { supports: () => true })
+ ;(document as any).startViewTransition = (update: () => unknown) => {
+ update()
+ return {
+ updateCallbackDone: Promise.resolve(),
+ finished: Promise.resolve(),
+ }
+ }
+ const failures: Array = []
+ const t = setup({
+ // The history listener's load rejects with the callback's error. Record
+ // it instead of leaving it unhandled.
+ beforeRender: (router) => {
+ const load = router.load
+ router.load = (opts: any) =>
+ load(opts).catch((error: unknown) => failures.push(error))
+ },
+ })
+ await screen.findByText('A page')
+ await t.start({
+ to: '/b',
+ viewTransition: {
+ types: () => {
+ throw new Error('types failed')
+ },
+ },
+ })
+ await act(async () => {
+ await new Promise((resolve) => setTimeout(resolve, 0))
+ })
+ // The failed transaction leaves the router pending on the destination
+ // with the previous page displayed, without a newer publication.
+ expect(failures).toHaveLength(1)
+ expect(t.router.state.status).toBe('pending')
+ expect(t.router.state.location.pathname).toBe('/b')
+ expect(screen.getByText('A page')).toBeInTheDocument()
+ delete (document as any).startViewTransition
+ vi.unstubAllGlobals()
+
+ // A navigation that keeps the page updates its links.
+ await act(() => t.router.navigate({ to: '/a', search: { x: 'two' } }))
+ await t.settle()
+ expect(t.href('a-self')).toBe('/a?x=two')
+ expect(t.isActive('a-self')).toBe(true)
+ expect(t.isActive('root-b')).toBe(false)
+ })
+
+ test('links outside every match follow a pending navigation', async () => {
+ const t = setup()
+ await screen.findByText('A page')
+ cleanup()
+ const router = t.router
+ const InnerWrap = ({ children }: { children: React.ReactNode }) => (
+ <>
+
+ wrap b
+
+ {children}
+ >
+ )
+ router.update({ ...router.options, InnerWrap })
+ render( )
+ await screen.findByText('A page')
+ expect(t.isActive('wrap-b')).toBe(false)
+ t.gates.b = deferred()
+ await t.start({ to: '/b' })
+ expect(router.state.status).toBe('pending')
+ expect(t.isActive('wrap-b')).toBe(true)
+ await t.release('b')
+ await screen.findByText('B page')
+ expect(t.isActive('wrap-b')).toBe(true)
+ })
+})
+
+describe('masked links in a departing match', () => {
+ test.each(['mask', 'routeMasks'] as const)(
+ 'clicking a held link with a location-dependent %s pushes the masked href it displays',
+ async (kind) => {
+ const root = createRootRoute()
+ const gate: { b?: Deferred } = {}
+ const a = createRoute({
+ getParentRoute: () => root,
+ path: '/a',
+ component: () => (
+ ({ id: prev.x })}
+ hash
+ mask={
+ kind === 'mask'
+ ? ({ to: '.', search: true, hash: true } as any)
+ : undefined
+ }
+ data-testid="masked"
+ >
+ masked
+
+ ),
+ })
+ const b = createRoute({
+ getParentRoute: () => root,
+ path: '/b',
+ loader: () => gate.b?.promise,
+ component: () => B page ,
+ })
+ const photo = createRoute({
+ getParentRoute: () => root,
+ path: '/photo',
+ component: () => Photo page ,
+ })
+ const routeTree = root.addChildren([a, b, photo])
+ const router = createRouter({
+ routeTree,
+ history: createMemoryHistory({ initialEntries: ['/a?x=one#h'] }),
+ routeMasks:
+ kind === 'routeMasks'
+ ? [
+ createRouteMask({
+ routeTree,
+ from: '/photo',
+ to: '/a',
+ search: true,
+ hash: true,
+ } as any),
+ ]
+ : undefined,
+ })
+ render( )
+ const link = await screen.findByTestId('masked')
+ expect(link).toHaveAttribute('href', '/a?x=one#h')
+
+ gate.b = deferred()
+ await act(async () => {
+ void router.navigate({ to: '/b' })
+ await Promise.resolve()
+ })
+ expect(router.state.status).toBe('pending')
+ expect(link).toHaveAttribute('href', '/a?x=one#h')
+
+ await act(async () => {
+ fireEvent.click(link)
+ await Promise.resolve()
+ })
+ // The URL bar shows the masked href the link displayed.
+ expect(router.history.location.href).toBe('/a?x=one#h')
+ expect(router.latestLocation.pathname).toBe('/photo')
+ expect(router.latestLocation.search).toEqual({ id: 'one' })
+ gate.b.resolve()
+ await screen.findByText('Photo page')
+ expect(router.history.location.href).toBe('/a?x=one#h')
+ },
+ )
+
+ test.each(['mask', 'routeMasks'] as const)(
+ 'a link with a fixed %s builds its location once and does not rerender across navigations',
+ async (kind) => {
+ // Every location the router builds for the masked link passes through
+ // the output rewrite.
+ let maskedBuilds = 0
+ let renders = 0
+ const root = createRootRoute({
+ component: () => (
+ <>
+
+ {() => {
+ renders++
+ return 'masked'
+ }}
+
+
+ >
+ ),
+ })
+ const routes = ['a', 'b', 'photo', 'posts'].map((path) =>
+ createRoute({
+ getParentRoute: () => root,
+ path: `/${path}`,
+ component: () => {path} page ,
+ }),
+ )
+ const routeTree = root.addChildren(routes)
+ const router = createRouter({
+ routeTree,
+ history: createMemoryHistory({ initialEntries: ['/a'] }),
+ rewrite: {
+ output: ({ url }) => {
+ if (url.pathname === '/photo' || url.pathname === '/posts') {
+ maskedBuilds++
+ }
+ return url
+ },
+ },
+ routeMasks:
+ kind === 'routeMasks'
+ ? [
+ createRouteMask({
+ routeTree,
+ from: '/photo',
+ to: '/posts',
+ search: { from: 'photo' },
+ } as any),
+ ]
+ : undefined,
+ })
+ render( )
+ const link = await screen.findByTestId('masked')
+ expect(link).toHaveAttribute('href', '/posts?from=photo')
+ const buildsAfterMount = maskedBuilds
+ const rendersAfterMount = renders
+
+ for (const to of ['/b', '/a', '/b']) {
+ await act(() => router.navigate({ to }))
+ await screen.findByText(`${to.slice(1)} page`)
+ }
+ expect(link).toHaveAttribute('href', '/posts?from=photo')
+ expect(maskedBuilds).toBe(buildsAfterMount)
+ expect(renders).toBe(rendersAfterMount)
+ },
+ )
+})
+
+describe('link scope retention', () => {
+ setFlagsFromString('--expose-gc')
+ const gc: () => void = runInNewContext('gc')
+ async function collect() {
+ for (let round = 0; round < 3; round++) {
+ await new Promise((resolve) => setTimeout(resolve, 0))
+ gc()
+ }
+ }
+ const alive = (refs: Array>) =>
+ refs.flatMap((ref, index) => (ref.deref() ? [index] : []))
+
+ // Builds and renders a router whose route `/a` and root render Links, and
+ // returns a function that visits a location with a large history state.
+ function renderApp() {
+ const root = createRootRoute({
+ component: () => (
+ <>
+
+ root b
+
+
+ >
+ ),
+ })
+ const a = createRoute({
+ getParentRoute: () => root,
+ path: '/a',
+ component: () => (
+ <>
+ A page
+ prev} data-testid="a-self">
+ a self
+
+ >
+ ),
+ })
+ const b = createRoute({
+ getParentRoute: () => root,
+ path: '/b',
+ component: () => B page ,
+ })
+ const router = createRouter({
+ routeTree: root.addChildren([a, b]),
+ history: createMemoryHistory({ initialEntries: ['/a'] }),
+ })
+ render( )
+ return async (to: string, index: number) => {
+ await act(() =>
+ router.navigate({
+ to,
+ search: { i: index },
+ state: { payload: new Array(100_000).fill(index) } as any,
+ replace: true,
+ } as any),
+ )
+ await waitFor(() => expect(router.state.status).toBe('idle'))
+ const location: any = router.state.location
+ return [new WeakRef(location), new WeakRef(location.state.payload)]
+ }
+ }
+
+ test(
+ 'locations with large history state are collectable after their route is left',
+ { timeout: 20_000 },
+ async () => {
+ const visit = renderApp()
+ await screen.findByText('A page')
+ // The router may keep its first navigation's state (also on main).
+ await visit('/a', 0)
+ const left: Array> = []
+ for (let index = 1; index < 5; index++) {
+ left.push(...(await visit('/a', index)))
+ }
+ for (let index = 5; index < 9; index++) {
+ left.push(...(await visit('/b', index)))
+ }
+ await visit('/b', 9)
+ await screen.findByText('B page')
+ await collect()
+ // Only the current location (and its payload) stays reachable.
+ expect(alive(left)).toEqual([])
+ },
+ )
+})
+
+describe('links after a same-href navigation that changes history state', () => {
+ function renderStateApp() {
+ // The `tag` state of every `/b` load, preloads included.
+ const bLoads: Array = []
+ const root = createRootRoute({ component: () => })
+ const a = createRoute({
+ getParentRoute: () => root,
+ path: '/a',
+ component: () => (
+ <>
+ A page
+
+ inherit
+
+ ({ tag: `${prev.tag}-updated` }) as any}
+ data-testid="updater"
+ >
+ updater
+
+ >
+ ),
+ })
+ const b = createRoute({
+ getParentRoute: () => root,
+ path: '/b',
+ loader: ({ location }) => {
+ bLoads.push((location.state as any).tag)
+ },
+ component: () => B page ,
+ })
+ const router = createRouter({
+ routeTree: root.addChildren([a, b]),
+ history: createMemoryHistory({ initialEntries: ['/a'] }),
+ })
+ render( )
+ return { router, bLoads }
+ }
+
+ async function changeState(router: any) {
+ await screen.findByText('A page')
+ await act(() =>
+ router.navigate({
+ to: '/a',
+ state: { tag: 'latest' } as any,
+ replace: true,
+ }),
+ )
+ expect(router.state.location.href).toBe('/a')
+ expect(router.state.location.state.tag).toBe('latest')
+ }
+
+ test.each([
+ ['inherit', 'latest'],
+ ['updater', 'latest-updated'],
+ ])(
+ 'clicking link %s derives its state from the latest location',
+ async (id, tag) => {
+ const { router } = renderStateApp()
+ await changeState(router)
+
+ fireEvent.click(screen.getByTestId(id))
+ await screen.findByText('B page')
+ expect(router.state.location.pathname).toBe('/b')
+ expect((router.state.location.state as any).tag).toBe(tag)
+ },
+ )
+
+ test('preloading derives its state from the latest location', async () => {
+ const { router, bLoads } = renderStateApp()
+ await changeState(router)
+
+ fireEvent.mouseEnter(screen.getByTestId('inherit'))
+ await waitFor(() => expect(bLoads).toEqual(['latest']))
+ })
+})
diff --git a/packages/react-router/tests/link-destination.test.tsx b/packages/react-router/tests/link-destination.test.tsx
index 8d27615ff9..31daa6d551 100644
--- a/packages/react-router/tests/link-destination.test.tsx
+++ b/packages/react-router/tests/link-destination.test.tsx
@@ -4,6 +4,7 @@ import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'
import {
Link,
Outlet,
+ RouterContextProvider,
RouterProvider,
createMemoryHistory,
createRootRoute,
@@ -356,3 +357,142 @@ describe('Link destination updates', () => {
expect(propMask).toHaveAttribute('href', '/visible/two')
})
})
+
+describe('Link props that change without a destination prop', () => {
+ afterEach(() => {
+ cleanup()
+ vi.useRealTimers()
+ })
+
+ async function setup(targetLoader?: () => void, nextLoader?: () => void) {
+ const root = createRootRoute()
+ const router = createRouter({
+ routeTree: root.addChildren([
+ createRoute({ getParentRoute: () => root, path: '/a' }),
+ createRoute({
+ getParentRoute: () => root,
+ path: '/b',
+ loader: targetLoader,
+ }),
+ createRoute({
+ getParentRoute: () => root,
+ path: '/c',
+ loader: nextLoader,
+ }),
+ ]),
+ history: createMemoryHistory({ initialEntries: ['/a'] }),
+ })
+ await router.load()
+ return router
+ }
+
+ test('changing reloadDocument affects the next click', async () => {
+ const router = await setup()
+ const blockedTargets: Array = []
+ const unblock = router.history.block({
+ blockerFn: ({ nextLocation }) => {
+ blockedTargets.push(nextLocation.pathname)
+ return true
+ },
+ })
+ function Example() {
+ const [reload, setReload] = React.useState(false)
+ return (
+ <>
+ setReload(true)}>Enable reload
+
+ Target
+
+ >
+ )
+ }
+ render(
+
+
+ ,
+ )
+ try {
+ fireEvent.click(screen.getByRole('button', { name: 'Enable reload' }))
+ await act(() => {
+ fireEvent.click(screen.getByRole('link', { name: 'Target' }))
+ })
+ // A document navigation shows blockers the current history location;
+ // a client navigation would show the pending /b location.
+ expect(blockedTargets).toEqual(['/a'])
+ expect(router.history.location.pathname).toBe('/a')
+ } finally {
+ unblock()
+ }
+ })
+
+ test('changing href updates the displayed target and active state', async () => {
+ const router = await setup()
+ function Example() {
+ const [changed, setChanged] = React.useState(false)
+ return (
+ <>
+ setChanged(true)}>Change href
+
+ Target
+
+ >
+ )
+ }
+ render(
+
+
+ ,
+ )
+ const link = screen.getByRole('link', { name: 'Target' })
+ expect(link).toHaveAttribute('href', '/a')
+ expect(link).toHaveAttribute('aria-current', 'page')
+ fireEvent.click(screen.getByRole('button', { name: 'Change href' }))
+ expect(link).toHaveAttribute('href', '/b')
+ expect(link).not.toHaveAttribute('aria-current')
+ })
+
+ test('changing href cancels intent work for the old target and preloads and navigates to the new one', async () => {
+ const oldLoader = vi.fn()
+ const nextLoader = vi.fn()
+ const router = await setup(oldLoader, nextLoader)
+ vi.useFakeTimers()
+ function Example() {
+ const [href, setHref] = React.useState('/b')
+ return (
+ <>
+ setHref('/c')}>Retarget
+
+ Target
+
+ >
+ )
+ }
+ render(
+
+
+ ,
+ )
+ const link = screen.getByRole('link', { name: 'Target' })
+ expect(link).toHaveAttribute('href', '/b')
+ fireEvent.mouseOver(link)
+ await act(() => vi.advanceTimersByTimeAsync(20))
+ fireEvent.click(screen.getByRole('button', { name: 'Retarget' }))
+ expect(link).toHaveAttribute('href', '/c')
+ await act(() => vi.advanceTimersByTimeAsync(100))
+ expect(oldLoader).not.toHaveBeenCalled()
+ expect(nextLoader).not.toHaveBeenCalled()
+
+ fireEvent.mouseLeave(link)
+ fireEvent.mouseOver(link)
+ await act(() => vi.advanceTimersByTimeAsync(50))
+ expect(nextLoader).toHaveBeenCalledTimes(1)
+ expect(router.state.location.pathname).toBe('/a')
+
+ await act(() => {
+ fireEvent.click(link)
+ })
+ expect(router.state.location.pathname).toBe('/c')
+ expect(link).toHaveAttribute('aria-current', 'page')
+ expect(oldLoader).not.toHaveBeenCalled()
+ })
+})
diff --git a/packages/router-core/src/index.ts b/packages/router-core/src/index.ts
index 9d0e0e8b07..9206ef60dd 100644
--- a/packages/router-core/src/index.ts
+++ b/packages/router-core/src/index.ts
@@ -103,7 +103,11 @@ export {
resolveManifestCssLink,
} from './manifest'
export { isMatch } from './Matches'
-export { _getAssetMatches, _getRenderedMatches } from './load-client'
+export {
+ _getAssetMatches,
+ _getRenderedMatches,
+ _isRouteDeparting,
+} from './load-client'
export { composeSsrBodyScripts, getSsrBodyScriptParts } from './ssr/bodyScripts'
export type {
AnyMatchAndValue,
diff --git a/packages/router-core/src/load-client.ts b/packages/router-core/src/load-client.ts
index ea4f270447..9e3391215e 100644
--- a/packages/router-core/src/load-client.ts
+++ b/packages/router-core/src/load-client.ts
@@ -116,6 +116,28 @@ export function _getRenderedMatches(
return end && end < matches.length ? matches.slice(0, end) : matches
}
+/**
+ * Truthy when the transaction publishing `location` leaves `routeId` out of its
+ * matches, so subscribers scoped to that route can skip the publication: the
+ * route unmounts when the transaction commits, and a transaction that ends
+ * otherwise is superseded or redirected by a newer publication. Only valid
+ * synchronously inside the publication: the transaction's matches are emptied
+ * at commit and before following a redirect. Publications without a matching
+ * transaction (hydration) and scopes without a route never depart.
+ */
+export function _isRouteDeparting(
+ router: AnyRouter,
+ routeId: string | undefined,
+ location: ParsedLocation,
+): unknown {
+ const tx = router._tx
+ return (
+ routeId &&
+ tx?.[2 /* location */] === location &&
+ !tx[3 /* matches */].some((match) => match.routeId === routeId)
+ )
+}
+
/** Return the lane whose document assets belong to the current presentation. */
export function _getAssetMatches(
matches: Array,
diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts
index d3379a85f2..ab3fe23194 100644
--- a/packages/router-core/src/router.ts
+++ b/packages/router-core/src/router.ts
@@ -1914,9 +1914,10 @@ export class RouterCore<
}
}
- // We allow the caller to override the current location
+ // We allow the caller to override the current location. Masks build
+ // from the same location as the destination they mask.
const currentLocation =
- dest._fromLocation || this._pendingLocation || this.latestLocation
+ opts._fromLocation || this._pendingLocation || this.latestLocation
// Value-affecting reads of the current location go through these two.
// The lightweight match (fullPath, search, params without full match
@@ -2204,13 +2205,10 @@ export class RouterCore<
}
}
- // Masked locations stay out: `opts.mask` is rebuilt from the current location.
- if (
- !(isServer ?? this.isServer) &&
- !usedCurrent &&
- opts._fromLocation &&
- !next.maskedLocation
- ) {
+ // A mask that reads the current location marks the whole result through
+ // `usedCurrent`. Route masks belong to the route tree and options, whose
+ // updates replace the cache.
+ if (!(isServer ?? this.isServer) && !usedCurrent && opts._fromLocation) {
this.staticLocations!.set(opts, next)
}
diff --git a/packages/router-core/tests/mask.test.ts b/packages/router-core/tests/mask.test.ts
index 3791206dd7..3722aa6a1b 100644
--- a/packages/router-core/tests/mask.test.ts
+++ b/packages/router-core/tests/mask.test.ts
@@ -645,3 +645,201 @@ describe('buildLocation - route masks', () => {
)
})
})
+
+describe('buildLocation - masks and _fromLocation', () => {
+ test.each(['mask', 'routeMasks'] as const)(
+ 'the %s location builds from _fromLocation like the destination',
+ async (kind) => {
+ const rootRoute = new BaseRootRoute({})
+ const postsRoute = new BaseRoute({
+ getParentRoute: () => rootRoute,
+ path: '/posts',
+ })
+ const photoRoute = new BaseRoute({
+ getParentRoute: () => rootRoute,
+ path: '/photo',
+ })
+ const routeTree = rootRoute.addChildren([postsRoute, photoRoute])
+ const router = createTestRouter({
+ routeTree,
+ history: createMemoryHistory({
+ initialEntries: ['/posts?page=1#live'],
+ }),
+ routeMasks:
+ kind === 'routeMasks'
+ ? [
+ {
+ routeTree: null as any,
+ from: '/photo',
+ to: '.',
+ search: true,
+ hash: true,
+ },
+ ]
+ : undefined,
+ })
+ await router.load()
+ const held = router.buildLocation({
+ to: '/posts',
+ search: { page: 5 },
+ hash: 'held',
+ })
+
+ const location = router.buildLocation({
+ to: '/photo',
+ search: true,
+ mask:
+ kind === 'mask' ? { to: '.', search: true, hash: true } : undefined,
+ _fromLocation: held,
+ } as any)
+
+ expect(location.href).toBe('/photo?page=5')
+ expect(location.maskedLocation?.href).toBe('/posts?page=5#held')
+ },
+ )
+})
+
+describe('buildLocation - masked locations and the static location cache', () => {
+ const setup = (routeMasks?: Array>) => {
+ const rootRoute = new BaseRootRoute({})
+ const postsRoute = new BaseRoute({
+ getParentRoute: () => rootRoute,
+ path: '/posts',
+ })
+ const photoRoute = new BaseRoute({
+ getParentRoute: () => rootRoute,
+ path: '/photo',
+ })
+ const photosRoute = new BaseRoute({
+ getParentRoute: () => rootRoute,
+ path: '/photos/$photoId',
+ })
+ const routeTree = rootRoute.addChildren([
+ postsRoute,
+ photoRoute,
+ photosRoute,
+ ])
+ const router = createTestRouter({
+ routeTree,
+ history: createMemoryHistory({ initialEntries: ['/posts'] }),
+ routeMasks,
+ })
+ // Two sources a Link can display, as the router builds them.
+ const sources = [1, 2].map((n) =>
+ router.buildLocation({
+ to: '/photos/$photoId',
+ params: { photoId: `${n}` },
+ search: { page: n },
+ hash: n === 1 ? 'one' : 'two',
+ state: { n } as any,
+ }),
+ )
+ // Builds one options object from each source in turn, the way a Link
+ // rebuilds its destination when its displayed location changes.
+ const buildFromEachSource = (opts: Record) =>
+ sources.map((source) =>
+ router.buildLocation(
+ Object.assign(opts, { _fromLocation: source }) as any,
+ ),
+ )
+ return { router, routeTree, buildFromEachSource }
+ }
+
+ test('reuses the location of a fixed mask across sources', () => {
+ const { buildFromEachSource } = setup()
+ const [first, second] = buildFromEachSource({
+ to: '/photo',
+ search: { id: 1 },
+ mask: { to: '/posts', search: { from: 'photo' } },
+ })
+ expect(first!.maskedLocation!.href).toBe('/posts?from=photo')
+ expect(second).toBe(first)
+ })
+
+ test('reuses the location of a fixed route mask across sources', () => {
+ const { buildFromEachSource } = setup([
+ { routeTree: null as any, from: '/photo', to: '/posts' },
+ ])
+ const [first, second] = buildFromEachSource({ to: '/photo' })
+ expect(first!.maskedLocation!.href).toBe('/posts')
+ expect(second).toBe(first)
+ })
+
+ test.each([
+ ['a relative target', { to: '.' }, ['/photos/1', '/photos/2']],
+ [
+ 'inherited params',
+ { to: '/photos/$photoId' },
+ ['/photos/1', '/photos/2'],
+ ],
+ [
+ 'the current search',
+ { to: '/posts', search: true },
+ ['/posts?page=1', '/posts?page=2'],
+ ],
+ [
+ 'a search updater',
+ { to: '/posts', search: (prev: any) => ({ p: prev.page }) },
+ ['/posts?p=1', '/posts?p=2'],
+ ],
+ [
+ 'the current hash',
+ { to: '/posts', hash: true },
+ ['/posts#one', '/posts#two'],
+ ],
+ ] as const)(
+ 'rebuilds a mask that reads %s for each source',
+ (_, mask, expected) => {
+ const { buildFromEachSource } = setup()
+ const locations = buildFromEachSource({ to: '/photo', mask })
+ expect(locations[1]).not.toBe(locations[0])
+ expect(
+ locations.map((location) => location.maskedLocation!.href),
+ ).toEqual(expected)
+ },
+ )
+
+ test('rebuilds a mask that reads the current state for each source', () => {
+ const { buildFromEachSource } = setup()
+ const locations = buildFromEachSource({
+ to: '/photo',
+ mask: { to: '/posts', state: true },
+ })
+ expect(locations[1]).not.toBe(locations[0])
+ expect(
+ locations.map((location) => (location.maskedLocation!.state as any).n),
+ ).toEqual([1, 2])
+ })
+
+ test('rebuilds a route mask that reads the current location for each source', () => {
+ const { buildFromEachSource } = setup([
+ {
+ routeTree: null as any,
+ from: '/photo',
+ to: '/posts',
+ search: true,
+ hash: true,
+ },
+ ])
+ const locations = buildFromEachSource({ to: '/photo' })
+ expect(locations[1]).not.toBe(locations[0])
+ expect(locations.map((location) => location.maskedLocation!.href)).toEqual([
+ '/posts?page=1#one',
+ '/posts?page=2#two',
+ ])
+ })
+
+ test('drops a cached route mask when the router is updated', () => {
+ const { router, buildFromEachSource } = setup([
+ { routeTree: null as any, from: '/photo', to: '/posts' },
+ ])
+ const opts = { to: '/photo' }
+ const [first] = buildFromEachSource(opts)
+ expect(first!.maskedLocation!.href).toBe('/posts')
+
+ router.update({ ...router.options, routeMasks: undefined })
+ const [afterUpdate] = buildFromEachSource(opts)
+ expect(afterUpdate).not.toBe(first)
+ expect(afterUpdate!.maskedLocation).toBeUndefined()
+ })
+})
diff --git a/packages/solid-router/src/link.tsx b/packages/solid-router/src/link.tsx
index 94f453bb2c..a3c183fc91 100644
--- a/packages/solid-router/src/link.tsx
+++ b/packages/solid-router/src/link.tsx
@@ -1,8 +1,7 @@
import * as Solid from 'solid-js'
-import { mergeRefs } from '@solid-primitives/refs'
-
import {
+ _isRouteDeparting,
deepEqual,
functionalUpdate,
getUrlScheme,
@@ -15,6 +14,7 @@ import {
import { isServer } from '@tanstack/router-core/isServer'
import { Dynamic } from 'solid-js/web'
import { useRouter } from './useRouter'
+import { nearestMatchContext } from './matchContext'
import { useIntersectionObserver } from './utils'
@@ -23,6 +23,7 @@ import type {
AnyRouter,
Constrain,
LinkOptions,
+ ParsedLocation,
RegisteredRouter,
RoutePaths,
} from '@tanstack/router-core'
@@ -31,12 +32,6 @@ import type {
ValidateLinkOptionsArray,
} from './typePrimitives'
-const timeoutMap = new WeakMap>()
-const cancelPreload = (eventTarget: object) => {
- clearTimeout(timeoutMap.get(eventTarget))
- timeoutMap.delete(eventTarget)
-}
-
export function useLinkProps<
TRouter extends AnyRouter = RegisteredRouter,
TFrom extends RoutePaths | string = string,
@@ -45,225 +40,199 @@ export function useLinkProps<
TMaskTo extends string = '',
>(
options: UseLinkPropsOptions,
+): Solid.ComponentProps<'a'> {
+ return createLinkProps(options as any, LINK_OPTION_KEYS)
+}
+
+// `ownKeys` are the options that never reach the element.
+function createLinkProps(
+ options: UseLinkPropsOptions,
+ ownKeys: ReadonlyArray,
): Solid.ComponentProps<'a'> {
const router = useRouter()
- const [local, rest] = Solid.splitProps(
- Solid.mergeProps(
- {
- activeProps: STATIC_ACTIVE_PROPS_GET,
- inactiveProps: STATIC_INACTIVE_PROPS_GET,
- },
- options,
- ),
- [
- 'activeProps',
- 'inactiveProps',
- 'activeOptions',
- 'to',
- 'preload',
- 'preloadDelay',
- 'preloadIntentProximity',
- 'hashScrollIntoView',
- 'replace',
- 'startTransition',
- 'resetScroll',
- 'viewTransition',
- 'target',
- 'disabled',
- 'style',
- 'class',
- 'onClick',
- 'onBlur',
- 'onFocus',
- 'onMouseEnter',
- 'onMouseLeave',
- 'onMouseOver',
- 'onMouseOut',
- 'onTouchStart',
- 'ignoreBlocker',
- ],
+ // Options are read directly: one props proxy, no merged-default getters.
+ const [, propsSafeToSpread] = Solid.splitProps(
+ options,
+ ownKeys as Array,
)
- // const {
- // // custom props
- // activeProps = () => ({ class: 'active' }),
- // inactiveProps = () => ({}),
- // activeOptions,
- // to,
- // preload: userPreload,
- // preloadDelay: userPreloadDelay,
- // hashScrollIntoView,
- // replace,
- // startTransition,
- // resetScroll,
- // viewTransition,
- // // element props
- // children,
- // target,
- // disabled,
- // style,
- // class,
- // onClick,
- // onFocus,
- // onMouseEnter,
- // onMouseLeave,
- // onTouchStart,
- // ignoreBlocker,
- // ...rest
- // } = options
+ // A live match never changes route, so read it once without tracking.
+ const routeId = Solid.useContext(nearestMatchContext)[0 /* routeId */]()
- const [_, propsSafeToSpread] = Solid.splitProps(rest, [
- 'params',
- 'search',
- 'hash',
- 'state',
- 'mask',
- 'reloadDocument',
- 'unsafeRelative',
- 'from',
- 'href',
- ])
+ // While a publishing navigation leaves the Link's route, keep the location
+ // the route still presents so the Link does no work. The route unmounts
+ // when that navigation commits, and any other outcome publishes a newer
+ // location. Compare by identity: a same-href navigation can change state.
+ // The server renders one location: no reactivity there.
+ const currentLocation =
+ (isServer ?? router.isServer)
+ ? () => router.stores.location.get()
+ : Solid.createMemo((prev?: ParsedLocation) => {
+ const location = router.stores.location.get()
+ return prev && _isRouteDeparting(router, routeId, location)
+ ? prev
+ : location
+ })
- const currentLocation = Solid.createMemo(
- () => router.stores.location.get(),
- undefined,
- { equals: (prev, next) => prev.href === next.href },
- )
-
- const next = Solid.createMemo(() => {
- // Rebuild when inherited search/hash or the current route context changes.
- const _fromLocation = currentLocation()
- const nextOptions = { _fromLocation, ...options } as any
- // untrack because router-core will also access stores, which are signals in solid
- return Solid.untrack(() => router.buildLocation(nextOptions))
- })
-
- const hrefOption = Solid.createMemo(() => {
- if (options.disabled) return undefined
- // Use publicHref - it contains the correct href for display
- // When a rewrite changes the origin, publicHref is the full URL
- // Otherwise it's the origin-stripped path
- // This avoids constructing URL objects in the hot path
- const location = next().maskedLocation ?? next()
- const publicHref = location.publicHref
- const external = location.external
-
- const href = external
- ? publicHref
- : router.history.createHref(publicHref) || '/'
- if (
- (external || href !== publicHref) &&
- isDangerousProtocol(href, router.protocolAllowlist)
- ) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn(`Blocked Link with dangerous protocol: ${href}`)
+ // The Link's own destination options, replaced only when a destination prop
+ // changes: the router reuses a location built from the same object without
+ // reading the current location. A Solid store changes in place, so a store
+ // prop value (checked one level deep, not nested) gets a fresh object per
+ // location instead, re-reading the store at each navigation as before. A
+ // mask holds destination options of its own, so its values are checked too.
+ const getDest = () => {
+ const dest: any = {}
+ for (const key of NAVIGATION_KEYS) {
+ const value = (dest[key] = (options as any)[key])
+ if (
+ isStore(value) ||
+ (key === 'mask' && value && Object.values(value).some(isStore))
+ ) {
+ currentLocation()
}
- return undefined
}
+ return dest
+ }
+ const dest =
+ (isServer ?? router.isServer) ? getDest : Solid.createMemo(getDest)
- return href
- })
+ // Only a hydrating client renders the server's hash-less active state first.
+ const hasHydrated =
+ !(isServer ?? router.isServer) && router.options.ssr
+ ? useHydrated()
+ : undefined
- const externalLink = Solid.createMemo(() => {
+ // Everything the Link derives from its destination and the location, in
+ // one computation: [element href, external href (null when blocked),
+ // active]. An unchanged result keeps its identity, so a navigation that
+ // leaves the Link as it was notifies nothing downstream.
+ const getLinkState = (prev?: LinkState): LinkState => {
+ const location = currentLocation()
const to = options.to
+ const disabled = options.disabled
const scheme = typeof to === 'string' && getUrlScheme(to)
+ let href: string | undefined
+ let external: string | null | undefined
+ let active = false
if (scheme) {
- if (!router.protocolAllowlist.has(scheme)) {
+ if (router.protocolAllowlist.has(scheme)) {
+ external = to
+ } else {
if (process.env.NODE_ENV !== 'production') {
console.warn(`Blocked Link with dangerous protocol: ${to}`)
}
- return null
+ external = null
}
- return to
- }
-
- const _href = hrefOption()
- if (!_href && !options.disabled) {
- return null
- }
- return _href && getUrlScheme(_href) ? _href : undefined
- })
-
- const shouldHydrateHash = !isServer && !!router.options.ssr
- const hasHydrated = (isServer ?? router.isServer) ? undefined : useHydrated()
-
- const isActive = Solid.createMemo(() => {
- if (externalLink() !== undefined) {
- return false
- }
- const activeOptions = local.activeOptions
- const current = currentLocation()
- const nextLocation = next()
-
- const currentPath = removeTrailingSlash(current.pathname, router.basepath)
- const nextPath = removeTrailingSlash(nextLocation.pathname, router.basepath)
-
- // Both modes compare normalized paths; fuzzy matches need a segment boundary.
- if (
- activeOptions?.exact
- ? currentPath !== nextPath
- : !(
- currentPath.startsWith(nextPath) &&
- (currentPath.length === nextPath.length ||
- currentPath[nextPath.length] === '/')
- )
- ) {
- return false
- }
-
- if (activeOptions?.includeSearch ?? true) {
- const searchTest = deepEqual(
- current.search,
- nextLocation.search,
- !activeOptions?.exact,
- activeOptions?.explicitUndefined,
- )
- if (!searchTest) {
- return false
+ } else {
+ const options_ = dest()
+ // Clicks and preloads go where the href points.
+ options_._fromLocation = location
+ // untrack because router-core will also access stores, which are signals in solid
+ const next = Solid.untrack(() => router.buildLocation(options_))
+ if (!disabled) {
+ // Use publicHref - it contains the correct href for display
+ // When a rewrite changes the origin, publicHref is the full URL
+ // Otherwise it's the origin-stripped path
+ // This avoids constructing URL objects in the hot path
+ const shown = next.maskedLocation ?? next
+ const publicHref = shown.publicHref
+ const shownHref = shown.external
+ ? publicHref
+ : router.history.createHref(publicHref) || '/'
+ if (
+ (shown.external || shownHref !== publicHref) &&
+ isDangerousProtocol(shownHref, router.protocolAllowlist)
+ ) {
+ if (process.env.NODE_ENV !== 'production') {
+ console.warn(`Blocked Link with dangerous protocol: ${shownHref}`)
+ }
+ } else {
+ href = shownHref
+ }
+ }
+ external =
+ !href && !disabled
+ ? null
+ : href && getUrlScheme(href)
+ ? href
+ : undefined
+ if (external === undefined) {
+ const activeOptions = options.activeOptions
+ const currentPath = removeTrailingSlash(
+ location.pathname,
+ router.basepath,
+ )
+ const nextPath = removeTrailingSlash(next.pathname, router.basepath)
+ // Both modes compare normalized paths; fuzzy matches need a segment boundary.
+ active =
+ (activeOptions?.exact
+ ? currentPath === nextPath
+ : currentPath.startsWith(nextPath) &&
+ (currentPath.length === nextPath.length ||
+ currentPath[nextPath.length] === '/')) &&
+ (!(activeOptions?.includeSearch ?? true) ||
+ deepEqual(
+ location.search,
+ next.search,
+ !activeOptions?.exact,
+ activeOptions?.explicitUndefined,
+ )) &&
+ (!activeOptions?.includeHash ||
+ (hasHydrated && !hasHydrated() ? '' : location.hash) === next.hash)
}
}
-
- if (activeOptions?.includeHash) {
- const currentHash =
- shouldHydrateHash && !hasHydrated?.() ? '' : current.hash
- return currentHash === nextLocation.hash
- }
- return true
- })
-
- const simpleStyling = Solid.createMemo(
- () =>
- local.activeProps === STATIC_ACTIVE_PROPS_GET &&
- local.inactiveProps === STATIC_INACTIVE_PROPS_GET &&
- local.class === undefined &&
- local.style === undefined,
- )
+ href = external === null ? undefined : external || href
+ return prev &&
+ prev[0 /* href */] === href &&
+ prev[1 /* external */] === external &&
+ prev[2 /* active */] === active
+ ? prev
+ : [href, external, active]
+ }
+ const linkState =
+ (isServer ?? router.isServer)
+ ? getLinkState
+ : Solid.createMemo(getLinkState)
type ResolvedLinkStateProps = Omit, 'style'> & {
style?: Solid.JSX.CSSProperties
}
const resolveLinkStateProps = (
+ [href, external, active]: LinkState,
base: Solid.ComponentProps<'a'> & { disabled?: boolean },
) => {
- const active = isActive()
+ const disabled = options.disabled || external === null
+ base.href = href
+ base.disabled = disabled
+ base.target = options.target
+ if (disabled) {
+ Object.assign(base, STATIC_DISABLED_PROPS)
+ }
- if (simpleStyling()) {
- return {
- ...base,
- ...(active && STATIC_DEFAULT_ACTIVE_ATTRIBUTES),
- }
+ if (
+ options.activeProps === undefined &&
+ options.inactiveProps === undefined &&
+ options.class === undefined &&
+ options.style === undefined
+ ) {
+ return active
+ ? Object.assign(base, STATIC_DEFAULT_ACTIVE_ATTRIBUTES)
+ : base
}
const stateProps: ResolvedLinkStateProps =
- functionalUpdate(active ? local.activeProps : local.inactiveProps, {}) ??
- EMPTY_OBJECT
- const baseStyle = local.style
+ functionalUpdate(
+ (active ? options.activeProps : options.inactiveProps) ??
+ (active ? STATIC_ACTIVE_PROPS : EMPTY_OBJECT),
+ {},
+ ) ?? EMPTY_OBJECT
+ const baseStyle = options.style
const stateStyle = stateProps.style
// Snapshot reactive style properties so in-place updates remain observable.
const style =
baseStyle || stateStyle ? { ...baseStyle, ...stateStyle } : undefined
- const baseClass = local.class
+ const baseClass = options.class
const stateClass = stateProps.class
const className = baseClass
? stateClass
@@ -275,8 +244,8 @@ export function useLinkProps<
...base,
...stateProps,
// State props can override element props, but not routing options.
- href: base.href,
- disabled: base.disabled,
+ href,
+ disabled,
target: base.target,
...(style && hasKeys(style) && { style }),
...(className && { class: className }),
@@ -286,22 +255,16 @@ export function useLinkProps<
// Keep the guard inline so browser builds can drop the server return.
if (isServer ?? router.isServer) {
- const external = externalLink()
- const disabled = local.disabled || external === null
- const props = resolveLinkStateProps({
- onClick: local.onClick,
- onBlur: local.onBlur,
- onFocus: local.onFocus,
- onMouseEnter: local.onMouseEnter,
- onMouseLeave: local.onMouseLeave,
- onMouseOut: local.onMouseOut,
- onMouseOver: local.onMouseOver,
- onTouchStart: local.onTouchStart,
- href: external === null ? undefined : external || hrefOption(),
+ const props = resolveLinkStateProps(linkState(), {
+ onClick: options.onClick,
+ onBlur: options.onBlur,
+ onFocus: options.onFocus,
+ onMouseEnter: options.onMouseEnter,
+ onMouseLeave: options.onMouseLeave,
+ onMouseOut: options.onMouseOut,
+ onMouseOver: options.onMouseOver,
+ onTouchStart: options.onTouchStart,
ref: options.ref,
- disabled,
- target: local.target,
- ...(disabled && STATIC_DISABLED_PROPS),
})
// Avoid creating merged-prop getters for absent server event handlers.
for (const key of STATIC_EVENT_PROPS) {
@@ -314,34 +277,33 @@ export function useLinkProps<
let hasRenderFetched = false
- const preload = Solid.createMemo(() => {
- if (
- options.reloadDocument ||
- externalLink() !== undefined ||
- local.disabled
- ) {
- return false
- }
- return local.preload ?? router.options.defaultPreload
- })
+ const preload = () =>
+ !options.reloadDocument &&
+ linkState()[1 /* external */] === undefined &&
+ !options.disabled &&
+ (options.preload ?? router.options.defaultPreload)
const preloadDelay = () =>
- local.preloadDelay ?? router.options.defaultPreloadDelay ?? 0
+ options.preloadDelay ?? router.options.defaultPreloadDelay ?? 0
const doPreload = () =>
- router
- .preloadRoute(options as Parameters[0])
- .catch((err: any) => {
- console.warn(err)
- console.warn(preloadWarning)
- })
+ router.preloadRoute(dest()).catch((err: any) => {
+ console.warn(err)
+ console.warn(preloadWarning)
+ })
const [ref, setRef] = Solid.createSignal(null)
+ let preloadTimeout: ReturnType | undefined
+ const cancelPreload = () => {
+ clearTimeout(preloadTimeout)
+ preloadTimeout = undefined
+ }
+
const enqueuePreload = (
e?: MouseEvent | FocusEvent | IntersectionObserverEntry,
) => {
if (!e) {
- cancelPreload(ref)
+ cancelPreload()
return
}
@@ -352,7 +314,7 @@ export function useLinkProps<
)
) {
if ((e as IntersectionObserverEntry).isIntersecting === false) {
- cancelPreload(ref)
+ cancelPreload()
}
return
}
@@ -362,24 +324,13 @@ export function useLinkProps<
return
}
- if (!timeoutMap.has(ref)) {
- timeoutMap.set(
- ref,
- setTimeout(() => {
- timeoutMap.delete(ref)
- doPreload()
- }, preloadDelay()),
- )
- }
+ preloadTimeout ??= setTimeout(() => {
+ preloadTimeout = undefined
+ doPreload()
+ }, preloadDelay())
}
- useIntersectionObserver(
- ref,
- enqueuePreload,
- () => preload() !== 'viewport',
- // Intent preloading still needs timer cleanup without an observer.
- () => !!preload(),
- )
+ useIntersectionObserver(ref, enqueuePreload, preload)
Solid.createEffect(() => {
if (hasRenderFetched) {
@@ -398,30 +349,22 @@ export function useLinkProps<
e.currentTarget as HTMLAnchorElement | SVGAElement
).getAttribute('target')
const effectiveTarget =
- local.target !== undefined ? local.target : elementTarget
+ options.target !== undefined ? options.target : elementTarget
if (
- !local.disabled &&
- externalLink() === undefined &&
+ !options.disabled &&
+ linkState()[1 /* external */] === undefined &&
!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) &&
!e.defaultPrevented &&
(!effectiveTarget || effectiveTarget === '_self') &&
e.button === 0
) {
e.preventDefault()
- cancelPreload(ref)
+ cancelPreload()
// All is well? Navigate!
// N.B. we don't call `router.commitLocation(next) here because we want to run `validateSearch` before committing
- router.navigate({
- ...options,
- replace: local.replace,
- resetScroll: local.resetScroll,
- hashScrollIntoView: local.hashScrollIntoView,
- startTransition: local.startTransition,
- viewTransition: local.viewTransition,
- ignoreBlocker: local.ignoreBlocker,
- })
+ router.navigate(dest())
}
}
@@ -432,38 +375,46 @@ export function useLinkProps<
const handleLeave = () => {
if (preload() === 'intent') {
- cancelPreload(ref)
+ cancelPreload()
}
}
- const onClick = createComposedHandler(() => local.onClick, handleClick)
- const onBlur = createComposedHandler(() => local.onBlur, handleLeave)
- const onFocus = createComposedHandler(() => local.onFocus, enqueuePreload)
+ const onClick = createComposedHandler(() => options.onClick, handleClick)
+ const onBlur = createComposedHandler(() => options.onBlur, handleLeave)
+ const onFocus = createComposedHandler(() => options.onFocus, enqueuePreload)
const onMouseEnter = createComposedHandler(
- () => local.onMouseEnter,
+ () => options.onMouseEnter,
enqueuePreload,
)
const onMouseOver = createComposedHandler(
- () => local.onMouseOver,
+ () => options.onMouseOver,
enqueuePreload,
)
const onMouseLeave = createComposedHandler(
- () => local.onMouseLeave,
+ () => options.onMouseLeave,
+ handleLeave,
+ )
+ const onMouseOut = createComposedHandler(
+ () => options.onMouseOut,
handleLeave,
)
- const onMouseOut = createComposedHandler(() => local.onMouseOut, handleLeave)
const onTouchStart = createComposedHandler(
- () => local.onTouchStart,
+ () => options.onTouchStart,
handleTouchStart,
)
- const resolvedProps = Solid.createMemo(() => {
- const external = externalLink()
- const disabled = local.disabled || external === null
+ // One ref callback per element. The selected state props' ref, else the
+ // Link's own, receives the element once; a state change does not re-call it.
+ const linkRef = (el: Element) => {
+ setRef(el)
+ const ref = Solid.untrack(resolvedProps).ref ?? options.ref
+ if (typeof ref === 'function') {
+ ref(el as HTMLAnchorElement)
+ }
+ }
- const base = {
- href: external === null ? undefined : external || hrefOption(),
- ref: mergeRefs(setRef, options.ref),
+ const resolvedProps = Solid.createMemo(() =>
+ resolveLinkStateProps(linkState(), {
onClick,
onBlur,
onFocus,
@@ -472,17 +423,68 @@ export function useLinkProps<
onMouseLeave,
onMouseOut,
onTouchStart,
- disabled,
- target: local.target,
- ...(disabled && STATIC_DISABLED_PROPS),
- }
+ }),
+ )
- return resolveLinkStateProps(base)
- })
-
- return Solid.mergeProps(propsSafeToSpread, resolvedProps) as any
+ // The ref sits after the memo so reading it does not track the memo: the
+ // element's ref effect then runs once.
+ return Solid.mergeProps(propsSafeToSpread, resolvedProps, {
+ ref: linkRef,
+ }) as any
}
+// [element href, external href (null when blocked), active]
+type LinkState = [
+ href: string | undefined,
+ external: string | null | undefined,
+ active: boolean,
+]
+
+const isStore = (value: any): boolean => !!value?.[Solid.$PROXY]
+
+// Props that decide where and how a Link navigates.
+const NAVIGATION_KEYS = [
+ 'to',
+ 'reloadDocument',
+ 'replace',
+ 'resetScroll',
+ 'hashScrollIntoView',
+ 'startTransition',
+ 'viewTransition',
+ 'ignoreBlocker',
+ 'params',
+ 'search',
+ 'hash',
+ 'state',
+ 'mask',
+ 'unsafeRelative',
+ 'from',
+ 'href',
+] as const
+// Options the Link consumes; every other option is an element prop.
+const LINK_OPTION_KEYS = [
+ ...NAVIGATION_KEYS,
+ 'activeProps',
+ 'inactiveProps',
+ 'activeOptions',
+ 'preload',
+ 'preloadDelay',
+ 'preloadIntentProximity',
+ 'target',
+ 'disabled',
+ 'style',
+ 'class',
+ 'onClick',
+ 'onBlur',
+ 'onFocus',
+ 'onMouseEnter',
+ 'onMouseLeave',
+ 'onMouseOver',
+ 'onMouseOut',
+ 'onTouchStart',
+]
+// A Link also consumes its children and component, and drops `type`.
+const LINK_ELEMENT_KEYS = [...LINK_OPTION_KEYS, '_asChild', 'children', 'type']
const STATIC_EVENT_PROPS = [
'onClick',
'onBlur',
@@ -494,9 +496,7 @@ const STATIC_EVENT_PROPS = [
'onTouchStart',
] as const
const STATIC_ACTIVE_PROPS = { class: 'active' }
-const STATIC_ACTIVE_PROPS_GET = () => STATIC_ACTIVE_PROPS
const EMPTY_OBJECT = {}
-const STATIC_INACTIVE_PROPS_GET = () => EMPTY_OBJECT
const STATIC_DEFAULT_ACTIVE_ATTRIBUTES = {
class: 'active',
'data-status': 'active',
@@ -652,17 +652,13 @@ export function createLink(
}
export const Link: LinkComponent<'a'> = (props) => {
- const [local, rest] = Solid.splitProps(
- props as typeof props & { _asChild: any },
- ['_asChild', 'children'],
- )
+ const local = props as typeof props & { _asChild: any }
+ // One props proxy between the element and the Link's props.
+ const linkProps = createLinkProps(props as any, LINK_ELEMENT_KEYS)
- const [_, linkProps] = Solid.splitProps(
- useLinkProps(rest as unknown as any),
- ['type'],
- )
-
- const children = Solid.createMemo(() => {
+ // Element insertion tracks this itself; only a custom component, which may
+ // read its children more than once, gets a memo.
+ const children = () => {
const ch = local.children
if (typeof ch === 'function') {
return ch({
@@ -673,7 +669,7 @@ export const Link: LinkComponent<'a'> = (props) => {
}
return ch satisfies Solid.JSX.Element
- })
+ }
if (local._asChild === 'svg') {
const [_, svgLinkProps] = Solid.splitProps(linkProps, ['class'])
@@ -688,9 +684,10 @@ export const Link: LinkComponent<'a'> = (props) => {
return {children()}
}
+ const memo = Solid.createMemo(children)
return (
- {children()}
+ {memo()}
)
}
diff --git a/packages/solid-router/src/utils.ts b/packages/solid-router/src/utils.ts
index f4a2067a6b..04ac989e7b 100644
--- a/packages/solid-router/src/utils.ts
+++ b/packages/solid-router/src/utils.ts
@@ -1,68 +1,43 @@
import * as Solid from 'solid-js'
/**
- * React hook to wrap `IntersectionObserver`.
- *
- * This hook will create an `IntersectionObserver` and observe the ref passed to it.
- *
- * When the intersection changes, the callback will be called with the `IntersectionObserverEntry`.
- *
- * @param ref - The ref to observe
- * @param callback - The callback to call when the intersection changes
- * @param disabled - Whether observation is disabled
- * @param cleanupWhenDisabled - Whether cleanup is needed without an observer (defaults to true)
- * @returns The IntersectionObserver instance
- * @example
- * ```tsx
- * const MyComponent = () => {
- * const ref = React.useRef(null)
- * useIntersectionObserver(
- * ref,
- * (entry) => { doSomething(entry) },
- * false
- * )
- * return
- * ```
+ * Observe a Link's element while it preloads on `'viewport'`: `callback`
+ * receives each intersection entry. Whenever the element or preload mode
+ * changes, and on cleanup, a preloading Link gets `callback()` so it can
+ * cancel a pending preload.
*/
export function useIntersectionObserver(
ref: Solid.Accessor,
callback: (entry?: IntersectionObserverEntry) => void,
- disabled: Solid.Accessor,
- cleanupWhenDisabled?: Solid.Accessor,
-): Solid.Accessor {
- const isIntersectionObserverAvailable =
- typeof IntersectionObserver === 'function'
- let observerRef: IntersectionObserver | null = null
-
+ preload: Solid.Accessor,
+): void {
Solid.createEffect(() => {
const r = ref()
- if (disabled() || !r || !isIntersectionObserverAvailable) {
- if (cleanupWhenDisabled?.() ?? true) {
- Solid.onCleanup(() => callback())
- }
- return
+ const mode = preload()
+ if (
+ mode === 'viewport' &&
+ r &&
+ typeof IntersectionObserver === 'function'
+ ) {
+ let active = true
+ const observer = new IntersectionObserver(
+ (entries) => {
+ // Queued notifications can arrive after this effect has cleaned up.
+ if (active) {
+ callback(entries.pop())
+ }
+ },
+ { rootMargin: '100px' },
+ )
+ observer.observe(r)
+ Solid.onCleanup(() => {
+ active = false
+ observer.disconnect()
+ callback()
+ })
+ } else if (mode) {
+ // Intent preloading still needs timer cleanup without an observer.
+ Solid.onCleanup(() => callback())
}
-
- let active = true
- const observer = new IntersectionObserver(
- (entries) => {
- // Queued notifications can arrive after this effect has cleaned up.
- if (active) {
- callback(entries.pop())
- }
- },
- { rootMargin: '100px' },
- )
-
- observerRef = observer
- observer.observe(r)
-
- Solid.onCleanup(() => {
- active = false
- observer.disconnect()
- callback()
- })
})
-
- return () => observerRef
}
diff --git a/packages/solid-router/tests/link-departing-scope.test.tsx b/packages/solid-router/tests/link-departing-scope.test.tsx
new file mode 100644
index 0000000000..6e130f361b
--- /dev/null
+++ b/packages/solid-router/tests/link-departing-scope.test.tsx
@@ -0,0 +1,1225 @@
+import { setFlagsFromString } from 'node:v8'
+import { runInNewContext } from 'node:vm'
+import * as Solid from 'solid-js'
+import {
+ cleanup,
+ fireEvent,
+ render,
+ screen,
+ waitFor,
+} from '@solidjs/testing-library'
+import { afterEach, describe, expect, test, vi } from 'vitest'
+import {
+ Link,
+ Outlet,
+ RouterProvider,
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouteMask,
+ createRouter,
+ redirect,
+ useMatch,
+} from '../src'
+
+afterEach(() => {
+ cleanup()
+ vi.restoreAllMocks()
+})
+
+type Deferred = {
+ promise: Promise